not booting LVM root

Hi, I’m having a non booting system - after the boot loader it stalls at

WARNING: Failed to connect to lvmetad: No such file or directory. Falling back to internal scanning.
...
Waiting for device /dev/1 to appear: ................................................ Could not find /dev/1.
Want me to fall back to /dev/vg1/root? (Y/n)

I have no idea why it is looking in /dev/1, who told it to look there and where it’s being told to look there. :slight_smile:

There is a volume group vg1 with the creatively named logical volumes root, home and swap. There’s a separate partition /dev/sda1 for /boot.

The output of

fdisk -l

is


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d1bac

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1028095      513024   83  Linux
/dev/sda2         1028096  1953523711   976247808   8e  Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes



Disk /dev/sdc: 250.1 GB, 250059350016 bytes, 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00028eee


   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048   488396799   244197376   8e  Linux LVM


Disk /dev/sdd: 250.1 GB, 250059350016 bytes, 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0004c8ef


   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048   488396799   244197376   8e  Linux LVM


Disk /dev/sde: 16.2 GB, 16172293632 bytes, 31586511 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x7e142954


   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            3764       11955        4096   ef  EFI (FAT-12/16/32)
/dev/sde2   *       11956     8931327     4459686   17  Hidden HPFS/NTFS


Disk /dev/dm-0: 204.0 GB, 204010946560 bytes, 398458880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xd90a8739


     Device Boot      Start         End      Blocks   Id  System
/dev/dm-0p1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/dm-0p2          206848   398456831   199124992    7  HPFS/NTFS/exFAT


Disk /dev/dm-1: 204.0 GB, 204010946560 bytes, 398458880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000c9cbd


     Device Boot      Start         End      Blocks   Id  System
/dev/dm-1p1   *        2048      819199      408576   83  Linux
/dev/dm-1p2          819200   398458879   198819840   8e  Linux LVM


Disk /dev/dm-2: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/dm-3: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/dm-4: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/sdf: 2004 MB, 2004877312 bytes, 3915776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt




#         Start          End    Size  Type            Name
 1         2048      3913727    1.9G  Microsoft basic UNTITLED 1

and

lvm lvx -a -o+devices

yields

  WARNING: Failed to connect to lvmetad: No such file or directory. Falling back to internal scanning.
  LV    VG   Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert Devices         
  home  vg1  -wi-ao---  60.00g                                            /dev/sda2(0)    
  root  vg1  -wi-ao---  60.00g                                            /dev/sda2(15360)
  swap  vg1  -wi-a----   2.00g                                            /dev/sda2(30720)
  linux vg2  -wi-a---- 190.00g                                            /dev/sdd1(0)    
  win8  vg2  -wi-a---- 190.00g                                            /dev/sdc1(0)    

I’ve tried to resolve this by booting into a Rescue environment and taking the following steps.

mount /dev/vg1/root /mnt
mount /dev/vg1/home /mnt/home
mount /dev/sda1 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --rbind /mounts /mnt/mounts
chroot /mnt

The —rbind /mounts is needed to avoid getting

/dev/mapper/control; mood failed: No such file or directory
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Command failed

when running mkinitrd. I haven’t entirely figured out how the device mapper and related mounts work (which could very well be my problem here :)), I found that through searching similar issues.

Then from /boot within the chroot I ran

mkinitrd -vv -k vmlinuz-3.16.1-vfio-i915-acs-vol-7.g90bc0f1-desktop -i initrd-3.16.1-vfio-i915-acs-vol-7.g90bc0f1-desktop -M /boot/System.map-3.16.1-vfio-i915-acs-vol-7.g90bc0f1-desktop

which gives doesn’t seem to give any issues and

grub2-mkconfig -o grub2/grub.cfg

which gives

Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.16.1-vfio-i915-acs-vol-7.g90bc0f1-desktop
Found initrd image: /boot/initrd-3.16.1-vfio-i915-acs-vol-7.g90bc0f1-desktop
Found linux image: /boot/vmlinuz-3.16.1-7.g90bc0f1-desktop
Found initrd image: /boot/initrd-3.16.1-7.g90bc0f1-desktop
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices
  WARNING: Failed to connect to lvmetad: No such file or directory. Falling back to internal scanning.
done

so possibly that’s where the problem is. /dev/1 doesn’t come in anywhere in the story. Now I’m well and truly stuck (and not booting) so any help would be most appreciated. Thanks in advance!

Is this a fresh install?

There were problems with the “lvmetad” configuration that showed up early for 13.1. They have since been fixed.

You can look for the bug report to find a work-around. Or you can boot the install media as a rescue system, mount your partitions, use a bind mount for “/dev”, “/proc” and “/sys”, the chroot into the mounted system.

Before you chroot into the mounted system, make sure that you have Internet access.

Once you have done the chroot into the mounted system, try running


zypper patch

to bring your system up to date. For good measure, run “mkinitrd”.

Then see if your system will boot properly.

Thanks nrickert. This is not a fresh install but rather a system that was installed some time ago and is fully patched. I believe I did come across the bug report you’re referring to but I didn’t think it applied for that reason. Do you still think it would?

edit: one thing I do have in common with other reports of LVM related issues is that I have a second volume group in the system. It is however only used for data storage of VMs.

I seem to recall that having a second volume group is involved in the bug.

I use a single encrypted LVM, and have not had problems.

I suggest you at least look up that bug report. Maybe manually editing the “lvmetad” configuration and rebuilding the “initrd” is sufficient. You can probably search for “lvmetad” with the bugzilla search function.

I may have been confusing with another bug report. I did find 13 bugs on bugzilla for openSUSE 13.1 involving lvmetad but none seem to really apply. I tried setting use_lvmetad = 0 in lvm.conf as well but no go, there is no more complaint from lvmetad but it doesn’t boot further than before.

I don’t fully understand where this is coming from - is this an initrd issue or is grub pointing the wrong way? When it says

Waiting for device /dev/1 to appear............................Could not find /dev/1. 
Want me to fall back to /dev/vg1/root? (Y/n)

where exactly was it told to look in /dev/1? My understanding was that this is an initrd issue but I may be wrong. If I’m not wrong, why would running mkinitrd from a chroot then not resolve this?

I wasn’t able to resolve this so I ended up reinstalling. Thanks for your input nrickert.