[Bug 1539934] Re: Load thin Kernel Modules in initramfs for support on boot

Travisgevans 1539934 at bugs.launchpad.net
Wed Apr 6 20:39:39 UTC 2016


I was able to use this hook to get Ubuntu 15.10 installed and running
from a thin LVM volume in a VirtualBox VM.

However, the lvm2-monitor service seems wonky if started from the
initramfs, strange errors like:

<volumegroup>-<lvpool>-tpool: event registration failed: 2561:11
libdevmapper-event-lvm2thin.so dlopen failed: /lib/x86_64-linux-gnu
/device-mapper/libdevmapper-event-lvm2thin.so: cannot open shared object
file: No such file or directory

even though the library is both in the root fs and the initrd. Leaving
dmeventd and its libraries out of the initramfs seems to allow it to
function normally.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lvm2 in Ubuntu.
https://bugs.launchpad.net/bugs/1539934

Title:
  Load thin Kernel Modules in initramfs for support on boot

Status in lvm2 package in Ubuntu:
  Confirmed

Bug description:
  I have an issue where lvm2 thinpool volume groups are not
  automatically activated after reboot.

  Environmentals:
  Ubuntu Server 15.10, minimal install
  UEFI/Secure Boot in use
  Ubuntu 15.10 (GNU/Linux 4.2.0-25-generic x86_64)

  root at cluster-02:~# cat /etc/os-release
  NAME="Ubuntu"
  VERSION="15.10 (Wily Werewolf)"
  ID=ubuntu
  ID_LIKE=debian
  PRETTY_NAME="Ubuntu 15.10"
  VERSION_ID="15.10"
  HOME_URL="http://www.ubuntu.com/"
  SUPPORT_URL="http://help.ubuntu.com/"
  BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

  
  Here is the volume config before adding the new volume:

  root at cluster-02:~# lvs -a
    LV         VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
    lvswap     vgraid0  -wi-ao----  29.80g
    lvtmp      vgraid0  -wi-ao----  29.80g
    lvvartmp   vgraid0  -wi-ao----  29.80g
    lvhome     vgraid10 -wi-ao----  29.80g
    lvroot     vgraid10 -wi-ao----   7.45g
    lvusr      vgraid10 -wi-ao----   7.45g
    lvvar      vgraid10 -wi-ao----   3.72g
    lvvarcache vgraid10 -wi-ao---- 119.21g
    lvvarlib   vgraid10 -wi-ao----  32.00g
    lvvarlog   vgraid10 -wi-ao----  14.90g

  I add a new thinpool volume using this command:

  lvcreate -L 1T --type thin-pool --thinpool vgraid10/lvlxc

  root at cluster-02:~# lvcreate -L 1T --type thin-pool --thinpool vgraid10/lvlxc
    Logical volume "lvlxc" created.

  Which results in this lvs:

  root at cluster-02:~# lvs -a
    LV              VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
    lvswap          vgraid0  -wi-ao----  29.80g
    lvtmp           vgraid0  -wi-ao----  29.80g
    lvvartmp        vgraid0  -wi-ao----  29.80g
    lvhome          vgraid10 -wi-ao----  29.80g
    lvlxc           vgraid10 twi-a-tz--   1.00t             0.00   0.42
    [lvlxc_tdata]   vgraid10 Twi-ao----   1.00t
    [lvlxc_tmeta]   vgraid10 ewi-ao---- 128.00m
    [lvol0_pmspare] vgraid10 ewi------- 128.00m
    lvroot          vgraid10 -wi-ao----   7.45g
    lvusr           vgraid10 -wi-ao----   7.45g
    lvvar           vgraid10 -wi-ao----   3.72g
    lvvarcache      vgraid10 -wi-ao---- 119.21g
    lvvarlib        vgraid10 -wi-ao----  32.00g
    lvvarlog        vgraid10 -wi-ao----  14.90g

  I then create an unprivileged lxc container using the thinpool:

  root at cluster-02:~# lxc-create -B lvm --vgname=vgraid10 --thinpool=lvlxc -t download -n tmpl-centos-7-unpriv --fssize 16GB -- -d centos -r 7 -a amd64
  File descriptor 3 (/var/lib/lxc/tmpl-centos-7-unpriv/partial) leaked on lvcreate invocation. Parent PID 9118: lxc-create
    Logical volume "tmpl-centos-7-unpriv" created.
  Using image from local cache
  Unpacking the rootfs
  ...

  The lvs output:
  root at cluster-02:~# lvs -a
    LV                   VG       Attr       LSize   Pool  Origin Data%  Meta%  Move Log Cpy%Sync Convert
    lvswap               vgraid0  -wi-ao----  29.80g
    lvtmp                vgraid0  -wi-ao----  29.80g
    lvvartmp             vgraid0  -wi-ao----  29.80g
    lvhome               vgraid10 -wi-ao----  29.80g
    lvlxc                vgraid10 twi-aotz--   1.00t              0.09   0.46
    [lvlxc_tdata]        vgraid10 Twi-ao----   1.00t
    [lvlxc_tmeta]        vgraid10 ewi-ao---- 128.00m
    [lvol0_pmspare]      vgraid10 ewi------- 128.00m
    lvroot               vgraid10 -wi-ao----   7.45g
    lvusr                vgraid10 -wi-ao----   7.45g
    lvvar                vgraid10 -wi-ao----   3.72g
    lvvarcache           vgraid10 -wi-ao---- 119.21g
    lvvarlib             vgraid10 -wi-ao----  32.00g
    lvvarlog             vgraid10 -wi-ao----  14.90g
    tmpl-centos-7-unpriv vgraid10 Vwi-a-tz--  16.00g lvlxc        5.94

  
  Everything is ok at this point.  Now, I will reboot the machine.

  root at cluster-02:~# lvs -a
    LV                   VG       Attr       LSize   Pool  Origin Data%  Meta%  Move Log Cpy%Sync Convert
    lvswap               vgraid0  -wi-ao----  29.80g
    lvtmp                vgraid0  -wi-ao----  29.80g
    lvvartmp             vgraid0  -wi-ao----  29.80g
    lvhome               vgraid10 -wi-ao----  29.80g
    lvlxc                vgraid10 twi---tz--   1.00t
    [lvlxc_tdata]        vgraid10 Twi-------   1.00t
    [lvlxc_tmeta]        vgraid10 ewi------- 128.00m
    [lvol0_pmspare]      vgraid10 ewi------- 128.00m
    lvroot               vgraid10 -wi-ao----   7.45g
    lvusr                vgraid10 -wi-ao----   7.45g
    lvvar                vgraid10 -wi-ao----   3.72g
    lvvarcache           vgraid10 -wi-ao---- 119.21g
    lvvarlib             vgraid10 -wi-ao----  32.00g
    lvvarlog             vgraid10 -wi-ao----  14.90g
    tmpl-centos-7-unpriv vgraid10 Vwi---tz--  16.00g lvlxc

  
  At this point, the volume groups (thinpool and thin volume) are not active.  This causes issues and requires that I manually activate the volumes:

  root at cluster-02:~# lvchange -ay vgraid10/lvlxc
  root at cluster-02:~# lvs -a
    LV                   VG       Attr       LSize   Pool  Origin Data%  Meta%  Move Log Cpy%Sync Convert
    lvswap               vgraid0  -wi-ao----  29.80g
    lvtmp                vgraid0  -wi-ao----  29.80g
    lvvartmp             vgraid0  -wi-ao----  29.80g
    lvhome               vgraid10 -wi-ao----  29.80g
    lvlxc                vgraid10 twi-aotz--   1.00t              0.09   0.46
    [lvlxc_tdata]        vgraid10 Twi-ao----   1.00t
    [lvlxc_tmeta]        vgraid10 ewi-ao---- 128.00m
    [lvol0_pmspare]      vgraid10 ewi------- 128.00m
    lvroot               vgraid10 -wi-ao----   7.45g
    lvusr                vgraid10 -wi-ao----   7.45g
    lvvar                vgraid10 -wi-ao----   3.72g
    lvvarcache           vgraid10 -wi-ao---- 119.21g
    lvvarlib             vgraid10 -wi-ao----  32.00g
    lvvarlog             vgraid10 -wi-ao----  14.90g
    tmpl-centos-7-unpriv vgraid10 Vwi---tz--  16.00g lvlxc

  I have tried setting flags on the thinpool (vgraid10/lvlxc) as
  follows, to no avail:

  root at cluster-02:~# lvchange -kn vgraid10/lvlxc
  root at cluster-02:~# lvchange -ay vgraid10/lvlxc
  root at cluster-02:~# lvchange -aye vgraid10/lvlxc

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1539934/+subscriptions



More information about the foundations-bugs mailing list