Is it possible to transparently add a partititon?

fasdush

Member
Oct 29, 2005
13
0
151
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.
 

Voltar

Well-Known Member
Apr 30, 2007
267
0
168
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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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
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).
 

fasdush

Member
Oct 29, 2005
13
0
151
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?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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?
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.
 

fasdush

Member
Oct 29, 2005
13
0
151
>>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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
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.

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
I'll note that at the time I posted that message, I was on 11.6.