[TriLUG] Moving /home and others to new partitions

Rick DeNatale rick.denatale at gmail.com
Tue Jan 18 10:24:21 EST 2005


This is probably a NOOB question.

Some time ago, with advice from the list, I added a couple of 180GB
IDE/ATA drives to my system which was running on two 9GB SCSI drives. 
I've now gotten to the point where one of the SCSI drives is near to
overflowing so I need to move some stuff to one or more partitions on
the big disks.

I've got a few candidates to move

/home

/public - this is a directory publically shared on the lan with some
windows machines and a mac using samba and atalk

/var/lib/mysql

/var/www

What's the best way to accomplish this safely?   I know that I need to
create a partition for each of these, temporarily mount it, cp the
files, test the copy, delete the files from the original location and
then remount to the (now empty) original directory.

so as an example I'm thinking to move the /public directory

1) Fdisk to create partitions and make filesystems
2) sudo mount /dev/hdcx /mnt/temp
3) Stop samba, atalk, cron services
4) sudo cp -al /public /mnt/temp
5) test somehow that the copy worked. Suggestions?
6) sudo rm -Rf /public/*
7) restart services

Is this something that I can safely do at runlevel 5 or am I better
off shutting down to a mainenance runlevel?



More information about the TriLUG mailing list