Bug#885660: lvm2: vgchange -ay has a race condition in symlink creation
Karl O. Pinc
kop at meme.com
Thu Dec 28 22:51:08 UTC 2017
Package: lvm2
Version: 2.02.168-2
Severity: normal
Hi,
After upgrade from Jessie to Stretch I now see a race condition in
'vgchange -ay'.
I've a shell script that does a 'vgchange -ay' and on success proceeds
to mount the newly active logical volumes. Now, about 1 in 10 times,
the symlinks in /dev/$VGNAME/$LVNAME (and
/dev/mapper/${VGNAME}-${LVNAME}, I've tried both) do not yet exist
after vgchange exits and the mount commands fail. Looking at /dev/
afterwards shows the symlinks do exist, hence a race condition.
The workaround I am trying is to sleep 1 second after vgchange.
(This is lame. Other suggestions would be appreciated. :)
See also Bug#795867.
-- System Information:
Debian Release: 9.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.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.137-2
ii dmsetup 2:1.02.137-2
ii init-system-helpers 1.48
ii libblkid1 2.29.2-1
ii libc6 2.24-11+deb9u1
ii libdevmapper-event1.02.1 2:1.02.137-2
ii libdevmapper1.02.1 2:1.02.137-2
ii liblvm2app2.2 2.02.168-2
ii libreadline5 5.2+dfsg-3+b1
ii libudev1 232-25+deb9u1
ii lsb-base 9.20161125
lvm2 recommends no packages.
Versions of packages lvm2 suggests:
pn thin-provisioning-tools <none>
-- no debconf information
More information about the pkg-lvm-maintainers
mailing list