From: Kenn Humborg (kenn at domain bluetree.ie)
Date: Wed 13 Oct 1999 - 16:16:16 IST
> My question is, wheather it is possible to move a directory (/usr
> or /usr/local) "on the fly" to the new partition, or would it
> be better to reinstall? (I'll soon be upgrading to RH 6.1 anyway
> so that would be a natural time to reinstall)
Make a file system on the new partition and mount it somewhere
convenient:
# mke2fs /dev/hdXX
# mount /dev/hdXX /mnt
Drop to single-user mode:
# telinit 1
Copy the directory over:
# (cd /usr && tar cf - . ) | (cd /mnt && tar xvf - )
Add a line to /etc/fstab
/dev/hdXX /usr ext2 defaults
Rename the old /usr and mount the new one in its place:
# mv /usr /usr.old
# umount /mnt
# mount /usr
(The mount command will pick up the partition details from /etc/fstab.)
Go back to run level 3 or 5 as desired:
# telinit 3
# telinit 5
Nice thing is that this doesn't affect your uptime :-)
Later,
Kenn
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:43 GMT