non configurable behaviour for lvm2 through lvm.conf in initramfs use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lvm2
This is a fresh Ubuntu 8.04 install, though the problem affects apparently as well to 8.10.
The lvm2 2.02.26-1ubuntu9 package installs a hook and a script to bring lvm support in initramfs at boot time, but it doesn't copy in the /etc/lvm/lvm.conf configuration file to the initrd filesystem, so the default behaviour applies on LVs detection.
As part of this default behaviour, all devices are scanned looking for LVs.
The real problem arises when the PVs are devices like multipath ones, which are not created yet at initrd boot stage. In this case the LVs are detected and updated in the device-mapper tables as linear dms directly attached to the first path that LVM finds.
The problem apparently could be thought as solved adding support for multipath in the initrd as well, but not, because LVM would detect the LVs through each one of the paths and the multipath device as well.
A reasonable way to correct this non wanted behaviour is to let LVM conform to a lvm.conf file included in the initrd, which would filter the appropriate devices for LVs detection. In fact, this lvm.conf file could be a copy of the customized system configuration /etc/lvm/lvm.conf.
See proposed patch to /usr/share/
Regards
Roberto
Changed in lvm2 (Ubuntu): | |
status: | New → Confirmed |
This patch solved a very annoying issue for me.
I have 2 disks in software-raid1 (mdadm). This raid1-array got degraded after switching a scsi-card.
After a reboot LVM2 claimed /dev/sdb instead of /dev/md0 as its physical volume.
Because LVM2 claims the disk, it wasn't possible to rebuild the raid-array.
Adding sda and sdb to the filter in lvm.conf or enabling md_component_ detection didn't help. After adding lvm.conf to initrd the problem was solved.
regards,
Theo