From: Phillip Susi <psusi@cfl.rr.com>
To: dm-devel@redhat.com
Subject: Device removal handling
Date: Sun, 10 Jul 2011 16:12:10 -0400 [thread overview]
Message-ID: <4E1A079A.9060901@cfl.rr.com> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am trying to understand how device removal is supposed to be handled
and make sure that it works correctly. So far, what I see is discouraging.
I began by trying to remove the msdos partition table code from dmraid
and leave partition handling up to kpartx. I realized that this is not
so simple because in order to deactivate the raid array, the partitions
must first be deactivated, which will not be possible if dmraid does not
know about them. It also seems that dmsetup fails to remove a dm device
that is in use.
I then tried forcing the removal of an underlying physical disk by
writing a 1 to /sys/block/sda/device/remove. This apparently removed
the disk, but left it in a dangling state since it was apparently still
being referenced by the dm device, which seems to have no notion that
the underlying disk has been removed. At this point the /sys entry has
gone, so it is no longer even possible to have udev look up the holders
of the device so they can be removed. This prevents the disk from
reusing the same identifier when it is rescanned.
Shouldn't it be possible to remove an underlying dm-device that is still
in use like you can with the physical disk, and shouldn't such a removal
trigger some kind of notification to the dm-device stacked on top, so
that it can release it?
Also, why do the /sys entries disappear before the device is released?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk4aB5UACgkQJ4UciIs+XuLQYACbB3YCsYoEyfUm5aLITa2wajSp
M8AAoJ5e1sqflyJfwk38A8aZabmb+wkW
=44S4
-----END PGP SIGNATURE-----
next reply other threads:[~2011-07-10 20:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-10 20:12 Phillip Susi [this message]
2011-07-10 22:03 ` Device removal handling Alasdair G Kergon
2011-07-11 15:08 ` Phillip Susi
2011-07-11 15:23 ` Alasdair G Kergon
2011-07-11 20:31 ` Phillip Susi
2011-07-12 6:24 ` Hannes Reinecke
2011-07-12 10:58 ` Alasdair G Kergon
2011-07-13 15:53 ` Phillip Susi
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=4E1A079A.9060901@cfl.rr.com \
--to=psusi@cfl.rr.com \
--cc=dm-devel@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.