All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Matthias Schniedermeyer <ms@citd.de>
Cc: dm-crypt@saout.de, Benjamin Eberhardt <eberhab@gmail.com>
Subject: Re: [dm-crypt] force luksClose
Date: Thu, 29 Nov 2012 15:53:03 +0100	[thread overview]
Message-ID: <50B776CF.60501@gmail.com> (raw)
In-Reply-To: <20121129134313.GA14313@citd.de>

On 11/29/2012 02:43 PM, Matthias Schniedermeyer wrote:

> IOW. It's a problem of finding the culprit who holds the mountpoint 
> open.

Exactly. You cannot remove open (in-use) device-mapper device.

You can it replace with "error" target though (this will detach
underlying device from mapping.).

Just run "dmsetup remove -f <name>"
instead of cryptsetup remove/luksClose <name>"

But the dead DM device will still be in system. I can easily add such
force option to cryptsetup as well but it will not help much.

The correct way is to force unmout fs (or whatever use this device)
and then remove crypt mapping (see lsblk, lsof etc).

Milan

p.s.
There is a request to add "auto" removal flag for device-mapper devices
(automatic remove after last close, similar to loop auto removal).

Once this option will be in kernel cryptsetup will support it too.
But this will not help with your situation anyway.

  reply	other threads:[~2012-11-29 14:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 13:02 [dm-crypt] force luksClose Benjamin Eberhardt
2012-11-29 13:43 ` Matthias Schniedermeyer
2012-11-29 14:53   ` Milan Broz [this message]
2012-12-25 12:17     ` Benjamin Eberhardt
2013-02-21 21:16       ` Benjamin Eberhardt
2013-02-21 22:08         ` Matthias Schniedermeyer
2013-02-21 22:41         ` Milan Broz
2013-02-22  0:17           ` Benjamin Eberhardt
  -- strict thread matches above, loose matches on Subject: below --
2015-11-29 18:42 yac
2012-10-23  4:51 [dm-crypt] Force luksClose Dennis Birkholz
2012-10-25 10:01 ` Milan Broz
2012-10-25 14:46   ` Dennis Birkholz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B776CF.60501@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=eberhab@gmail.com \
    --cc=ms@citd.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.