The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is it possible to transparently add a partititon?

Discussion in 'General Discussion' started by fasdush, Jul 17, 2007.

  1. fasdush

    fasdush Member

    Joined:
    Oct 29, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    During initial server setup I`ve created /home and /backup partitons (both are about same size), but now we had storage server, so I set up backup over NFS and now I want to use old backup partition to add some space for user data.

    Is it possible to set this up with cPanel (ie just format, mount as /home2 and somehow configure cPanel to use it)? Or the only way is to use resize2fs to merge /home and /backup?

    Thanks and sorry for broken english.
     
  2. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    It's possible to reformat it and use it with cPanel. In WHM go to Server Configuration >> Basic cPanel/WHM Setup and look for the option that says "Home Directory Prefix". As long as it says "home" and you mount the new partition as "home2", it should work.

    Edit: I've never tried this though, so I can't say anything about any potential pitfalls
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    One intended behavior of this that some people don't expect is that cPanel/WHM will place new accounts on the partition with more free disk space (rather than filling the original partition then moving on).
     
  4. fasdush

    fasdush Member

    Joined:
    Oct 29, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, Voltar and David, it works, new accounts goes to /home2 & it appears in "Rearrange accounts" section now, so it would be possible to move some old accounts to /home2 and increase quotas serverwide.

    BTW, is it possible to automatically increase quotas for all accounts with specific package (ie add 200M)? And if some of them have custom quota? If I just modify /etc/quota.conf with sed/awk script-- it would be ok, or cPanel may broke somehow?
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Regarding the accounts that do not have a custom quota, you can simply edit the package (WHM -> Packages ->Edit Packages) and that will automatically affect all users on that package.

    Regarding accounts that do have custom quotas, follow the same procedure but note that the new package parameters will overwrite all customizations regarding quotas for accounts assigned to that package.

    If you want to do this repeatedly on a routine basis, you can use the editpkg function in the XML API as part of a script and perhaps set that script up as a cron job.
     
  6. fasdush

    fasdush Member

    Joined:
    Oct 29, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    >>Regarding the accounts that do not have a custom quota, you can simply edit the package (WHM -> Packages ->Edit Packages) and that will automatically affect all users on that package.

    Nope, David, this not works for me (11.2.0).

    But I found the way to do this:
    for i in `grep "=1000$" /etc/quota.conf|cut -d"=" -f 1`; do /scripts/editquota $i 2000M; done
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I'll note that at the time I posted that message, I was on 11.6.
     
Loading...

Share This Page