Fedora 29. I created a 5TB RAID1 volume using mdadm
. I then encrypted the volume with cryptsetup luksFormat
. I then created ext4
partitions on the encrypted volume. (I did it this way so I can add disks to the RAID1 array, wait for them to sync, then remove the spares for offsite storage of encrypted snapshots.)
I had to run partprobe /dev/mapper/md100
to get the partitions to be recognised by the running kernel, and they all showed up as /dev/mapper/md100p{5..14}
(along with the whole-disk /dev/mapper/md100
volume link). I was able to mount and write to each partition without problem.
However, after umount
ing each of the partitions, I cannot close the LUKS volume. The md100p*
symlinks are still in /dev/mapper
. When I try to luksClose
the /dev/mapper/md100
volume, I'm told it's still in use. Trying to luksClose
the individual partition links fails with
Command failed with code -4 (wrong device or file specified).
(Which doesn't make sense anyway, since they're not individually encrypted.)
lsof
doesn't show any channels open to any md100*
devices.
What's keeping the whole-disk LUKS volume in use, and how do I shut it down so I can stop it and remove it?
Thanks!