LinuxCzar

Engineering Software, Linux, and Observability. The website of Jack Neely.    

Fedora 19 and Btrfs

  September 29, 2013   Operations

I’ve been avoiding Fedora 19, perhaps because I know it will be very much like RHEL 7 when it is released. However, I wanted to learn more about Btrfs, so Fedora 19 seemed just the thing for my test box. I booted the Fedora 19 installer, told it to use both of the hard drives in my system, and told it to auto-partition a Btrfs system. Everything else was pretty much the default.

I have two hard drives in most of my systems which I always setup in a RAID 1 + LVM scheme. Easy management of my data and redundancy for when the hardware gives out. Fedora 19 setup a /boot partition on drive 1 with Ext4, a swap partition (at the end of the disk), and a middle partition that filled the remaining space of the drive. Its was formatted with Btrfs. The second drive had one partition formatted with Btrfs and the two devices were part of the same Btrfs file system. The / and /home mount points were in separate Btrfs subvolumes. Not bad for the default setup, although I would have preferred the swap partition not and the end of disk 1.

Is my data safe? Btrfs supports RAID modes for redundancy. :

# btrfs filesystem df /
Data, RAID0: total=6.00GB, used=3.67GB 
Data: total=8.00MB, used=0.00 
System, RAID1: total=8.00MB, used=4.00KB 
System: total=4.00MB, used=0.00 
Metadata, RAID1: total=1.00GB, used=315.19MB 
Metadata: total=8.00MB, used=0.00

No. This looks like a default Btrfs setup, metadata defaults to RAID 1 on a multi-device setup. Data – like my music collection – does not! :

# btrfs balance start -dconvert=raid1 -mconvert=raid1 / 
Done, had to relocate 7 out of 7 chunks 
# btrfs filesystem df / 
Data, RAID1: total=5.00GB, used=3.67GB 
System, RAID1: total=32.00MB, used=4.00KB 
System: total=4.00MB, used=0.00 
Metadata, RAID1: total=1.00GB, used=313.32MB``

Now all my data and metadata is redundant on both my disks. No crazy Fedora installer foo to setup redundancy. No reboot. I think I like this new file system…a lot.

See the balance filters that can be used with Btrfs.

 Previous  Up  Next


comments powered by Disqus