[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new HD

On Thu, Aug 02, 2001 at 04:13:36PM -0300, GARGIULO Eduardo INGDESI wrote:
| Hi all.
| I have a new 12G hard drive to install in my server.
| I'm using qmail, so Maidirs are in $HOME directories. I want to
| use the new disk to mount /home.
| I want any sugestions about how to move the actual /home to the
| new one, without having to worry about user permissions.
| Is there any other way than simple tar/cp/untar or cp -rf?

Log in as root and be sure nothing is running that wants to use /home.
(adding 'single' to the kernel options when you boot is probably a
good idea)

# cd /
# mv home foo
# mkdir home
# mount /dev/new_disk home
# cd foo
# mv * ../home
# cd ..
# rmdir foo
# reboot

This should work fine.  It worked for me when I switched from RH to
Debian (I move /home from the other partition to the RH root partition
so I could install Debian there, later I moved /home to the Debian
partition and made a symlink from RH's / directory).  Since you will
have the same system (ie /etc/passwd) the UIDs and GIDs won't be
changing at all.


Reply to: