Move accounts from /home to /home2 on cPanel

Sometimes the available disk space on the root or /home partition can be at the limit, and on those cases you will need to delete old content, old backups or move accounts/domains from /home to another partition with more available disk space.

How can I move accounts from /home to /home2 or another partition?

On WHM there is a function called ‘Rearrange an Account’ that is pretty much what you need to get rid of disk space issues on the /home partition. In order to move

WHM » Account Functions » Rearrange an Account

There you will see something like this:

Account User Name	username
Primary Domain Name	userwebsite.com
Current Home Directory	/home/username
Current Mount Point	/
Current Partition	/dev/sda3
Current Disk Usage	55748488 / 228535580 Blocks used, ( 26% Free )
New mount point for this account	/boot does not match “home”
/backup does not match “home”
/home2 (/dev/sdc1) 32% used

Choose /home2 if not selected by default, and then click on “Move Account” button.

Important: once you start the process, DO NOT STOP IT, because you may end up losing data and getting a corrupted cPanel account, see this message:

WARNING: Do not stop this process. If you have selected the wrong partition, let the process complete and then move it again.

Once you are done you should see this kind of results:

Results of move:

WARNING: Do not stop this process. If you have selected the wrong partition, let the process complete and then move it again.
Moving /home/username to /home2/username
Editing /etc/passwd entry
Editing /etc/proftpd/username entries
Updating vhost includes
Built /usr/local/apache/conf/httpd.conf OK
Done
Updating httpd.conf
Editing proftpd.conf entry
Updating webdisk configuration
Symlinking /home/username to /home2/username
Restarting Apache
Move Complete!

At this point you should be able to move account from /home to /home2 without any issues. Remember that it may take some time on big accounts with lot of GB of content, specially if you use old slow SATA drives.

About the Author: Martin Keler

Leave a Reply

Your email address will not be published. Required fields are marked *