/dev/doug – moving to BTRFS
moving to BTRFSI’ve been following the development of btrfs for some time now eagerly awaiting its graduation from experimental status in the kernel. While it is still labeled as experimental in the kernel, the on-disk format has been finalized so I decided to take the plunge.I decided to convert my main system, which is a 64-bit Gentoo box with a ~700Gb root partition software raid device. The root partition started life as an ext3 filesystem before being converted to ext4 and now brtfs. Since the conversion should be done on an unmounted partition, I downloaded and burned the latest SystemRescueCD which you should keep handy as a DR solution anyway and then booted into it. It autodetected and started my RAID arrays and dropped me at a command line.To actually convert the filesystem, run: btrfs-convert /dev/md2replacing md2 with your device node. After some time hours in my case the new btrfs metadata will be written to disk and you’re ready to move on. At this point, you can actually continue to use the device as ext4 or as btrfs read their wiki for how/why. Personally, I chose to convert one-way, so I next rebooted into my system with the root partition mounted as btrfs I had edited /etc/fstab previously and told the system to ‘balance’ the b-tree that makes up the filesystem: btrfs-vol -b /This actually causes all the data to be converted to the new on-disk format otherwise, it would have been converted over time as files were modified btrfs is a CoW-based filesystem.After this command completed again, hours I was able to remove the ext4 metadata image that was created by the conversion process: btrfs subvolume delete //ext2_savedNote that I used // since I converted my root. If you had converted home instead, you’d use /home/ext2_saved. And yes, it’s called ext2_saved regardless of whether the filesystem was ext2, ext3, or ext4.At this point, I was up and running on my new btrfs filesystem. Now I get to play with the cool new features of btrfs like online defrag, filesystem compression, and snapshots.