You are not logged in.

#1 2010-09-05 09:46:04

evilgold
Member
Registered: 2008-10-30
Posts: 120

btrfs and encrypted volumes

I suppose this is a rather complicated question, but hopefully i can word it well enough:

If i have a btrfs volume on an encrypted partition (using dm-crypt/luks), and i want to expand it to another physical drive, would i need to setup an encrypted volume on the second drive as well, or would the first volume's encryption apply to the 2 (once i've run btrfs-vol -b).

More precicesly should i run "btrfs-vol -a /dev/mapper/encrypted-vol2 /media/foo" or would "btrfs-vol -a /dev/sdc1 /media/foo" be better.

I've already attempted doing so with both partitions encrypted, which results in a significant amount of CPU usage required to access the drives and potentially might slow things down more then needed. I'd like to know if doing it on an unencrypted partition would work while still maintaining the encryption.

Offline

#2 2010-09-05 11:22:44

hexanol
Member
From: Canaduh
Registered: 2009-08-04
Posts: 95

Re: btrfs and encrypted volumes

I have no specific knowledge about btrfs, but with my understanding of how device mapper works in general, I would say you would find yourself with some files being encrypted and some files not.

The filesystem is just seeing an underlying block device, there's no difference for it between accessing a 'raw' block device (like a partition) and a device-mapper block device (like an encrypted partition). I doubt btrfs does any extensive check on the nature of the block device before using it, because that wouldn't be really portable.

Offline

#3 2010-09-05 22:46:36

evilgold
Member
Registered: 2008-10-30
Posts: 120

Re: btrfs and encrypted volumes

Thanks for the response hexanol. That was pretty much my inital logic too when i fist set things up.  Since the first btrfs parition wouldnt actually be "aware" that it was encrypted, i figured it was best to have both physical drives encrypted (i'm guessing this also gives me somewhat better encryption). It is however a bit slow as the system has to deal with reading/writing to 2 512bit aes-xts partitions instead of just one... perhaps a lower encrpytion level wouldnt be too bad at this point.

Offline

Board footer

Powered by FluxBB