Bug#719335: lvm2: LVM fails to detect BCACHE-based physical volumes
Stefanos Harhalakis
v13 at v13.gr
Sat Aug 10 22:31:20 UTC 2013
Package: lvm2
Version: 2.02.95-7
Severity: important
Tags: patch
Hi,
I started using bcache and I've experienced two problems in two
different installations, both related to LVM:
Case 1: When using LVM for the root FS and the physical volume is a
bcache device the LVM fails to detect the PV. The reason is that bcache
works with udev rules which may need some time to be triggered. More
specifically, in this case I had an MD-raid-1 and an SSD device combined
as a bcache device which is then used as PV. During the boot process LVM
runs after mdadm but that time between them is not enough for the udev
rules (inside initramfs) to present the bcache device and thus LVM does
not detect it. Adding a timetout in the initramfs lvm script does the
trick
Case 2: That's more tricky: Using LVM on an SSD. Then using one of the
LVs as the cache device for bcache which is then used as PV for LVM.
IOW: LVM over BCACHE over LVM. Here the problem is that the init scripts
need another round of VG activation in order to detect the second layer
of LVM.
The attached patch fixes both of this cases. I'm not sure if there's a
more optimal way of achieving this.
Thanks,
Stefanos
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.10.5-v2-v (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages lvm2 depends on:
ii dmsetup 2:1.02.74-7
ii initscripts 2.88dsf-41
ii libc6 2.17-7
ii libdevmapper-event1.02.1 2:1.02.74-7
ii libdevmapper1.02.1 2:1.02.74-7
ii libreadline5 5.2+dfsg-2
ii libudev0 175-7.2
ii lsb-base 4.1+Debian12
lvm2 recommends no packages.
lvm2 suggests no packages.
-- Configuration Files:
/etc/init.d/lvm2 changed [not included]
/etc/lvm/lvm.conf changed [not included]
-- debconf-show failed
-- debsums errors found:
debsums: changed file /usr/share/initramfs-tools/scripts/local-top/lvm2 (from lvm2 package)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcache.patch
Type: text/x-diff
Size: 874 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20130810/04c204a6/attachment.patch>
More information about the pkg-lvm-maintainers
mailing list