All of lore.kernel.org
 help / color / mirror / Atom feed
* Device removal handling
@ 2011-07-10 20:12 Phillip Susi
  2011-07-10 22:03 ` Alasdair G Kergon
  0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2011-07-10 20:12 UTC (permalink / raw)
  To: dm-devel

-----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-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-13 15:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-10 20:12 Device removal handling Phillip Susi
2011-07-10 22:03 ` 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

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.