Plans for BTRFS in Fedora

Lars Seipel lars.seipel at googlemail.com
Wed Feb 23 17:50:38 UTC 2011


On Wednesday 23 February 2011 15:07:55 Peter Jones wrote:

> 1) can btrfs do encrypted volumes?

Not yet.  Although this was a planned feature at some point, according to 
Josef, nobody has done it yet.

If you want to stack it on top of dm-crypt there are caveats as well.

From btrfs-wiki:
>btrfs volumes on top of dm-crypt block devices (and possibly LVM) require
> write-caching to be turned off on the underlying HDD. Failing to do so, in
> the event of a power failure, may result in corruption not yet handled by
> btrfs code. (2.6.33)

Is this still prevailing as of 2.6.38?

While it may work if you're lucky (at least it did for me since F13) it can 
also munch your data. That's what happened to me last night in F15 (didn't 
lose any data though as such stuff was somewhat expected). Btrfs root partition 
(no LVM) on a dm-crypt volume on Intel 32 GB solid state drive.

After an unclean shutdown I was no longer able to mount the filesystem and 
therefore start the system. I even managed to crash a live system when trying 
to mount the decrypted luks volume containing the btrfs.

As I didn't have much time I just dd'ed an image to a spare disk and 
reinstalled. If there is any debugging value in this, I can make it available 
as long as I can be sure all data could be stripped from it (btrfs-image does 
exactly this, right?).

Be aware that the crash-on-shutdown didn't happen with an official Fedora 
kernel. Due to the update embargo on F15 I built an updated Kernel checked out 
with fedpkg.

If btrfs should become the default filesystem for Fedora (which I strongly 
support) a nice and clean solution for encrypted filesystems has to be found. 
Falling back to ext4 & lvm when the encryption checkbox gets ticked is just 
plain ugly. Not supporting encrypted disks at all would be even worse.

Any ideas?


More information about the devel mailing list