[dm-crypt] cryptsetup on linear md
gmazyland at gmail.com
Thu Dec 28 10:00:07 CET 2017
On 12/26/2017 02:40 PM, Sverd Johnsen wrote:
> hey what happens when i format on a linear md. when one disk dies will
> it still work in degraded state? assuming the disk that holds the
> header is still there. i was thinking about doing something like this
> to do btrfs raid over multiple disks via a single cryptsetup device
If you map JBOD array (or in other words linear mapping) using MD or
LVM2, and the device is activated in degraded mode (IOW some part of
device is missing and is replaced with some fillings - in LVM usually by
error targer), then it should still work.
IOW if there is still a LUKS header, cryptsetup will unlock it, map it
over degraded mapping and let you access it. Of course the missing part
IO access will produce IO errors, but the rest of device should be
You can easily try it with LVM2 - create LV over several disks, force
remove one disk and partially activate that LV - LUKS over it should
open fine if the header is still intact.
But for btrfs I would better use its internal device mapping tan combine
it with another volume tool.
More information about the dm-crypt