You are not logged in.

#1 2021-01-31 20:29:38

dcraig327
Member
Registered: 2021-01-27
Posts: 6

Grub hanging on lvm snapshots

This was taken from a manjaro system. I had the same issue with an arch install.

I’m having issues with grub-mkconfig. It’s hanging when it encounters a lvm snapshot. I did let it run for a good 10+ minutes once and it didn’t generate any output, so the error I’m getting is preventing it from generating a grub.cfg. Below the File descriptor leaked message is not an error, based on what I’ve read, but that maybe incorrect. The first error is ‘grub-probe: error: unknown filesystem’

I been looking into this a while. It’s believed that it’s happening because grub is having issues with a read-only snapshot. But I believe grub lets you boot into lvm snapshots, for sure it lets you boot into zfs snapshots.

Any questions, advice, or guidance you got would be appreciated.

$ sudo lvs
  LV   VG Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home lv -wi-ao---- 30.00g                                                    
  root lv -wi-ao---- 30.00g                                                    
  swap lv -wi-ao---- 16.00g                                                    
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found Windows Boot Manager on /dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
$ sudo ps aux |grep grub-
$ sudo lvcreate -L 30G -s -n root_013021_1 /dev/mapper/lv-root          
  Logical volume "root_013021_1" created.
$ sudo lvs         
  LV            VG Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home          lv -wi-ao---- 30.00g                                                    
  root          lv owi-aos--- 30.00g                                                    
  root_013021_1 lv swi-a-s--- 30.00g      root   0.01                                   
  swap          lv -wi-ao---- 16.00g                                                    
$ sudo ps aux |grep grub         
$ sudo grub-mkconfig -o /boot/grub/grub.cfg         
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
File descriptor 3 (pipe:[1849683]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 9 (pipe:[1849687]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 3 (pipe:[1849683]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 9 (pipe:[1849687]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 3 (pipe:[1849683]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 9 (pipe:[1849687]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 3 (pipe:[1849683]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 9 (pipe:[1849687]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 3 (pipe:[1849683]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 9 (pipe:[1849687]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 4 (pipe:[1849683]) leaked on vgs invocation. Parent PID 1017585: grub-probe
File descriptor 9 (pipe:[1849687]) leaked on vgs invocation. Parent PID 1017585: grub-probe
grub-probe: error: unknown filesystem.
Found Windows Boot Manager on /dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi
/usr/bin/grub-probe: error: unknown filesystem.
Found Manjaro Linux (20.2.1) on /dev/mapper/lv-root_013021_1

[tty2]$ sudo ps aux |grep grub-
root     1016025  0.0  0.0  15664  7128 pts/4    S+   22:35   0:00 sudo grub-mkconfig -o /boot/grub/grub.cfg
root     1016026  0.0  0.0   7604  4140 pts/4    S+   22:35   0:00 /bin/sh /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg
root     1017897  0.0  0.0  10416  1676 ?        Ss   22:35   0:00 grub-mount /dev/mapper/lv-root_013021_1 /var/lib/os-prober/mount

Edit: I physically unplugged every single drive I have except for /dev/sda and it’s still happening. The wiki has an entry about this erorr, but only for ext4 file systems, not LVM. In the LVM section of the wiki it says to add lvm to the grub default file, that didn’t fix this error. The lvm snapshot is going to have the same UUID as the filesystem it’s snapshotting, I can’t imagine any changes that I could make to /etc/fstab that would help convince grub to read it as it’s designed todo, which I’m not sure what that is, it shouldn’t be to hang.

Last edited by dcraig327 (2021-01-31 20:30:47)

Offline

Board footer

Powered by FluxBB