This feed contains pages in the "btrfs" category.

I have been reading up about BTRFS, or butter-fs as it is pronounced, and having a little play with it on my laptop. It's looking good but is still a little new.

It has been touted as the Linux answer to ZFS which is probably true, it does share a lot of the same features but the implementation is quite different as far as I understand it. It is going to be the filesystem in Linux in a couple of years time and Linus is already using as root on one of his laptops. ( That Linus quote does not really mean that much, only that he wants to try it just like the rest of us and it's only one laptop not the box he develops the kernel on).

At a low level it uses b-trees and copy on write (COW) to store both the metadata about a file and the data in the files. It treats both types of data the same storing them both using the same functions and by doing so allows them to keep the code simpler and the data less fragmented. Reading large files with a lot of metadata on ext3 can be quite a disk seek intensive process but with btrfs this is reduced greatly.

Feature wise it is very interesting. Due to the different way it allocates metadata and file data on the disk it allows them to do some clever things. It supports Raid 0,1 and 10 for both the metatdata and the file data it checksums the data as it is written to disk allowing checks for corruption as data is read a written. Sub sectioning and snapshots. You can snapshot at the directory level allowing you to do things like take a quick snapshot before an upgrade or big set of changes and then roll back if things are not working the way you expect.

You can defrag a file or directory on the fly to keep important parts of the system ticking on nicely although if you have plenty of disk space then fragmentation should not be a problem.

There is a really neat function that allows you to convert a current ext3 filesystem to btrfs in place. It just converts all the metadata to the btrfs format on disk and makes it point to the file data that is already in place. Then it takes a snapshot so that you can go back at any time to the disk as it was before you converted. As this is just a normal snapshot you can also mount it up and examine it online just like any others.

BTRFS has only been in development for a few years so it is still taking shape and I am sure that the functionality will grow and stability improve as time goes on. Currently the website warns not to use it for any data that you want to keep and that is probably good advice.

The only other thing I found is that with 2.6.31-rc5 kernel the btrfs module dies when you try to suspend so it's not for me yet.

Posted Fri Aug 28 14:19:09 2009 Tags: /tags/btrfs
blog comments powered by Disqus