Re: Encrypted Raid 1 Btrfs on *Single Drive*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Mar 14, 2014 at 7:09 AM, Jorge Fábregas <jorge.fabregas@xxxxxxxxx> wrote:

 
# cryptsetup luksFormat /dev/sdc  (my external drive)

# cryptsetup luksOpen /dev/sdc vault

# fdisk /dev/mapper/vault
...and created two partitions of equal size
...afterwards I got /dev/mapper/vault1 & vault2

I think somehow,the kpartx step was done here and this is evident by the existence of
/dev/mapper/vault1 & vault2
 
I tried lucksClose with vault1 & vault2 before attempting to close vault
but couldn't.  I had to:

# dmsetup remove vault1
# dmsetup remove vault2
# dmsetup remove vault

I think here,you should have done:
kpartx -d /dev/mapper/vault
cryptsetup luksClose vault

Then the devices disappeared from /dev/mapper.  Now when I want to mount
my external drive again I have to add another step once I open the LUKS
device:

# kpartx -a /dev/mapper/vault
...so it can create /dev/mapper/vault1 & vault2 so I can use either one
to mount the btrs raid 1.

This much seem to be expected.
 
Is this the correct method:  create the two partitions on the LUKS
device so can I use BTRS RAID 1?  I thought about the other way:

The "standard way" is to create an LVM volume in the encrypted container.This is how most
distributions implements "full disk encryption" with LUKS.

With an LVM volume,you can simulate partitions by creating volume groups/logical volumes.


_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux