My setup is currently raid1 + luks on each md partition and lvm on top to stripe between the arrays. There is only one volume group with one logical volume currently.
sdc 8:32 0 1.8T 0 disk └─sdc1 8:33 0 1.8T 0 part └─md127 9:127 0 1.8T 0 raid1 └─data-crypt0 (dm-3) 252:3 0 1.8T 0 crypt └─data_raid-data (dm-5) 252:5 0 2.7T 0 lvm /mnt/data sdd 8:48 0 931.5G 0 disk └─sdd1 8:49 0 931.5G 0 part └─md126 9:126 0 931.4G 0 raid1 └─data-crypt1 (dm-4) 252:4 0 931.4G 0 crypt └─data_raid-data (dm-5) 252:5 0 2.7T 0 lvm /mnt/data
I'm able to startup the device via
cryptsetup luksOpen /dev/md/data:0 data-crypt0 # decrypt cryptsetup luksOpen /dev/md/data:1 data-crypt1 # decrypt vgchange -ay /dev/data_raid # turn on lvm mount /dev/data_raid/data /mnt/data # mount
Unfortunately I'm unable to go the opposite direction and turn the thing off.
umount /mnt/data # ok vgchange -an /dev/data_raid # ok cryptsetup luksClose data-crypt0 # fail
For some reason I see the following, several times, and the device does not shut down.
device-mapper: remove ioctl on data-crypt0 failed: Device or resource busy
This is after a reboot and all I have done is the commands I've shown without ever using any of the data on the partition. I'd like some suggestions if anyone has something on either the setup or how to get it to shutdown.