TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [TCLUG:5493] Hard Drive Addition
> I also want to move my /home, /usr over to the
> new drive. How do I do this and still have the system recognize it as a
> continuous file system. I am pretty green to this.
>
> Thanks for all the help.
>
This may be a little overbasic, but these directions should be pretty
foolproof. Make sure you're logged in as root --
0: Are you satisfied with your system backup? Good.
1: Create directories called, for example, /newhome and /newusr.
2: After creating the partitions on your new drive and mkfs'ing them, mount
the new partitions using "mount /dev/hdb1 /newhome" (substituting the
appropriate partion devfile and directory name)
3: Copy the contents of /home and /usr to the new directories. Use "cp -a
/usr/* /newusr/" to make sure directory trees and file attributes are
preserved.
4: You'll probably want to eyeball the changes to make sure everything's
okay. I think " diff `find /usr` `find /newusr`" may prove useful (those
are *backticks*, not single quotes!)
5: When you're satisfied with the changes, unmount /newusr and /newhome,
and edit /etc/fstab to reflect the new locations of /usr and /home.
6: I believe "mount -o remount /usr" will then unmount the old /usr and
mount the new one. Otherwise you'll have to do a manual mount and unmount.
Whichever works, do the same thing for your /home partition.
Once this is done, you'll have new, presumably larger /home and /usr
partitions ready to go. When you're satisfied that everything is still
working correctly (I'd give it at least a day or two, but I'm paranoid.),
you can clear out your *old* /usr and /home partitions and reuse the space
as /var or /usr/lib or something, or else use Partition Magic or somesuch
utility to delete the partitions and extend some other partition into the
unused space.