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.

Moving home directory to new partition

Discussion in 'Data Protection' started by Mauritz, Nov 26, 2016.

Tags:
  1. Mauritz

    Mauritz Well-Known Member

    Joined:
    Apr 29, 2015
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Johannesburg
    cPanel Access Level:
    Root Administrator
    We need to move our home directory to a new partition. I have found a large number of resources but not sure if there are anything specific to WHM we should be aware of?

    1. Create new partition with temp mount point
    2. rsync current /home to new temp directory
    3. modify fstab to point to new partition and uncommenting the original fstab entry to old path
    4. switch off network
    5. do last rsync
    6. move /home to /homeold
    7. mount -a to load new mount
    8. switch on network
    9. test and confirm
    10. do a restart with a last test and confirm
    11. remove old partition from system

    Anything else we should be aware of? The server runs cloudlinux which has cagefs enabled. Also, is there any selinux considerations we should note?
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    542
    Likes Received:
    39
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Might be SELinux is already disable on your server and you can switch you home partition with following.

    1) Mount new partition with temp mount point
    2) Rsync your all files and folder from old to new partition
    3) Switch off network and run final rsync
    4) Change fstab file and start network
    5) Test all thing and remove old partition
     
  3. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    752
    Likes Received:
    11
    Trophy Points:
    143
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    Why not mount it as /home2 and use the rearrange accounts feature in WHM?

    Seems like it would be easier.

    Thanks!
     
Loading...

Share This Page