I was shocked to discover that converting one’s filesystem is simple as pie and totally safe. The process goes like this:
- Remove cruft from your system (optional)
- Reboot into a LiveCD environment (optional if the partition you want to convert can be mounted read-only without rebooting)
- Mount the partition you want to convert in read-only mode
- Copy the contents of the partition somewhere temporarily (ex. another partition, external drive, DVD, etc.)
- Unmount the copied partition
- Format the partition with your desired filesystem
- Mount the formatted partition and copy all the files back
- Edit /etc/fstab to reflect the new filesystem
- Reboot and profit
Thanks to Slicehost’s wonderful Rescue Mode with a 2GB Rescue Slice, I was able to use this method to convert my Gentoo VPS from ext3 to XFS. Here’s a step-by-step account. These steps were performed on a 256MB VPS at Slicehost. YMMV.
Continue reading ‘Convert your Linux filesystem safely and easily (even on a VPS)’
If you liked this post, please subscribe to my feed. Thanks for visiting!

