From: "Thomas Bächler" <thomas@archlinux.org>
To: Milan Broz <mbroz@redhat.com>
Cc: dm-crypt@saout.de, Peter Rajnoha <prajnoha@redhat.com>
Subject: Re: [dm-crypt] 1.1.0rc2: device-mapper: remove ioctl failed: Device or resource busy
Date: Tue, 20 Oct 2009 11:07:09 +0200 [thread overview]
Message-ID: <4ADD7DBD.8000204@archlinux.org> (raw)
In-Reply-To: <4ADD7B1F.9060704@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2613 bytes --]
Milan Broz schrieb:
> Hi Thomas,
>
> currently there is discussion between dm/lvm developers and
> some maintainers how to unify DM udev rules so these problems are
> fixed definitely. (Final state should be that applications using
> libdevmapper will use udev to create nodes and unified udev rules are
> part of libdevmapper package.)
>
> CCing Peter - I am sure he can explain your questions better than me.
I would be very interested in this, I'll look up the discussion.
>> Then I suggested adding the following udev rule (which I will probably
>> make the default):
>>
>> ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="dm-[0-9]*",
>> PROGRAM="/sbin/dmsetup info -c --noopencount --noheadings -o name -j %M
>> -m %m", RESULT=="temporary-cryptsetup-*", OPTIONS="last_rule"
>>
>> (btw, is there a better way than calling dmsetup to get the name here?).
>
> BTW for recent kernel, name and UUID is in sysfs directly. We have already
> some rule in dm package.
$ cat /sys/block/dm-0/dm/name
lvm_pv
$ cat /sys/block/dm-0/dm/suspended
0
$ cat /sys/block/dm-0/dm/uuid
CRYPT-4e80f75b-77d2-465c-ba8c-9480493dd717
This is awesome. How new does the kernel have to be? Some people are
forcing me to support ancient kernels (like 2.6.27), while personally
I'd rather only support latest stable.
>> Now, this fixes the problem with 1.0.7, as it prevents devicekit from
>> blocking access to the device, but the above error message isn't gone in
>> 1.1.0: http://bugs.archlinux.org/task/16735#comment51536
>>
>> What is this remove error caused by, if not by some application being
>> called from udev blocking access? Note that there are no
>> temporary-cryptsetup-* volumes left after luksOpen.
>
> No idea - but always I debubugged it, it was initiated from udev event
> through udev rule.
The rule above should effectively keep udev from spawning any process
that will do anything to the device - but yes, we need to debug it. I
have to see if I can set up a test case on the weekend so I can debug
this - until now, I have not seen this problem myself.
> I'll add better debug message to next cryptsetup rc (including process
> + parent process name, I hope I can get it from /proc in debugging mode)
> into debug output to allow more easy debugging of that problem - I do not
> want to hide it by some workaround, it must be fixed.
>
> (Surely nobody want an application randomly reading opened, decrypted
> internal keyslot device.)
That would be great. For now I am happy that the affected users have
working computers again :)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
next prev parent reply other threads:[~2009-10-20 9:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 8:35 [dm-crypt] 1.1.0rc2: device-mapper: remove ioctl failed: Device or resource busy Thomas Bächler
2009-10-20 8:55 ` Milan Broz
2009-10-20 9:07 ` Thomas Bächler [this message]
[not found] ` <4ADD9876.8000006@redhat.com>
2009-10-20 12:13 ` Thomas Bächler
2009-10-20 12:53 ` Peter Rajnoha
2009-10-20 13:05 ` Thomas Bächler
2009-10-20 13:29 ` Peter Rajnoha
2009-10-22 13:36 ` Peter Rajnoha
2009-10-22 15:01 ` Thomas Bächler
2009-10-22 15:31 ` Peter Rajnoha
2009-10-23 13:41 ` Uwe Menges
2009-10-23 13:57 ` Milan Broz
-- strict thread matches above, loose matches on Subject: below --
2009-10-20 7:29 Thomas Bächler
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=4ADD7DBD.8000204@archlinux.org \
--to=thomas@archlinux.org \
--cc=dm-crypt@saout.de \
--cc=mbroz@redhat.com \
--cc=prajnoha@redhat.com \
/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.