update-grub error: physical volume pv0 not found.

Bug #1014159 reported by Munzir Taha (منذر طه)
96
This bug affects 20 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am getting lots of error: physical volume pv0 not found when I have a kernel update. I managed to reproduce the problem with update-grub.

root@server8:~# update-grub
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
Generating grub.cfg ...
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
Found linux image: /boot/vmlinuz-3.2.0-25-generic
Found initrd image: /boot/initrd.img-3.2.0-25-generic
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
Found memtest86+ image: /memtest86+.bin
done

# lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

root@server8:~# vgdisplay -vv
      Setting global/locking_type to 1
      Setting global/wait_for_locks to 1
      File-based locking selected.
      Setting global/locking_dir to /var/lock/lvm
    Finding all volume groups
      /dev/ram0: No label detected
      /dev/dm-0: No label detected
      /dev/ram1: No label detected
      /dev/sda1: No label detected
      /dev/ram2: No label detected
      /dev/ram3: No label detected
      /dev/ram4: No label detected
      /dev/ram5: No label detected
      /dev/sda5: No label detected
      /dev/ram6: No label detected
      /dev/sda6: No label detected
      /dev/ram7: No label detected
      /dev/sda7: lvm2 label detected
      /dev/ram8: No label detected
      /dev/ram9: No label detected
      /dev/ram10: No label detected
      /dev/ram11: No label detected
      /dev/ram12: No label detected
      /dev/ram13: No label detected
      /dev/ram14: No label detected
      /dev/ram15: No label detected
      /dev/sdb: lvm2 label detected
    Finding volume group "vg_server8"
      Locking /var/lock/lvm/V_vg_server8 RB
      /dev/sda7: lvm2 label detected
      /dev/sdb: lvm2 label detected
  --- Volume group ---
  VG Name vg_server8
  System ID
  Format lvm2
  Metadata Areas 2
  Metadata Sequence No 2
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 1
  Open LV 1
  Max PV 0
  Cur PV 2
  Act PV 2
  VG Size 339.58 GiB
  PE Size 4.00 MiB
  Total PE 86932
  Alloc PE / Size 84480 / 330.00 GiB
  Free PE / Size 2452 / 9.58 GiB
  VG UUID IrUtdp-Oeps-hBeW-Ou9w-EWcj-XaFj-dvf0lU

  --- Logical volume ---
  LV Name /dev/vg_server8/lv_home
  VG Name vg_server8
  LV UUID kJwNH2-J001-REtG-tAUd-k7Uc-2qMw-LvyE1X
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 330.00 GiB
  Current LE 84480
  Segments 2
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:0

  --- Physical volumes ---
  PV Name /dev/sda7
  PV UUID gNtuzp-QLgW-gB3u-W0wa-M6cF-DSUB-OpuU5i
  PV Status allocatable
  Total PE / Free PE 39285 / 2452

  PV Name /dev/sdb
  PV UUID XnCXZq-le9b-YO6L-tiW4-W2Dg-EsU2-izzrLR
  PV Status allocatable
  Total PE / Free PE 47647 / 0

      Unlocking /var/lock/lvm/V_vg_server8

root@server8:~# lvdisplay
  --- Logical volume ---
  LV Name /dev/vg_server8/lv_home
  VG Name vg_server8
  LV UUID kJwNH2-J001-REtG-tAUd-k7Uc-2qMw-LvyE1X
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 330.00 GiB
  Current LE 84480
  Segments 2
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 252:0

root@server8:~# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext4 29G 21G 7.1G 75% /
udev devtmpfs 7.9G 12K 7.9G 1% /dev
tmpfs tmpfs 3.2G 340K 3.2G 1% /run
none tmpfs 5.0M 8.0K 5.0M 1% /run/lock
none tmpfs 7.9G 0 7.9G 0% /run/shm
/dev/sda1 ext2 228M 27M 189M 13% /boot
/dev/mapper/vg_server8-lv_home ext4 330G 157G 158G 50% /home

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: grub-pc 1.99-21ubuntu3.1
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic 3.2.18
Uname: Linux 3.2.0-25-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Sun Jun 17 02:06:08 2012
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
SirG (sirg-nj) wrote :

Reproducible with:
# grub-probe xyz

, which on my machine produces 4 errors ('xyz' can be any meaningless string, of course):
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
error: physical volume pv0 not found.
grub-probe: error: failed to get canonical path of xyz.

'grub-prove -v xyz' has these relevant lines:
...
grub-probe: info: Scanning for mdraid09 RAID devices on disk bass-swap_1.
error: physical volume pv0 not found.
grub-probe: info: Scanning for mdraid09 RAID devices on disk bass-root.
error: physical volume pv0 not found.
...
grub-probe: info: Scanning for mdraid1x RAID devices on disk bass-swap_1.
error: physical volume pv0 not found.
grub-probe: info: Scanning for mdraid1x RAID devices on disk bass-root.
error: physical volume pv0 not found.
...

