How to make free space in Cpanel server.

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello,

I have shared cpanel and now my server’s disk goes to 99% and have cleared the logs from /var/log/*.
Please let me know, how to clear the user log so I can make free space or let me know other way?

Thanks,
Imran Khan.
 

HostingH

Well-Known Member
Jan 13, 2008
125
17
68
cPanel Access Level
Root Administrator
Hello Imran,

Please check Apache error/access/suphp and domlogs. Also check mysql logs under /var/lib/mysql/ur.hostname.com.err.
Using WHM >> List account >> Disk space usage, there you can sort the users as per their disk usage and then you can take necessary action on particular user. You can delete unwanted backup or tar files from home or users home.
 

24x7server

Well-Known Member
Apr 17, 2013
1,907
95
78
India
cPanel Access Level
Root Administrator
Hello,

/scripts/runlogsnow will update the all user webalizer stats on your server.

Also I will suggest you find out which user is using lot of disk space and check that user files may be user error_log is using the that space in that account.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello,

Thanks,

Actually, I know who is using more space. This is a shared hosting virtual machine on Hyper V with etx3 root partition. Also disk type is fixed. Technically I can not increase the size of ext3 partition but I can increase it using gparted.

If will go to increase disk space using gparted then fixed disk take more time to increase on Hyper V and current disk size is 300 GB.

So is there anyway to add additional disk on the same virtual machine and map the /home/ partition on it. Means after adding second disk, users account directly create on disk two not disk one.

Thanks,
Imran Khan.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello,

I have find out the solution.I will add the second drive on my virtual machine, create the partition and mount the /home2 directory on it.

Thanks,
Imran Khan.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello,

I have searched and found that, It possible to move existing cpanel account from /home to /home2 using "WHM Home » Account Functions » Rearrange an Account" option but just I want to know, how much time it take to transfer from /home to /home2 for 5GB size account?

Also let me know, is there any thing need to be done in WHM or Cpanel after mounting second hard disk partition on /home2?

Thanks,
Imran Khan.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
I have searched and found that, It possible to move existing cpanel account from /home to /home2 using "WHM Home » Account Functions » Rearrange an Account" option but just I want to know, how much time it take to transfer from /home to /home2 for 5GB size account?
It depends on your server's specific hardware. It should take no more than 5 minutes.

Also let me know, is there any thing need to be done in WHM or Cpanel after mounting second hard disk partition on /home2?
If you have already mounted the new drive as /home2, cPanel/WHM will automatically detect it as a new home directory that's available for accounts.

Thank you.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Michael,

For testing purpose, I have followed the below steps but getting error. I am doing this on single hard disk with single /home partition, /home2 directory and

1). Create /home2 directory.
2). Create cpanel account from the whm.
3). Click on "WHM Home » Account Functions » Rearrange an Account".

Error:-

boot does not match “home”
Sorry, there is only one usable partition detected on this machine matching “home”

Is /home2 required on second hard disk? or I can do it on same hard disk with two partitions i.e. /home and /home2?

Thanks,
Imran Khan.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
The "/home2" directory does not have to be on a separate drive, but it must at least be a separate partition to be considered a separate home directory.

Thank you.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Michael,

Thanks.

I have below queries on moving cpanel accounts from /home to /home2 partition.

1). If during moving process my internet disconnect or server’s internet disconnect when will data destroy/lost?
2). During moving process can I access cpanel, webmail, mail, database and website of that particular account?

Thanks,
Imran Khan.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
1). If during moving process my internet disconnect or server’s internet disconnect when will data destroy/lost?
If the server loses connection during this time then the rearrange process may need to be completed again when the connection is restored. Data is only being moved so there should be no lost data. Is it common for your server to lose connection? If so, you should get that issue resolved before proceeding to use this option.

2). During moving process can I access cpanel, webmail, mail, database and website of that particular account?
It's possible there will be "File Does Not Exist" errors during this time frame. It should only last a few minutes for large accounts so you should refrain from those actions until it completes.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
There may be a small time frame when a file is not accessible. It's typically not noticeable due to the short amount of time it takes for the process to move the files and setup the symbolic link.

Thank you.