Comment 2 for bug 282189

Revision history for this message
Hugo Josefson (hugojosefson) wrote :

Found a workaround that helps in my specific case.

I use only one LV in the VG, so the way I can make sure "dmsetup deps" will report that the LV depends on all PV:s, is by making the LV large enough that it spreads out across the entire VG. Note! I do not need to resize the file system, just extend the LV.

Before:
$ sudo dmsetup deps /dev/mapper/VGsafe-LVroot
1 dependencies : (254, 0)

Workaround:
$ sudo lvextend -L +1000G /dev/mapper/VGsafe-LVroot
  Extending logical volume LVroot to 1.66 TB

After:
$ sudo dmsetup deps /dev/mapper/VGsafe-LVroot
6 dependencies : (254, 5) (254, 4) (254, 3) (254, 2) (254, 1) (254, 0)

If "dmsetup deps" is supposed to work the way it does, I agree with Tony Lewis that initramfs-tools should have a better way of detecting required devices for a LV.