The devices, that appear to trigger the whining, are LVM volumes on a drive, that has a partition used as a PV; an ext2 boot partition is on the same drive. There are other volumes, but not on the same PV (but in the same VG). No RAID is in use on the system.

I am reluctant to do much experimentation with this machine: it's a live production box.

Revision history for this message
Brooks B (bmbeverst) wrote :

This bug is also presenit in debian Wheezy 7.4.0 amd64.

Revision history for this message
Phillip Susi (psusi) wrote :

Please provide the output of blkid and pvs.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

root@server8:~# blkid
/dev/sda7: UUID="gNtuzp-QLgW-gB3u-W0wa-M6cF-DSUB-OpuU5i" TYPE="LVM2_member"
/dev/sda1: UUID="09d55b36-a460-4702-88d5-fc4e8fd402ad" TYPE="ext2"
/dev/sda5: UUID="08e954c1-5bfc-45bd-b4a2-a7e4ea683fe5" TYPE="swap"
/dev/sda6: UUID="b0fcb305-f97b-47af-9c4a-f698d3076342" TYPE="ext4"
/dev/mapper/vg_server8-lv_home: UUID="b9e98e11-dd10-4bb7-bc67-31c421ebb583" TYPE="ext4"
/dev/sdb: UUID="XnCXZq-le9b-YO6L-tiW4-W2Dg-EsU2-izzrLR" TYPE="LVM2_member"
root@server8:~# pvs
  PV VG Fmt Attr PSize PFree
  /dev/sda7 vg_server8 lvm2 a- 153.46g 9.58g
  /dev/sdb vg_server8 lvm2 a- 186.12g 0

Changed in grub2 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

Can you please run sudo grub-probe -vv /

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :
Download full text (39.5 KiB)

root@server8:~# grub-probe -vv /
grub-probe: info: cannot open `/boot/grub/device.map'.
util/deviceiter.c:402: Already seen /dev/sda (/dev/sda)
util/deviceiter.c:402: Already seen /dev/sdb (/dev/sdb)
util/deviceiter.c:935: vg_server8-lv_home is not DM-RAID
util/deviceiter.c:935: vg_server8-lv_home is not DM-RAID
grub-core/disk/raid.c:740: Scanning for dmraid_nv RAID devices on disk hd0
grub-probe: info: Scanning for dmraid_nv RAID devices on disk hd0.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 390328320.
grub-core/kern/emu/hostdisk.c:837: opening the device `/dev/sda' in open_device()
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 390328320.
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/disk/raid.c:740: Scanning for dmraid_nv RAID devices on disk hd1
grub-probe: info: Scanning for dmraid_nv RAID devices on disk hd1.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 390328320.
grub-core/kern/emu/hostdisk.c:837: opening the device `/dev/sdb' in open_device()
grub-core/kern/disk.c:338: Closing `hd1'.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 390328320.
grub-core/kern/disk.c:338: Closing `hd1'.
grub-probe: info: scanning hd0 for LVM.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 390328320.
grub-core/kern/emu/hostdisk.c:837: opening the device `/dev/sda' in open_device()
grub-probe: info: no LVM signature found.
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 390328320.
grub-core/kern/disk.c:338: Closing `hd0'.
grub-probe: info: scanning hd1 for LVM.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 390328320.
grub-core/kern/emu/hostdisk.c:837: opening the device `/dev/sdb' in open_device()
grub-core/kern/emu/hostdisk.c:815: reusing open device `/dev/sdb'
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 390328320.
grub-core/kern/disk.c:338: Closing `hd1'.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 390328320.
grub-core/kern/disk.c:338: Closing `hd1'.
grub-core/disk/raid.c:740: Scanning for mdraid09 RAID devices on disk vg_server8-lv_home
grub-probe: info: Scanning for mdraid09 RAID devices on disk vg_server8-lv_home.
grub-core/kern/disk.c:245: Opening `vg_server8-lv_home'...
grub-core/kern/disk.c:471: vg_server8-lv_home read failed
error: physical volume pv0 not found.
grub-core/kern/disk.c:338: Closing `vg_server8-lv_home'.
grub-core/kern/disk.c:245: Opening `vg_server8-lv_home'...
grub-core/kern/disk.c:338: Closing `vg_server8-lv_home'.
grub-core/disk/raid.c:740: Scanning for mdraid09 RAID devices on disk hd0
grub-probe: info: Scanning for mdraid09 RAID devices on disk hd0.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 390328320.
grub-core/kern/emu/hostdisk.c:837: opening the device `/dev/sda' in open_device()
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the si...

Revision history for this message
Phillip Susi (psusi) wrote :

Very strange. It looks like it is detecting the two physical volumes just fine.

Revision history for this message
L-reimann (l-reimann) wrote :
Download full text (29.3 KiB)

