Skip to main content

Move /home to new disk

Comments

5 comments

  • cPanelMichael
    The intent was to rsync the contents of /home over to the new partition and then remount the new partition as /home when the data was copied; however, I've run into an issue where rsync is copying the full contents of /home/virtfs to the new drive.

    Hello, You may want to consider moving the accounts to the new partition via the following option instead of via rsnyc: Rearrange an Account - Documentation - cPanel Documentation Ensure the new partition name matches the home directory prefix before using the option. Then, once the accounts are copied over, you can adjust your partitions accordingly. Thank you.
    0
  • autumnwalker123
    Thanks Michael. I was able to successfully move /home to the new logical volume using rsync and excluding /home/virtfs from being copied across. After putting the server into single user mode I could move the old /home directory to a new location (/hm_old) and remount the new logical volume as /home with all of the accounts working as desired. A reboot of the server caused cPanel to recreate /home/virtfs under the new LV. My question now is, am I able to delete /hm_old/virtfs? I assume that cPanel won't have mounted the /virtfs folder in the hm_old directory. FYI - for anyone reading this with the same issue the reason I chose "hm_old" is because cPanel will look to place new accounts in any directory with "home" in it, which has the most disk space available - I wanted to avoid this so chose a name without "home" in it.
    0
  • cPanelMichael
    My question now is, am I able to delete /hm_old/virtfs? I assume that cPanel won't have mounted the /virtfs folder in the hm_old directory.

    You can review the /proc/mounts file to check your system for VirtFS mount points. Feel free to open a support ticket with us if you'd like us to verify that removing the old directory won't cause any problems. Thanks!
    0
  • autumnwalker123
    You can review the /proc/mounts file to check your system for VirtFS mount points. Feel free to open a support ticket with us if you'd like us to verify that removing the old directory won't cause any problems. Thanks!

    Excellent, thanks! I've taken a look at /proc/mounts and I see the VirtFS mount points for the new /home, but nothing under /hm_old.
    0
  • 24x7server
    Hi, You can simple perform rsync to exclude the folder you don't want to copy over. Below is the command you can use.. # rsync -av --progress --exclude 'virtfs' /home/ /home2/
    0

Please sign in to leave a comment.