How to mount secondary HDD as the default home directory

3 posts / 0 new
Last post
#1 Tue, 11/17/2015 - 11:30
vijayr

How to mount secondary HDD as the default home directory

Hello,

Newly created server with Cent OS 6 disk is limited to 30GB, i have added a 1 TB hdd to the server. Can someone help me out to add this 1 TB hdd as the default home directory. Like a shortcut where all the files are shown in the OS drive but actually stored in the secondary disk (to retain suexec features).

Thanks.

Tue, 11/17/2015 - 12:40
andreychek

Howdy,

The way I would usually handle that is:

  • Mount the new drive on something like /mnt/newhome

  • Stop services such as Apache and Postfix

  • Use rsync to copy all the data from /home to /mnt/newhome (using something like "rsync -auv /home/ /mnt/newhome")

  • Move /home to /oldhome.

  • Unmount /mnt/newhome, and then mount it on /home.

    -Eric

Wed, 11/18/2015 - 04:33
vijayr

Works perfect. :)

Thank you so much.

Topic locked