Bug#593375: udev: Doesnt create lvm symlinks
tags 593375 help thanks On Thu, Aug 19, 2010 at 07:29:57PM +0200, Marco d'Itri wrote: Please let me know your plans about this, I need to upload a new udev package with a fix. No idea what you are talking about. Please provide patches. My fix would be to trash the whole udev integration for now. Bastian -- Without facts, the decision cannot be made logically. You must rely on your human intuition. -- Spock, Assignment: Earth, stardate unknown -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#593375: udev: Doesnt create lvm symlinks
On Aug 29, Bastian Blank wa...@debian.org wrote: No idea what you are talking about. Please provide patches. I think it is explained in the message I forwarded: either you package a more recent release or backport its rules files. My fix would be to trash the whole udev integration for now. I am sure this would be a great service to your users. -- ciao, Marco signature.asc Description: Digital signature
Bug#593375: udev: Doesnt create lvm symlinks
On 08/18/2010 10:54 AM +0100, Marco d'Itri wrote: After I started not deleting the initramfs database as you asked, I received multiple bug reports like this one. Version of LVM in Debian is 2.02.66-2, please advise. After upgrade from 160 to 161, udev doesnt create lvm volumes symlinks any more. Here is the related part of the boot log: Tue Aug 17 09:05:00 2010: The link /dev/vg00/root_lv should had been created by udev but it was not found. Falling back to direct link creation. OK, here's what happens: 1. the LV with root fs is activated in initrd and udev database is filled. 2. root fs is mounted 3. /etc/init.d/udev script is running (keeping the udev db from initrd), calling: /sbin/udevadm trigger --action=add Since udev db now contains records about devices including dm devices and since the version of the rules used in Debian does not contain everything that's needed for proper support of synthesized events, the ADD event generated by udev script's trigger will be ignored instead of being detected and used. (symlinks for dm devices are created only after the CHANGE event, unless there's a support for synthesized ADD events which we added later) But ignoring events in udev rules means removing any existing symlinks! This will remove any existing /dev/vgname/lvname symlinks. The missing parts are these: IMPORT{db}=DM_UDEV_PRIMARY_SOURCE_FLAG and ACTION==add, ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!=1, GOTO=dm_disable (instead of ACTION==add, ENV{STARTUP}!=1, NAME=, GOTO=dm_end) These changes are all in new upstream release of lvm2/libdevmapper though. (Anyway, the NAME= shouldn't be used anymore - it's deprecated as well now) This problem did not occur/was not revealed before the change in udev init script (keeping the udev db) because of the obscure situation actually: - the /dev was populated in initrd - the udev database was cleared though - /dev/vgname/lvname symlinks remained because when running initial udevadm trigger --action=add in udev init script, there was no udev database. We ignored the ADD event, but since there was no udev database record, udevd didn't know about symlinks already created and so it kept any existing ones. That's the reason why vgscan --mknodes did not warn about anything before the change... 3. /etc/init.d/lvm2 script is running, calling: /sbin/vgscan --ignorelockingfailure --mknodes The --mknodes shouldn't be used actually when we use udev with lvm2/libdevmapper. Since we have udev support enabled, we expect that the symlinks are created by udev itself. If we detect that they're missing, we issue a warning message and fallback to direct link creation. Maybe: udevadm trigger --action=change --attr-match=dm/name or udevadm trigger --actoin=change --sysname-match=dm-* is more appropriate here instead (I assume that would also be a nice way how to support even non-udev initrds if someone makes his own...). So, basically, the main source of the problem was the --mknodes parameter in that lvm2 init hook - that udevadm trigger --action=change should be used instead. But also, I really recommend using latest upstream release with the rules that should handle those synthesized events properly (even the udev's initial udevadm trigger --action=ADD). We relied on udev init script to set the ENV{STARTUP}=1 before calling the trigger, but this solution was deprecated (as we discussed it more with upstream udev). So we came with this DM_UDEV_PRIMARY_SOURCE_FLAG checking and keeping the udev database from initrd then (which is a more correct solution anyway). Maybe this should be forwarded to Debian's lvm2 maintainer to make appropriate changes/updates. If there's any other problem, please, let me know... Peter -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#593375: udev: Doesnt create lvm symlinks
clone 593375 -1 retitle -1 LVM needs to be updated for modern udev releases reassign -1 lvm2 severity 593375 critical thanks Please let me know your plans about this, I need to upload a new udev package with a fix. The udev package will need a Breaks directive and lvm needs to change the init script and rules as described here. Or else I will have to revert the change, but I'd rather not have to. On Aug 19, Peter Rajnoha prajn...@redhat.com wrote: On 08/18/2010 10:54 AM +0100, Marco d'Itri wrote: After I started not deleting the initramfs database as you asked, I received multiple bug reports like this one. Version of LVM in Debian is 2.02.66-2, please advise. After upgrade from 160 to 161, udev doesnt create lvm volumes symlinks any more. Here is the related part of the boot log: Tue Aug 17 09:05:00 2010: The link /dev/vg00/root_lv should had been created by udev but it was not found. Falling back to direct link creation. OK, here's what happens: 1. the LV with root fs is activated in initrd and udev database is filled. 2. root fs is mounted 3. /etc/init.d/udev script is running (keeping the udev db from initrd), calling: /sbin/udevadm trigger --action=add Since udev db now contains records about devices including dm devices and since the version of the rules used in Debian does not contain everything that's needed for proper support of synthesized events, the ADD event generated by udev script's trigger will be ignored instead of being detected and used. (symlinks for dm devices are created only after the CHANGE event, unless there's a support for synthesized ADD events which we added later) But ignoring events in udev rules means removing any existing symlinks! This will remove any existing /dev/vgname/lvname symlinks. The missing parts are these: IMPORT{db}=DM_UDEV_PRIMARY_SOURCE_FLAG and ACTION==add, ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!=1, GOTO=dm_disable (instead of ACTION==add, ENV{STARTUP}!=1, NAME=, GOTO=dm_end) These changes are all in new upstream release of lvm2/libdevmapper though. (Anyway, the NAME= shouldn't be used anymore - it's deprecated as well now) This problem did not occur/was not revealed before the change in udev init script (keeping the udev db) because of the obscure situation actually: - the /dev was populated in initrd - the udev database was cleared though - /dev/vgname/lvname symlinks remained because when running initial udevadm trigger --action=add in udev init script, there was no udev database. We ignored the ADD event, but since there was no udev database record, udevd didn't know about symlinks already created and so it kept any existing ones. That's the reason why vgscan --mknodes did not warn about anything before the change... 3. /etc/init.d/lvm2 script is running, calling: /sbin/vgscan --ignorelockingfailure --mknodes The --mknodes shouldn't be used actually when we use udev with lvm2/libdevmapper. Since we have udev support enabled, we expect that the symlinks are created by udev itself. If we detect that they're missing, we issue a warning message and fallback to direct link creation. Maybe: udevadm trigger --action=change --attr-match=dm/name or udevadm trigger --actoin=change --sysname-match=dm-* is more appropriate here instead (I assume that would also be a nice way how to support even non-udev initrds if someone makes his own...). So, basically, the main source of the problem was the --mknodes parameter in that lvm2 init hook - that udevadm trigger --action=change should be used instead. But also, I really recommend using latest upstream release with the rules that should handle those synthesized events properly (even the udev's initial udevadm trigger --action=ADD). We relied on udev init script to set the ENV{STARTUP}=1 before calling the trigger, but this solution was deprecated (as we discussed it more with upstream udev). So we came with this DM_UDEV_PRIMARY_SOURCE_FLAG checking and keeping the udev database from initrd then (which is a more correct solution anyway). Maybe this should be forwarded to Debian's lvm2 maintainer to make appropriate changes/updates. If there's any other problem, please, let me know... Peter -- ciao, Marco signature.asc Description: Digital signature
Bug#593375: udev: Doesnt create lvm symlinks
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Marco, Le 17/08/2010 20:53, Marco d'Itri a écrit : On Aug 17, Jean-Luc Coulon (f5ibh) jean-luc.cou...@wanadoo.fr wrote: After upgrade from 160 to 161, udev doesnt create lvm volumes symlinks any more. Is this fixed if you s#rm -rf /dev/.udev/failed/#rm -rf /dev/.udev/# in /etc/init.d/udev ? Yes! I've no more these error messages this way. Regards Jean-Luc -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFMavCRUdGGXzzGnNARAuXuAKCfGY7QwfpXjOzvkScoNb23BWRtIgCgoP7C 1stxkm5kijK7Fazk/OeYDm4= =VyAT -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#593375: udev: Doesnt create lvm symlinks
After I started not deleting the initramfs database as you asked, I received multiple bug reports like this one. Version of LVM in Debian is 2.02.66-2, please advise. On Aug 17, Jean-Luc Coulon (f5ibh) jean-luc.cou...@wanadoo.fr wrote: Package: udev Version: 160-1 Severity: normal -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, After upgrade from 160 to 161, udev doesnt create lvm volumes symlinks any more. Here is the related part of the boot log: Tue Aug 17 09:05:00 2010: Starting early crypto disks...done. Tue Aug 17 09:05:00 2010: Cleaning up ifupdown Tue Aug 17 09:05:00 2010: Setting up networking Tue Aug 17 09:05:00 2010: Loading kernel modules...done. Tue Aug 17 09:05:00 2010: Setting up LVM Volume Groups Reading all physical volumes. This may take a while... Tue Aug 17 09:05:00 2010: Found volume group vg00 using metadata type lvm2 Tue Aug 17 09:05:00 2010: Found volume group cryptvg00 using metadata type lvm2 Tue Aug 17 09:05:00 2010: The link /dev/vg00/root_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/home_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/tmp_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/swap_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/mail_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/photos1_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/music_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/photos_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/snap_home should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: 6 logical volume(s) in volume group vg00 now active Tue Aug 17 09:05:00 2010: 8 logical volume(s) in volume group cryptvg00 now active Tue Aug 17 09:05:00 2010: . Tue Aug 17 09:05:00 2010: Starting remaining crypto disks...done. Tue Aug 17 09:05:00 2010: Activating lvm and md swap...done. Reverting to 160 fixes the problem. Regards Jean-Luc - -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (900, 'unstable'), (700, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.35-k8-2 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages udev depends on: ii cdebconf [debconf-2.0] 0.150 Debian Configuration Management Sy ii debconf [debconf-2.0]1.5.35 Debian configuration management sy ii libc62.11.2-2Embedded GNU C Library: Shared lib ii libselinux1 2.0.96-1SELinux runtime shared libraries ii libudev0 160-1 libudev shared library ii libusb-0.1-4 2:0.1.12-15 userspace USB programming library ii lsb-base 3.2-23.1Linux Standard Base 3.2 init scrip ii util-linux 2.17.2-3.1 Miscellaneous system utilities Versions of packages udev recommends: ii pciutils 1:3.1.7-4 Linux PCI Utilities ii usbutils 0.87-5 Linux USB utilities udev suggests no packages. - -- debconf information: udev/new_kernel_needed: false udev/title/upgrade: udev/reboot_needed: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFMasahUdGGXzzGnNARAnDmAJ9g1eMc14wKDniIrQwy1zlt4ES3BwCgqwYe PWvXOLcSOEu128vUBuZMRxk= =m0kN -END PGP SIGNATURE- -- ciao, Marco signature.asc Description: Digital signature
Bug#593375: udev: Doesnt create lvm symlinks
Package: udev Version: 160-1 Severity: normal -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, After upgrade from 160 to 161, udev doesnt create lvm volumes symlinks any more. Here is the related part of the boot log: Tue Aug 17 09:05:00 2010: Starting early crypto disks...done. Tue Aug 17 09:05:00 2010: Cleaning up ifupdown Tue Aug 17 09:05:00 2010: Setting up networking Tue Aug 17 09:05:00 2010: Loading kernel modules...done. Tue Aug 17 09:05:00 2010: Setting up LVM Volume Groups Reading all physical volumes. This may take a while... Tue Aug 17 09:05:00 2010: Found volume group vg00 using metadata type lvm2 Tue Aug 17 09:05:00 2010: Found volume group cryptvg00 using metadata type lvm2 Tue Aug 17 09:05:00 2010: The link /dev/vg00/root_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/home_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/tmp_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/swap_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/mail_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/photos1_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/music_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/photos_lv should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: The link /dev/cryptvg00/snap_home should had been created by udev but it was not found. Falling back to direct link creation. Tue Aug 17 09:05:00 2010: 6 logical volume(s) in volume group vg00 now active Tue Aug 17 09:05:00 2010: 8 logical volume(s) in volume group cryptvg00 now active Tue Aug 17 09:05:00 2010: . Tue Aug 17 09:05:00 2010: Starting remaining crypto disks...done. Tue Aug 17 09:05:00 2010: Activating lvm and md swap...done. Reverting to 160 fixes the problem. Regards Jean-Luc - -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (900, 'unstable'), (700, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.35-k8-2 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages udev depends on: ii cdebconf [debconf-2.0] 0.150 Debian Configuration Management Sy ii debconf [debconf-2.0]1.5.35 Debian configuration management sy ii libc62.11.2-2Embedded GNU C Library: Shared lib ii libselinux1 2.0.96-1SELinux runtime shared libraries ii libudev0 160-1 libudev shared library ii libusb-0.1-4 2:0.1.12-15 userspace USB programming library ii lsb-base 3.2-23.1Linux Standard Base 3.2 init scrip ii util-linux 2.17.2-3.1 Miscellaneous system utilities Versions of packages udev recommends: ii pciutils 1:3.1.7-4 Linux PCI Utilities ii usbutils 0.87-5 Linux USB utilities udev suggests no packages. - -- debconf information: udev/new_kernel_needed: false udev/title/upgrade: udev/reboot_needed: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFMasahUdGGXzzGnNARAnDmAJ9g1eMc14wKDniIrQwy1zlt4ES3BwCgqwYe PWvXOLcSOEu128vUBuZMRxk= =m0kN -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#593375: udev: Doesnt create lvm symlinks
On Aug 17, Jean-Luc Coulon (f5ibh) jean-luc.cou...@wanadoo.fr wrote: After upgrade from 160 to 161, udev doesnt create lvm volumes symlinks any more. Is this fixed if you s#rm -rf /dev/.udev/failed/#rm -rf /dev/.udev/# in /etc/init.d/udev ? -- ciao, Marco signature.asc Description: Digital signature