← Back to team overview

touch-packages team mailing list archive

[Bug 1490088] Re: 15.10: pvs/pvscan/pvdisplay not recognising PV metadata when lvmetad is running

 

** Changed in: lvm2 (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lvm2 in Ubuntu.
https://bugs.launchpad.net/bugs/1490088

Title:
  15.10: pvs/pvscan/pvdisplay not recognising PV metadata when lvmetad
  is running

Status in lvm2 package in Ubuntu:
  Triaged

Bug description:
  Working on a 14.04 amd64 host with a 15.10 chroot I found that several
  PV tools cannot recognise PVs created on 14.04.

  As a test on 14.04 I created 2 test loop device files and used
  pvcreate on them (loop0 has zero metadata copies).

  ## In 14.04:

  $ sudo losetup -vf /var/lib/schroot/metadata-test.bin
  Loop device is /dev/loop0
  $ sudo losetup -vf /var/lib/schroot/metadata-test-2.bin
  Loop device is /dev/loop1
  $ sudo losetup -a
  /dev/loop0: [fc17]:2612 (/var/lib/schroot/metadata-test.bin)
  /dev/loop1: [fc17]:2613 (/var/lib/schroot/metadata-test-2.bin)
  $ file -s /dev/loop[0-1]
  /dev/loop0: LVM2 PV (Linux Logical Volume Manager), UUID: t304eP-t7dr-z52W-7Agt-nEdB-Kv7G-3dNObh, size: 1073741824
  /dev/loop1: LVM2 PV (Linux Logical Volume Manager), UUID: 6194QF-wn0J-69C4-WCVc-rFxw-XwXJ-3fMXXb, size: 524288000
  $ blkid /dev/loop[0-1]
  /dev/loop0: UUID="t304eP-t7dr-z52W-7Agt-nEdB-Kv7G-3dNObh" TYPE="LVM2_member"
  /dev/loop1: UUID="6194QF-wn0J-69C4-WCVc-rFxw-XwXJ-3fMXXb" TYPE="LVM2_member"
  $ sudo pvck /dev/loop[0-1]
    Found label on /dev/loop0, sector 0, type=LVM2 001
    Found label on /dev/loop1, sector 1, type=LVM2 001
    Found text metadata area: offset=4096, size=1044480

  $ sudo pvs /dev/loop[0-1]
    PV         VG   Fmt  Attr PSize    PFree
    /dev/loop0 Test lvm2 a--  1020.00m 1020.00m
    /dev/loop1 Test lvm2 a--   496.00m  496.00m

  ## In 15.10

  # file -s /dev/loop[0-1]
  /dev/loop0: LVM2 PV (Linux Logical Volume Manager), UUID: t304eP-t7dr-z52W-7Agt-nEdB-Kv7G-3dNObh, size: 1073741824
  /dev/loop1: LVM2 PV (Linux Logical Volume Manager), UUID: 6194QF-wn0J-69C4-WCVc-rFxw-XwXJ-3fMXXb, size: 524288000
  # blkid /dev/loop[0-1]
  /dev/loop0: UUID="t304eP-t7dr-z52W-7Agt-nEdB-Kv7G-3dNObh" TYPE="LVM2_member"
  /dev/loop1: UUID="6194QF-wn0J-69C4-WCVc-rFxw-XwXJ-3fMXXb" TYPE="LVM2_member"
  # pvck /dev/loop[0-1]
    Found label on /dev/loop0, sector 0, type=LVM2 001
    Found label on /dev/loop1, sector 1, type=LVM2 001
    Found text metadata area: offset=4096, size=1044480

  # pvs /dev/loop[0-1]
    Failed to find physical volume "/dev/loop0".
    Failed to find physical volume "/dev/loop1".

  ## In the 15.10 chroot I created another loop device file and used
  pvcreate on it.

  # losetup -vf /var/lib/schroot/metadata-test-3.bin
  # losetup -a
  /dev/loop0: [64535]:2612 (/var/lib/schroot/metadata-test.bin)
  /dev/loop1: [64535]:2613 (/var/lib/schroot/metadata-test-2.bin)
  /dev/loop2: [64535]:1056349 (/var/lib/schroot/metadata-test-3.bin)
  # file -s /dev/loop2
  /dev/loop2: LVM2 PV (Linux Logical Volume Manager), UUID: 7auwAs-qqGs-MZ0c-ns74-jdlh-kGOS-s8kJjE, size: 629145600
  # blkid /dev/loop2
  /dev/loop2: UUID="7auwAs-qqGs-MZ0c-ns74-jdlh-kGOS-s8kJjE" TYPE="LVM2_member"
  # pvck /dev/loop2
    Found label on /dev/loop2, sector 1, type=LVM2 001
    Found text metadata area: offset=4096, size=1044480
  # pvs /dev/loop2
    PV         VG   Fmt  Attr PSize   PFree
    /dev/loop2      lvm2 ---  600.00m 600.00m

  ## In the 14.04 host

  $ sudo losetup -a
  /dev/loop0: [fc17]:2612 (/var/lib/schroot/metadata-test.bin)
  /dev/loop1: [fc17]:2613 (/var/lib/schroot/metadata-test-2.bin)
  /dev/loop2: [fc17]:1056349 (/var/lib/schroot/metadata-test-3.bin)
  $ file -s /dev/loop2
  /dev/loop2: LVM2 PV (Linux Logical Volume Manager), UUID: 7auwAs-qqGs-MZ0c-ns74-jdlh-kGOS-s8kJjE, size: 629145600
  $ blkid /dev/loop2
  /dev/loop2: UUID="7auwAs-qqGs-MZ0c-ns74-jdlh-kGOS-s8kJjE" TYPE="LVM2_member"
  $ sudo pvck /dev/loop2
    Found label on /dev/loop2, sector 1, type=LVM2 001
    Found text metadata area: offset=4096, size=1044480
  $ sudo pvs /dev/loop2
    PV         VG   Fmt  Attr PSize   PFree
    /dev/loop2      lvm2 a--  600.00m 600.00m

  
  ## 14.04
  apt-cache policy lvm2
  lvm2:
    Installed: 2.02.98-6ubuntu2
    Candidate: 2.02.98-6ubuntu2
    Version table:
   *** 2.02.98-6ubuntu2 0
          500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
          100 /var/lib/dpkg/status

  ## 15.10
  # apt-cache policy lvm2
  lvm2:
    Installed: 2.02.122-1ubuntu1
    Candidate: 2.02.122-1ubuntu1
    Version table:
   *** 2.02.122-1ubuntu1 0
          500 http://archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
          100 /var/lib/dpkg/status

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


References