Tux on VM

Last updated on:
Sunday, July 06, 2008







Valid HTML 4.01!
Linux for Big Iron

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.

  1. 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.
  2. Format your new DASD volume and run mke2fs on it.
  3. Use /mnt as a temporary mount point for the new file system, and mount the DASD volume on it:
            mount /dev/dasd?1 /mnt
  4. Copy your current root file system to the new volume:
            cd /usr
            tar -clpSf - . | (cd /mnt ; tar -xpSf - )
  5. (optional) Compare the two file systems for equality:
            cd /
            diff -r /usr /mnt  
  6. Mount your new file system as /usr:
            umount /mnt
            mount /dev/dasd?1 /usr  
  7. Update /etc/fstab with the new mountpoint:
            /dev/dasd?1   /usr  ext2  defaults  1  2  
  8. 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
            cd /usr
            rm -rf * .*
            cd /
            mount /dev/dasd?1 /usr
            telinit 2  (or 3, depending you what is in your /etc/inittab)


Site hosting courtesy of Velocity Software