grub-probe -vv /
grub-core/disk/raid.c:740: Scanning for dmraid_nv RAID devices on disk hd0
grub-probe: info: Scanning for dmraid_nv RAID devices on disk hd0.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 1952448512.
grub-core/kern/emu/hostdisk.c:722: opening the device `/dev/sda' in open_device()
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 1952448512.
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/disk/raid.c:740: Scanning for dmraid_nv RAID devices on disk hd1
grub-probe: info: Scanning for dmraid_nv RAID devices on disk hd1.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 1952448512.
grub-core/kern/emu/hostdisk.c:722: opening the device `/dev/sdb' in open_device()
grub-core/kern/disk.c:338: Closing `hd1'.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 1952448512.
grub-core/kern/disk.c:338: Closing `hd1'.
grub-probe: info: scanning hd0 for LVM.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 1952448512.
grub-core/kern/emu/hostdisk.c:722: opening the device `/dev/sda' in open_device()
grub-probe: info: no LVM signature found.
grub-core/kern/disk.c:338: Closing `hd0'.
grub-core/kern/disk.c:245: Opening `hd0'...
grub-probe: info: the size of hd0 is 1952448512.
grub-core/kern/disk.c:338: Closing `hd0'.
grub-probe: info: scanning hd1 for LVM.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 1952448512.
grub-core/kern/emu/hostdisk.c:722: opening the device `/dev/sdb' in open_device()
grub-core/kern/emu/hostdisk.c:700: reusing open device `/dev/sdb'
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 1952448512.
grub-core/kern/disk.c:338: Closing `hd1'.
grub-core/kern/disk.c:245: Opening `hd1'...
grub-probe: info: the size of hd1 is 1952448512.
grub-core/kern/disk.c:338: Closing `hd1'.
grub-core/disk/raid.c:740: Scanning for mdraid09 RAID devices on disk vg00-dev1
grub-probe: info: Scanning for mdraid09 RAID devices on disk vg00-dev1.
grub-core/kern/disk.c:245: Opening `vg00-dev1'...
grub-core/kern/disk.c:471: vg00-dev1 read failed
error: physical volume pv0 not found.
grub-core/kern/disk.c:338: Closing `vg00-dev1'.
grub-core/kern/disk.c:245: Opening `vg00-dev1'...
grub-core/kern/disk.c:338: Closing `vg00-dev1'.
grub-core/disk/raid.c:740: Scanning for mdraid09 RAID devices on disk vg00-dev2
grub-probe: info: Scanning for mdraid09 RAID devices on disk vg00-dev2.
grub-core/kern/disk.c:245: Opening `vg00-dev2'...
grub-core/kern/disk.c:471: vg00-dev2 read failed
error: physical volume pv0 not found.
grub-core/kern/disk.c:338: Closing `vg00-dev2'.
grub-core/kern/disk.c:245: Opening `vg00-dev2'...
grub-core/kern/disk.c:338: Closing `vg00-dev2'.
grub-core/disk/raid.c:740: Scanning for mdraid09 RAID devices on disk vg00-dev3
grub-probe: info: Scanning for mdraid09 RAID devices on disk vg00-dev3.
grub-core/kern/disk.c:245: Opening `vg00-dev3'...
grub-core/kern/disk.c:471: vg00-dev3 read failed
error: physical volume pv0 not found.
grub-core/kern/disk.c:338: Closing `vg00-dev3'.
gru...

Revision history for this message
Lisa Simpson (lisa-p) wrote :

I am seeing this as well on one of my production servers with exactly the same symptoms. We added a LVM because we have a database that is continuing to grow and which will eventually reach an unknown as yet size. Since adding the LVM, we obtain the "cannot locate device pv0" each time we run update-grub or update-grub2. The machine otherwise seems to reboot properly and function properly. HOwever, we are planning to do a "do-release-upgrade" on it soon so we'd like to get this resolved before the upgrade to from Precise LTS to Trusty LTS.

Revision history for this message
Lisa Simpson (lisa-p) wrote :

Count me in as being affected by this.

Revision history for this message
Roger Lehmann (roger-lehmann-u) wrote :

As seen on https://bbs.archlinux.org/viewtopic.php?id=160785 one of those hardworking colleagues stated that this error happens when a LVM volume is extended.
I extended my LVM group with another disk so the bug affects me, too.

Revision history for this message
Josef Möllers (jmoellers) wrote :

I'm also affected.
I'll put some pressure on myself: I'll try to find some time to help on this one.

Revision history for this message
Josef Möllers (jmoellers) wrote :

In my case the problem was that my "pv0" device was not in "/boot/grub/device.map".
Once I added
(hd3) /dev/sdd
the error disappeared, but this error now appears:
grub-probe: error: unknown filesystem.

Revision history for this message
Josef Möllers (jmoellers) wrote :

Ahhh ... OK ... PEBKAC:
"grub-probe /" returns "ext3".
Let's see what happens once I reboot, can't do that now.

Revision history for this message
Josef Möllers (jmoellers) wrote :

Reboot has succeeded, now I'm waiting for the next kernel update.

Revision history for this message
Josef Möllers (jmoellers) wrote :

With the modification mentioned above, a kernel upgrade does not produce the error message any mode.
Maybe "vgextend" or "pvcreate" should make sure the device is in the "device.map"?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.