linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] [RFC] Let udev play with snapshots
@ 2006-10-11 17:34 Jan Blunck
  2006-10-11 17:46 ` Alasdair G Kergon
  2006-10-23 13:41 ` [linux-lvm] [RFC, 2nd try] " Jan Blunck
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Blunck @ 2006-10-11 17:34 UTC (permalink / raw)
  To: linux-lvm

Hi,

it seems that the snapshot problem isn't solved completely by our latest
changes. I looked into it and found something:

The problem is that udev isn't able to differentiate between dm targets that
aren't supposed to be opened by anything else than the lvm2 tools itself or
not. When we are creating a snapshot, this is what we do:

- creating "vg-snapshot"
- clearing the start of "vg-snapshot"
- removing "vg-snapshot"                                                  (1)
- creating "vg-origin-real"
- creating "vg-snapshot-cow"
- creating "vg-snapshot"
- suspending "vg-origin" and "vg-origin-real"
- reload tables
- resuming "vg-origin-real", "vg-snapshot-cow", "vg-snapshot" and         (2)
  "vg-origin"

At the point (1) udev already run vol_id on vg-snapshot. This LV is only
created to clear the exception store of the snapshot to be created. So
lvcreate tries to remove the still open vg-snapshot.

What we need to do is to tell udev that it shouldn't open the intermediate
vg-snapshot target but wait until (2) to open it.

I'm not quite certain about how to do this. IIRC Heinz told me during the
summit about the tagging possibilities. The problem is that tags are not
supported by snapshots but as the first LV isn't a snapshot ... So I propose
the tagging of all kind of intermediate LVs so that udev can easily
differentiate by calling "dmsetup lstag" (or maybe lsattr ;)

Comments?

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

end of thread, other threads:[~2006-10-26 18:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-11 17:34 [linux-lvm] [RFC] Let udev play with snapshots Jan Blunck
2006-10-11 17:46 ` Alasdair G Kergon
2006-10-11 18:08   ` Jan Blunck
2006-10-11 18:17     ` Alasdair G Kergon
2006-10-12  7:13       ` Jan Blunck
2006-10-23 13:41 ` [linux-lvm] [RFC, 2nd try] " Jan Blunck
2006-10-24 18:21   ` Alasdair G Kergon
2006-10-26 18:33     ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).