Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
* On Fri, Aug 07, 2015 12:08PM +0200 I wrote: Package: lvm2 Version: 2.02.126-2 Followup-For: Bug #792002 I found that changing ExecStart=/sbin/lvm vgchange --monitor y --ignoreskippedcluster to ExecStart=/sbin/lvm vgchange --activate y --monitor y --ignoreskippedcluster The problem seems to have resolved with the latest unstable version (2.02.126-3). Thanks, Michael -- PGP-Key-ID: EEE7D043 Jabber: in...@jabber.de
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
Package: lvm2 Version: 2.02.126-2 Followup-For: Bug #792002 Dear Maintainer, I'm running into a slightly different problem. I too have root/swap encrypted and they are mounted at boot time. My other encrypted volumes though are not (and they cause the timeout delay at boot time). Those volumes are luks encrypted on a lvm volume group. # lsblk /dev/sdb6 NAMEMAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb6 8:22 0 1.3T 0 part ├─knecht40-var 254:1028G 0 lvm │ └─var_crypt 254:5028G 0 crypt /var ├─knecht40-home 254:20 372.5G 0 lvm │ └─home_crypt 254:60 372.5G 0 crypt /home └─knecht40-tmp 254:3028G 0 lvm └─tmp_crypt 254:4028G 0 crypt /tmp The system boots into maintenace mode but the logical volumes are INACTIVE. After manually running vgchange --activate y the lvs are activated and the luks containers are opened and automounted as intended. Here's the complete setup lsblk /dev/sda1 /dev/sda2 /dev/sdb5 /dev/sdb6 NAMEMAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda1 8:10 142M 0 part /boot sda2 8:20 23.3G 0 part └─sda2_crypt254:00 23.3G 0 crypt / sdb5 8:21 0 14.9G 0 part └─sdb5_crypt254:70 14.9G 0 crypt [SWAP] sdb6 8:22 0 1.3T 0 part ├─knecht40-var 254:1028G 0 lvm │ └─var_crypt 254:5028G 0 crypt /var ├─knecht40-home 254:20 372.5G 0 lvm │ └─home_crypt 254:60 372.5G 0 crypt /home └─knecht40-tmp 254:3028G 0 lvm └─tmp_crypt 254:4028G 0 crypt /tmp /etc/crypttab: home_crypt UUID=3c5d677c-c709-47b8-9ad5-f97ee082e6fc /etc/keys/home.key luks tmp_crypt UUID=8e2be6a6-8f7d-4c6c-acbc-3f5b6739de35 /etc/keys/tmp.key luks var_crypt UUID=f194e984-56bd-4b9e-806b-3de2fbcad477 /etc/keys/var.key luks sdb5_crypt /dev/sdb5 /dev/urandom cipher=aes-xts-plain64,size=256,swap /etc/fstab: /dev/mapper/home_crypt /home ext4defaults0 2 /dev/mapper/tmp_crypt /tmp ext4defaults0 2 /dev/mapper/var_crypt /var ext4defaults0 2 /dev/mapper/sdb5_crypt none swapsw 0 0 -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.1.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages lvm2 depends on: ii dmeventd 2:1.02.103-2 ii dmsetup 2:1.02.103-2 ii init-system-helpers 1.23 ii initscripts 2.88dsf-59.2 ii libc6 2.19-19 ii libdevmapper-event1.02.1 2:1.02.103-2 ii libdevmapper1.02.12:1.02.103-2 ii liblvm2app2.2 2.02.126-2 ii libreadline5 5.2+dfsg-3 ii libudev1 224-1 ii lsb-base 4.1+Debian13+nmu1 lvm2 recommends no packages. Versions of packages lvm2 suggests: pn thin-provisioning-tools none -- no debconf information # systemctl status lvm2-lvmetad.socket ● lvm2-lvmetad.socket - LVM2 metadata daemon socket Loaded: loaded (/lib/systemd/system/lvm2-lvmetad.socket; enabled; vendor preset: enabled) Active: active (running) since Fri 2015-08-07 08:07:40 CEST; 3h 25min ago Docs: man:lvmetad(8) Listen: /run/lvm/lvmetad.socket (Stream) # systemctl status dm-event.service ● dm-event.service - Device-mapper event daemon Loaded: loaded (/lib/systemd/system/dm-event.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2015-08-07 08:07:40 CEST; 3h 28min ago Docs: man:dmeventd(8) Main PID: 322 (dmeventd) CGroup: /system.slice/dm-event.service └─322 /sbin/dmeventd -f # systemctl status -l lvm2-monitor.service ● lvm2-monitor.service - Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling Loaded: loaded (/lib/systemd/system/lvm2-monitor.service; enabled; vendor preset: enabled) Active: active (exited) since Fri 2015-08-07 08:07:41 CEST; 3h 27min ago Docs: man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8) Process: 330 ExecStart=/sbin/lvm vgchange --monitor y --ignoreskippedcluster (code=exited, status=0/SUCCESS) Main PID: 330 (code=exited, status=0/SUCCESS) CGroup: /system.slice/lvm2-monitor.service I found that changing ExecStart=/sbin/lvm vgchange --monitor y --ignoreskippedcluster to ExecStart=/sbin/lvm vgchange --activate y --monitor y --ignoreskippedcluster in /lib/systemd/system/lvm2-monitor.service solves the problem. And the system boots normally. Up to you to value that as a crude hack or not ;) HTH, Michael ---
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
On Sun, Jul 19, 2015 at 09:19:04PM +0200, Bastian Blank wrote: On Wed, Jul 15, 2015 at 09:48:23AM -0700, j...@joshtriplett.org wrote: I just saw the bug again; looks like it's non-deterministic. There was a delay of more than a minute on lvm2-monitor.service. Can you show the output of systemctl status dm-event.service, or better the whole journal, in such case? As in, wait for the problme to reproduce, then provide the log from that boot? Sure, I can do that. - Josh Triplett -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
Moin On Wed, Jul 15, 2015 at 09:48:23AM -0700, j...@joshtriplett.org wrote: I just saw the bug again; looks like it's non-deterministic. There was a delay of more than a minute on lvm2-monitor.service. Can you show the output of systemctl status dm-event.service, or better the whole journal, in such case? Bastian -- Is truth not truth for all? -- Natira, For the World is Hollow and I have Touched the Sky, stardate 5476.4. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
On Fri, Jul 10, 2015 at 09:44:40AM -0700, Josh Triplett wrote: On Fri, Jul 10, 2015 at 09:53:01AM +0200, Peter Rajnoha wrote: On 07/10/2015 01:48 AM, Josh Triplett wrote: Package: lvm2 Version: 2.02.122-1 Severity: grave File: /lib/systemd/system/lvm2-monitor.service On a laptop with encrypted root and swap, I now get a minutes-long delay at boot time, due to lvm2-monitor. Here's the complete set of messages at boot (transcribed from a photo of the screen): Loading, please wait... /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/root /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/swap Please unlock disk sda2_crypt: /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Reading all physical volumes. This may take a while... Found volume group data using metadata type lvm2 /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. 2 logical volume(s) in volume group data now active cryptsetup: sda2_crypt set up successfully fsck from util-linux 2.26.2 /dev/mapper/data-root: clean, [...] [ ] A start job is running for Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling (59s / no limit) That last line matches the description in lvm2-monitor.service. (The preceeding lvm2 errors may or may not be related. The recurring two lines of lvmetad errors are new, as is the long delay on lvm2-monitor.service; the errors before unlocking the disk about not finding data/root and data/swap occurred with previous versions of lvm2.) If initrd is generated, the existing lvm.conf needs to be modified so the configuration is suitable for initrd environment (where I suppose lvmetad daemon is not running). So the script generating initrd needs to modify lvm.conf so that use_lvmetad=0 is used. In case lvmetad daemon is not running in initrd, which is, I suppose, exactly the case here - running lvmetad (the LVM metadata caching daemon) is not quite useful in initrd anyway as lvmetad would need to be started again after switching to root fs. So that's probably the first problem here. If those falling back to internal scanning messages appear even after switching to root fs, The above are the only such messages I see on each boot. please check if lvm2-lvmetad.socket is enabled (so it can instantiate lvm2-lvmetad.service on first socket access): systemctl status lvm2-lvmetad.socket It's active (running) on the booted system. If it's disabled then the distro needs to make sure it's always enabled so whenever use_lvmetad=1 is used, the lvm2-lvmetad.service can be instantiated automatically. Let's check these things first before debugging the lvm2-monitor.service delay... I just booted the system again, and the delay seems to have gone away. I don't know if that means it's non-deterministic, or if it only happens on the first boot after upgrade. If it's the latter, this is still a bug, but not an RC one. I just saw the bug again; looks like it's non-deterministic. There was a delay of more than a minute on lvm2-monitor.service. - Josh Triplett -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
On 07/10/2015 01:48 AM, Josh Triplett wrote: Package: lvm2 Version: 2.02.122-1 Severity: grave File: /lib/systemd/system/lvm2-monitor.service On a laptop with encrypted root and swap, I now get a minutes-long delay at boot time, due to lvm2-monitor. Here's the complete set of messages at boot (transcribed from a photo of the screen): Loading, please wait... /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/root /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/swap Please unlock disk sda2_crypt: /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Reading all physical volumes. This may take a while... Found volume group data using metadata type lvm2 /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. 2 logical volume(s) in volume group data now active cryptsetup: sda2_crypt set up successfully fsck from util-linux 2.26.2 /dev/mapper/data-root: clean, [...] [ ] A start job is running for Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling (59s / no limit) That last line matches the description in lvm2-monitor.service. (The preceeding lvm2 errors may or may not be related. The recurring two lines of lvmetad errors are new, as is the long delay on lvm2-monitor.service; the errors before unlocking the disk about not finding data/root and data/swap occurred with previous versions of lvm2.) If initrd is generated, the existing lvm.conf needs to be modified so the configuration is suitable for initrd environment (where I suppose lvmetad daemon is not running). So the script generating initrd needs to modify lvm.conf so that use_lvmetad=0 is used. In case lvmetad daemon is not running in initrd, which is, I suppose, exactly the case here - running lvmetad (the LVM metadata caching daemon) is not quite useful in initrd anyway as lvmetad would need to be started again after switching to root fs. So that's probably the first problem here. If those falling back to internal scanning messages appear even after switching to root fs, please check if lvm2-lvmetad.socket is enabled (so it can instantiate lvm2-lvmetad.service on first socket access): systemctl status lvm2-lvmetad.socket If it's disabled then the distro needs to make sure it's always enabled so whenever use_lvmetad=1 is used, the lvm2-lvmetad.service can be instantiated automatically. Let's check these things first before debugging the lvm2-monitor.service delay... -- Peter -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
On Fri, Jul 10, 2015 at 09:53:01AM +0200, Peter Rajnoha wrote: On 07/10/2015 01:48 AM, Josh Triplett wrote: Package: lvm2 Version: 2.02.122-1 Severity: grave File: /lib/systemd/system/lvm2-monitor.service On a laptop with encrypted root and swap, I now get a minutes-long delay at boot time, due to lvm2-monitor. Here's the complete set of messages at boot (transcribed from a photo of the screen): Loading, please wait... /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/root /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/swap Please unlock disk sda2_crypt: /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Reading all physical volumes. This may take a while... Found volume group data using metadata type lvm2 /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. 2 logical volume(s) in volume group data now active cryptsetup: sda2_crypt set up successfully fsck from util-linux 2.26.2 /dev/mapper/data-root: clean, [...] [ ] A start job is running for Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling (59s / no limit) That last line matches the description in lvm2-monitor.service. (The preceeding lvm2 errors may or may not be related. The recurring two lines of lvmetad errors are new, as is the long delay on lvm2-monitor.service; the errors before unlocking the disk about not finding data/root and data/swap occurred with previous versions of lvm2.) If initrd is generated, the existing lvm.conf needs to be modified so the configuration is suitable for initrd environment (where I suppose lvmetad daemon is not running). So the script generating initrd needs to modify lvm.conf so that use_lvmetad=0 is used. In case lvmetad daemon is not running in initrd, which is, I suppose, exactly the case here - running lvmetad (the LVM metadata caching daemon) is not quite useful in initrd anyway as lvmetad would need to be started again after switching to root fs. So that's probably the first problem here. If those falling back to internal scanning messages appear even after switching to root fs, The above are the only such messages I see on each boot. please check if lvm2-lvmetad.socket is enabled (so it can instantiate lvm2-lvmetad.service on first socket access): systemctl status lvm2-lvmetad.socket It's active (running) on the booted system. If it's disabled then the distro needs to make sure it's always enabled so whenever use_lvmetad=1 is used, the lvm2-lvmetad.service can be instantiated automatically. Let's check these things first before debugging the lvm2-monitor.service delay... I just booted the system again, and the delay seems to have gone away. I don't know if that means it's non-deterministic, or if it only happens on the first boot after upgrade. If it's the latter, this is still a bug, but not an RC one. - Josh Triplett -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#792002: lvm2-monitor service causes long delay at boot (encrypted root/swap)
Package: lvm2 Version: 2.02.122-1 Severity: grave File: /lib/systemd/system/lvm2-monitor.service On a laptop with encrypted root and swap, I now get a minutes-long delay at boot time, due to lvm2-monitor. Here's the complete set of messages at boot (transcribed from a photo of the screen): Loading, please wait... /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/root /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Volume group data not found Cannot process volume group data Unable to find LVM volume data/swap Please unlock disk sda2_crypt: /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. Reading all physical volumes. This may take a while... Found volume group data using metadata type lvm2 /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning. 2 logical volume(s) in volume group data now active cryptsetup: sda2_crypt set up successfully fsck from util-linux 2.26.2 /dev/mapper/data-root: clean, [...] [ ] A start job is running for Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling (59s / no limit) That last line matches the description in lvm2-monitor.service. (The preceeding lvm2 errors may or may not be related. The recurring two lines of lvmetad errors are new, as is the long delay on lvm2-monitor.service; the errors before unlocking the disk about not finding data/root and data/swap occurred with previous versions of lvm2.) - Josh Triplett -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages lvm2 depends on: ii dmeventd 2:1.02.99-1 ii dmsetup 2:1.02.99-1 ii init-system-helpers 1.23 ii initscripts 2.88dsf-59.2 ii libc6 2.19-18 ii libdevmapper-event1.02.1 2:1.02.99-1 ii libdevmapper1.02.12:1.02.99-1 ii libreadline5 5.2+dfsg-3 ii libudev1 222-1 ii lsb-base 4.1+Debian13+nmu1 lvm2 recommends no packages. Versions of packages lvm2 suggests: pn thin-provisioning-tools none -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org