[dm-crypt] Force luksClose

Milan Broz gmazyland at gmail.com
Thu Oct 25 12:01:12 CEST 2012


On 10/23/2012 06:51 AM, Dennis Birkholz wrote:
> I am using a crypt mapping on a Software-RAID5. As my raid crashed (2 of
> 5 drives disappeared), I was not able to remove the crypt mapping
> because the raid device was not accessible any more. It would be nice to
> have a force option so the mapping is removed and I can stop the
> degraded raid. The only option was to reboot which is not a very good
> solution.

The luksClose / remove should remove mapping if underlying device disappeared.

But there was some bug related to this - which cryptsetup version you are using?

Anyway, you can always use "dmsetup remove" and if it fails, "dmsetup remove -f"
(The second will replace mapping with error target, so you can force detach
even used device.)

Milan


More information about the dm-crypt mailing list