[TriLUG] Moving /home and others to new partitions

Matt Pusateri mpusateri at wickedtrails.com
Tue Jan 18 10:36:14 EST 2005


On Tue, January 18, 2005 10:24 am, Rick DeNatale said:
> 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?

once you copy the files to the new file system.  create a single file,
can be anything on the new file system.  Then mount the new file
system over top the old file system.  You can then look for the new
file you created to make sure you are looking at the new file system
not the old.  run things that way and make sure you don't have any
problems.  once your sure your good to go then delete the old
filesystem.

Matt




More information about the TriLUG mailing list