[Bug 501773] New: by-id links for DM RAID gone after removing one partition
http://bugzilla.novell.com/show_bug.cgi?id=501773 Summary: by-id links for DM RAID gone after removing one partition Classification: openSUSE Product: openSUSE 11.2 Version: Milestone 1 Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Basesystem AssignedTo: kasievers@novell.com ReportedBy: aschnell@novell.com QAContact: qa@suse.de CC: puzel@novell.com Found By: Development All by-id links for a DM RAID are gone after removing one partition with parted. See attached screenshot. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User aschnell@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c1 --- Comment #1 from Arvin Schnell <aschnell@novell.com> 2009-05-07 07:51:15 MDT --- Created an attachment (id=290723) --> (http://bugzilla.novell.com/attachment.cgi?id=290723) terminal screenshot -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User kasievers@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c2 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |aschnell@novell.com --- Comment #2 from Kay Sievers <kasievers@novell.com> 2009-05-07 15:11:33 MDT --- I've never seen any by-id/raid-* links. Where are these links coming from? Which rule creates them? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User aschnell@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c3 Arvin Schnell <aschnell@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|aschnell@novell.com | --- Comment #3 from Arvin Schnell <aschnell@novell.com> 2009-05-07 16:04:57 MDT --- Sorry, I don't know how to analyse this. How can I see out? I can regenerate the links by calling kpartx. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User kasievers@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c4 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kasievers@novell.com AssignedTo|kasievers@novell.com |hare@novell.com --- Comment #4 from Kay Sievers <kasievers@novell.com> 2009-05-08 02:52:54 MDT --- The by-id/raid-* links are created by kpartx udev rules. No idea what's the expected behavior here. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User hare@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c5 --- Comment #5 from Hannes Reinecke <hare@novell.com> 2009-05-08 03:45:49 MDT --- Looks like it's parted's fault. No idea what it does, though. Time to build some tracing output into parted. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User aschnell@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c6 Arvin Schnell <aschnell@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hare@novell.com AssignedTo|hare@novell.com |puzel@novell.com --- Comment #6 from Arvin Schnell <aschnell@novell.com> 2009-05-08 04:14:34 MDT --- After some debugging with Hannes we found out: This is caused by the fact that parted creates the device nodes (/dev/mapper/isw..._partX) itself instead of creating udev events and let udev create the links. The devices nodes parted created do not contain a UUID which is needed. See also bug #471440. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User puzel@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c7 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #7 from Petr Uzel <puzel@novell.com> 2009-05-11 06:41:05 MDT --- (In reply to comment #6)
After some debugging with Hannes we found out: This is caused by the fact that parted creates the device nodes (/dev/mapper/isw..._partX) itself instead of creating udev events and let udev create the links. The devices nodes parted created do not contain a UUID which is needed.
I wonder what's the proper way of creating udev events from parted. Does anybody know? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User hare@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c8 --- Comment #8 from Hannes Reinecke <hare@novell.com> 2009-05-11 06:45:11 MDT --- Yes. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User puzel@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c9 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |hare@novell.com --- Comment #9 from Petr Uzel <puzel@novell.com> 2009-05-11 06:54:54 MDT --- (In reply to comment #8)
Yes.
So could you please tell me (how to properly create udev rules from C code)? Thanks -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User hare@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c10 Hannes Reinecke <hare@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Info Provider|hare@novell.com |kasievers@novell.com --- Comment #10 from Hannes Reinecke <hare@novell.com> 2009-05-11 07:10:17 MDT --- Just do a echo 'change' > /sys/block/XXX/uevent where 'XXX' is the block device name. And then you'd have to wait for the event to finish. That's the tricky bit. Normally we would've called 'udevadm settle', but we really should be a bit more selective here. Kay? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User kasievers@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c11 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|kasievers@novell.com | --- Comment #11 from Kay Sievers <kasievers@novell.com> 2009-05-12 11:38:06 MDT --- No, there are no better ways to do this today. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User puzel@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c12 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P2 - High --- Comment #12 from Petr Uzel <puzel@novell.com> 2009-06-15 02:00:38 MDT --- Status update: Besides removing code [*] which updates partition mappings from parted, it is also necessary to implement new udev rule for kpartx. Current kpartx rules can only add partition mappings, but not update/delete them, which is needed in case some partitions are removed by parted. Implementing such rule in turn requires some changes in kpartx utility, namely something like 'update' option (in addition to existing add/delete options). With this option, kpartx would rescan the partition table and add/delete partition mappings as needed (note that this is not equal to running kpartx -d followed by kpartx -a since kpartx does not remove partition mappings for non-existent partitions). My plan is to implement kpartx -u, then match it to udev 'change' uevent for DM devices and then replace the [*] with issuing 'change' uevent for the device, which should let udev 'do the right thing'. Any comments are welcome. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User puzel@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c13 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |517442 --- Comment #13 from Petr Uzel <puzel@novell.com> 2009-06-29 10:01:02 MDT --- (In reply to comment #12)
My plan is to implement kpartx -u, then match it to udev 'change' uevent for DM devices and then replace the [*] with issuing 'change' uevent for the device, which should let udev 'do the right thing'.
for 'kpartx -u' patch see bug #517442 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 Bug 501773 depends on bug 517442, which changed state. Bug 517442 Summary: kpartx: add support for -u (update) http://bugzilla.novell.com/show_bug.cgi?id=517442 What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Status|ASSIGNED |NEEDINFO Status|NEEDINFO |ASSIGNED Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 Bug 501773 depends on bug 517442, which changed state. Bug 517442 Summary: kpartx: add support for -u (update) http://bugzilla.novell.com/show_bug.cgi?id=517442 What |Old Value |New Value ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User puzel@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c14 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |kasievers@novell.com --- Comment #14 from Petr Uzel <puzel@novell.com> 2009-09-29 09:26:20 MDT --- (In reply to comment #11)
No, there are no better ways to do this today.
Does that mean that calling 'udevadm settle' is the only way? Isn't there any 'udev library' that could do the job? Waiting in loop for devices to appear (as suggested in bug #502967, c#26) does not seem feasible to me - how could parted know which devices to wait for? Kay, Hannes: please comment. Thanks! -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User kasievers@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c15 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|kasievers@novell.com | --- Comment #15 from Kay Sievers <kasievers@novell.com> 2009-09-29 14:23:26 MDT --- In openSUSE 11.2 is libudev, which might provide the needed information: http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/index.html As far as we know though, it was never used for a job like this, so there might be things to fix or add to accomplish this task. Up until now, tools which can not handle events properly, use the dumb "wait for all events" "udevadm settle". -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|517442 | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=501773 User puzel@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=501773#c16 Petr Uzel <puzel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #16 from Petr Uzel <puzel@novell.com> 2009-10-07 08:55:49 MDT --- Fix submitted to Factory (variant with 'udevadm settle') -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com