Linux + XFS HOWTO: Linux on Steroids | ||
---|---|---|
Prev |
$ mkfs -t ext2 /dev/hda4 $ mkdir /mnt/temp $ mount -t ext2 /dev/hda4 /mnt/temp $ cd / $ tar lcf - .|(cd /mnt/temp; tar xpvf - ) |
$ mkfs -t xfs /dev/hda2 |
$ mount -t xfs /dev/hda2 /mnt/temp |
And copy the original / fs back to its original home:
$ cd / $ tar lcf - .|(cd /mnt/temp; tar xpvf -) |
/dev/hda2 / xfs defaults 1 1 |
Note | ||
---|---|---|
On some linux distributions the options given to the out-of-box fstab may be more in depth than just "defaults." For instance, on Debian systems they use "defaults,errors=remount-ro." The mount options are different for every filesystem with the exception of the keyword "defaults." Unless you know the specific XFS mount options you want you should stick with just the defaults option. In the Debian example given, the errors option is not available with XFS and will cause your filesystem not to mount. Additionally, filesystem labels are becoming more popular so you may see an entry in your fstab that looks something like this:
|
$ telinit 1 |
or by rebooting and asking for single user mode at the Lilo prompt:
LILO Boot: xfs single |
$ mount -t ext2 /dev/hda4 /mnt/temp $ cd /usr $ tar lcf - .|(cd /mnt/temp; tar xpvf - ) $ cd /mnt/temp $ umount /usr $ mkfs -t xfs /dev/hda3 $ mount -t xfs /dev/hda3 /usr $ tar lcf - .|(cd /usr; tar xpvf - ) |
Don't forget to change the filesystem type in /etc/fstab for /usr to xfs.