Last updated on: Sunday, July 06, 2008
Software
Information
Community
News
Fun
Credits
|
Moving Part of a File System to another Linux/390 Volume
Note that this process can be generalized to _any_ part of your directory structure.
/usr just happens to be the one piece that is most frequently broken out.
- Add your new DASD volume to your system. How this is done will depend
on whether you are running a 2.2.x kernel, or a 2.4.x one. Note that if
you have a 2.2.x kernel, adding DASD will require rebooting your system.
- Format your new DASD volume and run mke2fs on it.
- Use /mnt as a temporary mount point for the new file system, and mount the
DASD volume on it:
mount /dev/dasd?1 /mnt
- Copy your current root file system to the new volume:
cd /usr
tar -clpSf - . | (cd /mnt ; tar -xpSf - )
- (optional) Compare the two file systems for equality:
cd /
diff -r /usr /mnt
- Mount your new file system as /usr:
umount /mnt
mount /dev/dasd?1 /usr
- Update /etc/fstab with the new mountpoint:
/dev/dasd?1 /usr ext2 defaults 1 2
- At some later time, take your system down to single user mode,
umount the new /usr file system (make sure it gets unmounted),
and delete everything that was in /usr on your root file system:
telinit 1
umount /usr
df
cd /usr
rm -rf * .*
cd /
mount /dev/dasd?1 /usr
telinit 2 (or 3, depending you what is in your /etc/inittab)
|