Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    wzd
    wzd is offline
    Member wzd's Avatar
    Join Date
    Dec 2005
    Location
    South Africa
    Posts
    115

    Question Moving /home

    Hi Guys,

    I have recently added in a new 200GB hard drive to the server and would like to move the current /home and everything in it to the new HDD which is /home2

    Is Cpanel or WHM able to do this and if so how? We have about 200 domains hosted in the current /home directory which takes up about 40GB

    Can anyone help with this migration?

    Thanks,
    Wzd
    You will learn to earn death...
    Flamewave

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge jester.ro's Avatar
    Join Date
    Feb 2004
    Location
    Bucharest, Romania
    Posts
    304

    Default

    let's say you have the new 200 gig hdd in one partition, probably /dev/sdb1

    mkdir /mnt/newhdd
    mount /dev/sdb1 /mnt/newhdd

    copy the contents of /home to /mnt/newhdd
    (use rsync, it will take alot the first time).

    change your fstab, and add a line like this:

    /dev/sdb1 /home ext3 defaults,usrquota 1 2

    comment the line that's already refering to home (probably something like this):

    LABEL=/home /home ext3 defaults,usrquota 1 2

    Then, sometimes when the load is low(preferably night time), rsync again to have the latest changes active.
    reboot the server.

    Everything should be in place, with the /home partition having 200 GB

    the old home partition is now unused, you can mount it somwhere else.
    (to know which partition it is, before the change type "mount" in a shell.
    You'll se something like

    /dev/sda8 on /home type ext3 (rw,usrquota)

    That means that after you did these changes, you can mount the old partition with

    mount /dev/sda8 /mnt/a_name_you_want
    or even
    mount /dev/sda8 /home2

    Please ask a server admin to do this for you. I've wrote this right now, hopefully without errors, but have an admin check to see if there are some mistakes. Then again, and admin would't need this "tutorial" )

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 03-17-2011, 08:13 PM
  2. Help With Home Server Home Page
    By WebDummie in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-14-2010, 05:21 PM
  3. Moving DB
    By FeeReD in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 04-29-2006, 03:23 PM
  4. /home/user/mail/mailbox VS /home/user/mail/domain/mailbox
    By PWSowner in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-18-2005, 02:55 AM
  5. Moving On
    By mo_heywood in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-19-2003, 12:30 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube