You are not logged in.

#1 2021-04-11 12:33:55

gorugo
Member
Registered: 2019-03-11
Posts: 8

/home on LVM lv not mounted during boot ==> emergency mode

Hi
I have been having a booting problem for a few weeks now.

Booting fails 9 out of 10 times after a timeout and brings me to emergency mode. I can boot manualy from here but it is quite inconvenient. How can I solve this booting/mounting issue?

LC_ALL=C journalctl -xb on emergency mode: https://bin.infini.fr/?5f65b89d8fb3ac6b … dNsiaVcqcW

Here is an important part:

Apr 11 12:39:11 HP-Arch systemd[1]: dev-disk-by\x2duuid-83cbf990\x2d3485\x2d401b\x2dbcfb\x2d47a21d6dac10.device: Job dev-disk-by\x2duuid-83cbf990\x2d3485\x2d401b\x2dbcfb\x2d47a21d6dac10.device/start timed out.
Apr 11 12:39:11 HP-Arch systemd[1]: Timed out waiting for device /dev/disk/by-uuid/83cbf990-3485-401b-bcfb-47a21d6dac10.
-- Subject: A start job for unit dev-disk-by\x2duuid-83cbf990\x2d3485\x2d401b\x2dbcfb\x2d47a21d6dac10.device has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit dev-disk-by\x2duuid-83cbf990\x2d3485\x2d401b\x2dbcfb\x2d47a21d6dac10.device has finished with a failure.
-- 
-- The job identifier is 188 and the job result is timeout.
Apr 11 12:39:11 HP-Arch kernel: fbcon: Taking over console

Here is a summary of my disks setup:

/dev/sda (HDD)
       |_sda3 (classic linux fs partition) > /media/Donnees  ====> no issue with this partition, it is mounted properly at boot
       |_sda5 (lvm partition and PV)      > arch-hddata-vg
                                            |_arch-home-lv (=dm-2)     > /home
                 (for testing purpose only) |_arch-testboot-lv (=dm-3) > /mnt

/dev/sdb (SSD)
       |_sdb1 (lvm partition and PV) > arch-root-vg     > arch-root-lv (=dm-0)     > /
       |_sdb2 (lvm partition and PV) > arch-ssdata-vg > arch-ssdata-lv (=dm-1) > /media/ssData

see below the lvm setup

systemd is failing to mount /home which is listed in the /etc/fstab (note: using either the path or uuid):
# cat /etc/fstab

# /dev/mapper/arch--root--vg-arch--root--lv SSD 256Go
UUID=2065b9fd-aaf6-4306-bf3c-262237c4195a	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda2
UUID=E9ED-3E00      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

# /dev/sda4 swap
UUID=4d1d14e9-0758-41d5-a537-fdc8053e540f	none	swap	defaults	0 0

# both produci the same boot problem
#/dev/mapper/arch--hddata--vg-arch--home--lv	/home	ext4	defaults,noatime	0	2
UUID=83cbf990-3485-401b-bcfb-47a21d6dac10 /home	ext4	defaults,noatime	0	2

# test:
/dev/mapper/arch--hddata--vg-arch--testboot--lv /mnt ext4 defaults,noatime 0 2

UUID=682d4466-e871-46c6-98d7-dc2db6895535	/media/Donnees	ext4	defaults,noatime	0	2

/dev/mapper/arch--ssdata--vg-arch--ssdata--lv	/media/ssData	ext4	defaults,noatime	0	2

and therefore falls back to emergency mode.

systemd cannot mount /home because the corresponding partition is not listed in /dev/disk-by-uuid or /dev/mapper:

# ls -l /dev/disk-by-* | grep dm

lrwxrwxrwx 1 root root 10 11 avril 12:37 dm-name-arch--root--vg-arch--root--lv -> ../../dm-0
lrwxrwxrwx 1 root root 10 11 avril 12:37 dm-name-arch--ssdata--vg-arch--ssdata--lv -> ../../dm-1
lrwxrwxrwx 1 root root 10 11 avril 12:37 dm-uuid-LVM-OnlU0PTtzKtZqUcIYyiA9bhtHR9Vqxv1EcqWG7RW0NS14Jl1PSZCZ2dgAdugCKfL -> ../../dm-0
lrwxrwxrwx 1 root root 10 11 avril 12:37 dm-uuid-LVM-PcviRjn5M2efZWfRUo7vBB9tWyeDFO5lrq2txxSv13ByrLSgl2rKQowK6BCpcrmm -> ../../dm-1
lrwxrwxrwx 1 root root 10 11 avril 12:37 ssData -> ../../dm-1
lrwxrwxrwx 1 root root 10 11 avril 12:37 2065b9fd-aaf6-4306-bf3c-262237c4195a -> ../../dm-0
lrwxrwxrwx 1 root root 10 11 avril 12:37 8528fa50-6886-4168-8a7c-d0eef000c29d -> ../../dm-1

# ls -l /dev/mapper

total 0
lrwxrwxrwx 1 root root       7 11 avril 12:37 arch--root--vg-arch--root--lv -> ../dm-0
lrwxrwxrwx 1 root root       7 11 avril 12:37 arch--ssdata--vg-arch--ssdata--lv -> ../dm-1
crw------- 1 root root 10, 236 11 avril 12:37 control

but it is on /dev as dm-2:
# ls -l /dev | grep dm

crw------- 1 root root       10, 124 11 avril 12:37 cpu_dma_latency
brw-rw---- 1 root disk      254,   0 11 avril 12:37 dm-0    =====> it's root-lv
brw-rw---- 1 root disk      254,   1 11 avril 12:37 dm-1    =====> it's ssdata-lv
brw-rw---- 1 root disk      254,   2 11 avril 12:37 dm-2    =====> it's home-lv
brw-rw---- 1 root disk      254,   3 11 avril 12:37 dm-3    =====> it's testboot-lv
drwxr-xr-x 2 root root            60 11 avril 12:37 dma_heap
crw-rw---- 1 root kvm        10, 125 11 avril 12:37 udmabuf

To boot, I need to:

# vgscan --mknodes

  Found volume group "arch-ssdata-vg" using metadata type lvm2
  Found volume group "arch-root-vg" using metadata type lvm2
  Found volume group "arch-hddata-vg" using metadata type lvm2
  The link /dev/arch-hddata-vg/arch-home-lv should have been created by udev but it was not found. Falling back to direct link creation.
  The link /dev/arch-hddata-vg/arch-testboot-lv should have been created by udev but it was not found. Falling back to direct link creation.

# ls -l /dev/mapper

total 0
brw------- 1 root root 254,   2 Apr 11 13:01 arch--hddata--vg-arch--home--lv
brw------- 1 root root 254,   3 Apr 11 13:01 arch--hddata--vg-arch--testboot--lv
lrwxrwxrwx 1 root root        7 Apr 11 13:00 arch--root--vg-arch--root--lv -> ../dm-0
lrwxrwxrwx 1 root root        7 Apr 11 13:00 arch--ssdata--vg-arch--ssdata--lv -> ../dm-1
crw------- 1 root root  10, 236 Apr 11 13:00 control

(notice the hddata lines are not symlinks)

and use the path (rather than the uuid) in the fstab file, then:

# systemctl default


More info:

# udevadm info /dev/dm-0

P: /devices/virtual/block/dm-0
N: dm-0
L: 0
S: disk/by-uuid/2065b9fd-aaf6-4306-bf3c-262237c4195a
S: disk/by-id/dm-name-arch--root--vg-arch--root--lv
S: arch-root-vg/arch-root-lv
S: disk/by-id/dm-uuid-LVM-OnlU0PTtzKtZqUcIYyiA9bhtHR9Vqxv1EcqWG7RW0NS14Jl1PSZCZ2dgAdugCKfL
S: mapper/arch--root--vg-arch--root--lv
E: DEVPATH=/devices/virtual/block/dm-0
E: DEVNAME=/dev/dm-0
E: DEVTYPE=disk
E: MAJOR=254
E: MINOR=0
E: SUBSYSTEM=block
E: USEC_INITIALIZED=1484018
E: DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
E: DM_UDEV_PRIMARY_SOURCE_FLAG=1
E: DM_UDEV_RULES_VSN=2
E: DM_ACTIVATION=1
E: DM_NAME=arch--root--vg-arch--root--lv
E: DM_UUID=LVM-OnlU0PTtzKtZqUcIYyiA9bhtHR9Vqxv1EcqWG7RW0NS14Jl1PSZCZ2dgAdugCKfL
E: DM_SUSPENDED=0
E: DM_VG_NAME=arch-root-vg
E: DM_LV_NAME=arch-root-lv
E: ID_FS_UUID=2065b9fd-aaf6-4306-bf3c-262237c4195a
E: ID_FS_UUID_ENC=2065b9fd-aaf6-4306-bf3c-262237c4195a
E: ID_FS_VERSION=1.0
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: DEVLINKS=/dev/disk/by-uuid/2065b9fd-aaf6-4306-bf3c-262237c4195a /dev/disk/by-id/dm-name-arch--root--vg-arch--root--lv /dev/arch-root-vg/arch-root-lv /dev/disk/by-id/dm-uuid-LVM-OnlU0PTtzKtZqUcIYyiA9bhtHR9Vqxv1EcqWG7RW0NS14Jl1PSZCZ2dgAdugCKfL /dev/mapper/arch--root--vg-arch--root--lv
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

# udevadm info /dev/dm-1

P: /devices/virtual/block/dm-1
N: dm-1
L: 0
S: disk/by-label/ssData
S: disk/by-uuid/8528fa50-6886-4168-8a7c-d0eef000c29d
S: disk/by-id/dm-uuid-LVM-PcviRjn5M2efZWfRUo7vBB9tWyeDFO5lrq2txxSv13ByrLSgl2rKQowK6BCpcrmm
S: mapper/arch--ssdata--vg-arch--ssdata--lv
S: disk/by-id/dm-name-arch--ssdata--vg-arch--ssdata--lv
S: arch-ssdata-vg/arch-ssdata-lv
E: DEVPATH=/devices/virtual/block/dm-1
E: DEVNAME=/dev/dm-1
E: DEVTYPE=disk
E: MAJOR=254
E: MINOR=1
E: SUBSYSTEM=block
E: USEC_INITIALIZED=1485816
E: DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
E: DM_UDEV_PRIMARY_SOURCE_FLAG=1
E: DM_UDEV_RULES_VSN=2
E: DM_NAME=arch--ssdata--vg-arch--ssdata--lv
E: DM_UUID=LVM-PcviRjn5M2efZWfRUo7vBB9tWyeDFO5lrq2txxSv13ByrLSgl2rKQowK6BCpcrmm
E: DM_SUSPENDED=0
E: DM_VG_NAME=arch-ssdata-vg
E: DM_LV_NAME=arch-ssdata-lv
E: ID_FS_LABEL=ssData
E: ID_FS_LABEL_ENC=ssData
E: ID_FS_UUID=8528fa50-6886-4168-8a7c-d0eef000c29d
E: ID_FS_UUID_ENC=8528fa50-6886-4168-8a7c-d0eef000c29d
E: ID_FS_VERSION=1.0
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: DEVLINKS=/dev/disk/by-label/ssData /dev/disk/by-uuid/8528fa50-6886-4168-8a7c-d0eef000c29d /dev/disk/by-id/dm-uuid-LVM-PcviRjn5M2efZWfRUo7vBB9tWyeDFO5lrq2txxSv13ByrLSgl2rKQowK6BCpcrmm /dev/mapper/arch--ssdata--vg-arch--ssdata--lv /dev/disk/by-id/dm-name-arch--ssdata--vg-arch--ssdata--lv /dev/arch-ssdata-vg/arch-ssdata-lv
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

# udevadm info /dev/dm-2

P: /devices/virtual/block/dm-2
N: dm-2
L: 0
E: DEVPATH=/devices/virtual/block/dm-2
E: DEVNAME=/dev/dm-2
E: DEVTYPE=disk
E: MAJOR=254
E: MINOR=2
E: SUBSYSTEM=block
E: USEC_INITIALIZED=3674912
E: DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
E: DM_UDEV_DISABLE_DISK_RULES_FLAG=1
E: DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
E: SYSTEMD_READY=0
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

and:
# udevadm trigger /dev/dm-2
# udevadm info /dev/dm-2

P: /devices/virtual/block/dm-2
N: dm-2
L: 0
S: mapper/arch--hddata--vg-arch--home--lv
E: DEVPATH=/devices/virtual/block/dm-2
E: DEVNAME=/dev/dm-2
E: DEVTYPE=disk
E: MAJOR=254
E: MINOR=2
E: SUBSYSTEM=block
E: USEC_INITIALIZED=3674912
E: DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
E: DM_UDEV_DISABLE_DISK_RULES_FLAG=1
E: DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
E: DM_NAME=arch--hddata--vg-arch--home--lv
E: DM_UUID=LVM-Hw4EruA3MRaO7a9QCLQjIH6U3XVn7jz52lKx6Y27cGeG0R9c2gHE9hAR2IfXfQcQ
E: DM_SUSPENDED=0
E: DM_UDEV_RULES_VSN=2
E: DM_VG_NAME=arch-hddata-vg
E: DM_LV_NAME=arch-home-lv
E: DEVLINKS=/dev/mapper/arch--hddata--vg-arch--home--lv
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:


# lsblk

NAME                                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                                       8:0    0 931.5G  0 disk 
|-sda1                                    8:1    0    16M  0 part 
|-sda2                                    8:2    0   512M  0 part /boot
|-sda3                                    8:3    0 841.4G  0 part /media/Donnees
|-sda4                                    8:4    0     2G  0 part [SWAP]
`-sda5                                    8:5    0  87.1G  0 part 
  |-arch--hddata--vg-arch--home--lv     254:2    0    64G  0 lvm  /home
  `-arch--hddata--vg-arch--testboot--lv 254:3    0  23.1G  0 lvm  /mnt
sdb                                       8:16   0 223.6G  0 disk 
|-sdb1                                    8:17   0    64G  0 part 
| `-arch--root--vg-arch--root--lv       254:0    0    64G  0 lvm  /
|-sdb2                                    8:18   0    93G  0 part 
| `-arch--ssdata--vg-arch--ssdata--lv   254:1    0    93G  0 lvm  /media/ssData
|-sdb3                                    8:19   0    16M  0 part 
|-sdb4                                    8:20   0  65.9G  0 part 
`-sdb5                                    8:21   0   688M  0 part

LVM setup:
# pvs

  PV         VG             Fmt  Attr PSize   PFree
  /dev/sda5  arch-hddata-vg lvm2 a--   87,09g    0 
  /dev/sdb1  arch-root-vg   lvm2 a--  <64,00g    0 
  /dev/sdb2  arch-ssdata-vg lvm2 a--  <93,00g    0 

# vgs

  VG             #PV #LV #SN Attr   VSize   VFree
  arch-hddata-vg   1   2   0 wz--n-  87,09g    0 
  arch-root-vg     1   1   0 wz--n- <64,00g    0 
  arch-ssdata-vg   1   1   0 wz--n- <93,00g    0 

# lvs

  LV               VG             Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  arch-home-lv     arch-hddata-vg -wi-a-----  64,00g                                                    
  arch-testboot-lv arch-hddata-vg -wi-a-----  23,09g                                                    
  arch-root-lv     arch-root-vg   -wi-ao---- <64,00g                                                    
  arch-ssdata-lv   arch-ssdata-vg -wi-ao---- <93,00g                                                    

Note: I created arch-testboot-lv on purpose for testing on the same vg and pv as rch-home-lv. It seems to face the exact same errors.

# fdisk -l /dev/sda

Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM024 HN-M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 1679AC3E-EA07-45BE-9BE0-0E1F965A988E

Device          Start        End    Sectors   Size Type
/dev/sda1        2048      34815      32768    16M Microsoft reserved
/dev/sda2       34816    1083391    1048576   512M EFI System
/dev/sda3     2127872 1766676266 1764548395 841.4G Linux filesystem
/dev/sda4  1766676480 1770870783    4194304     2G Linux swap
/dev/sda5  1770870784 1953525134  182654351  87.1G Linux LVM

# fdisk -l /dev/sdb

Disk /dev/sdb: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: SanDisk SDSSDXPS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1C19B692-D5AC-482F-BAC8-A0FC3AB048E4

Device         Start       End   Sectors  Size Type
/dev/sdb1       2048 134219775 134217728   64G Linux LVM
/dev/sdb2  134219776 329254911 195035136   93G Linux LVM
/dev/sdb3  329254912 329287679     32768   16M Microsoft reserved
/dev/sdb4  329287680 467448855 138161176 65.9G Microsoft basic data
/dev/sdb5  467449856 468858879   1409024  688M Windows recovery environment

My system is fully up to date. Some information below:
# uname -a

Linux HP-Arch 5.11.12-arch1-1 #1 SMP PREEMPT Wed, 07 Apr 2021 21:48:28 +0000 x86_64 GNU/Linux

# systemctl --version

systemd 248 (248-4-arch)
+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified

Disks' partitions are not full:
# df -h

Filesystem                                       Size  Used Avail Use% Mounted on
devtmpfs                                         7.8G     0  7.8G   0% /dev
tmpfs                                            7.8G     0  7.8G   0% /dev/shm
tmpfs                                            3.2G  9.9M  3.2G   1% /run
/dev/mapper/arch--root--vg-arch--root--lv         63G   36G   24G  60% /
tmpfs                                            7.8G   20K  7.8G   1% /tmp
/dev/mapper/arch--ssdata--vg-arch--ssdata--lv     91G   40G   47G  46% /media/ssData
/dev/sda3                                        828G  553G  233G  71% /media/Donnees
/dev/sda2                                        511M  116M  396M  23% /boot
/dev/mapper/arch--hddata--vg-arch--home--lv       63G   47G   14G  78% /home
/dev/mapper/arch--hddata--vg-arch--testboot--lv   23G   24K   22G   1% /mnt
tmpfs                                            1.6G  100K  1.6G   1% /run/user/1000

My mkinitcpio.conf (trimmed commentaries):

MODULES=()
BINARIES=()
FILES=()
HOOKS=(base systemd autodetect modconf block lvm2 filesystems keyboard fsck)

Thank you for reading my post. Any help or leads would be appreciated, my knowledge on these matters being very limited.

Last edited by gorugo (2021-04-11 18:56:35)

Offline

#2 2021-05-22 15:39:03

lawa
Member
Registered: 2021-05-22
Posts: 5

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi gorugo

I seem to have the same problem. 9 out of 10 reboots fail as some secondary filesystems sitting in a lv can not be mounted. lvm is installed on top of a raid1 which gets activated every time without errors, but the LVM assembly fails. This is super annoying as this is a server without keyboard and monitor stored inside a cabinet.

Besides the different storage setup I use a slightly different mkinitcpio which is mostly related to the underlying software raid.

MODULES=(dm-raid raid1 dm-mod)
BINARIES=()
FILES=()
HOOKS=(base systemd keyboard autodetect modconf block mdadm_udev lvm2 filesystems fsck)
COMPRESSION="lz4"
COMPRESSION_OPTIONS=(-9)

lsblk

NAME                     MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                        8:0    0   3.6T  0 disk  
└─sda1                     8:1    0   3.6T  0 part  
  └─md127                  9:127  0   3.6T  0 raid1 
    ├─Data--VG-homes--lv 253:0    0     1T  0 lvm   /home
    └─Data--VG-data--lv  253:1    0   2.6T  0 lvm   /srv
sdb                        8:16   0   3.6T  0 disk  
└─sdb1                     8:17   0   3.6T  0 part  
  └─md127                  9:127  0   3.6T  0 raid1 
    ├─Data--VG-homes--lv 253:0    0     1T  0 lvm   /home
    └─Data--VG-data--lv  253:1    0   2.6T  0 lvm   /srv
nvme0n1                  259:0    0 232.9G  0 disk  
├─nvme0n1p1              259:1    0   499M  0 part  /boot
└─nvme0n1p2              259:2    0 232.4G  0 part  /

pvs

  PV         VG      Fmt  Attr PSize  PFree
  /dev/md127 Data-VG lvm2 a--  <3.64t    0 

vgs

  VG      #PV #LV #SN Attr   VSize  VFree
  Data-VG   1   2   0 wz--n- <3.64t    0 

lvs

  LV       VG      Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data-lv  Data-VG -wi-ao---- <2.64t                                                    
  homes-lv Data-VG -wi-ao----  1.00t

fstab

# /dev/nvme0n1p2
UUID=31611c19-e857-4093-9a00-31dc1198bb2a	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p1
UUID=46B3-32D2     	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

# homes /dev/Data/homes on LV homes on VG Data on /dev/md/Data-RAID10 UUID=2268391f-d262-44dc-acf9-7bf4e5e3ced1   
/dev/Data-VG/homes-lv /home 	ext4	rw,defaults,strictatime,lazytime 0 0

# Data /dev/Data/data on LV Data on VG Data on /dev/md/Data-RAID10 UUID=a7fd1e72-98ca-429d-b0cc-75b20186c868	
/dev/Data-VG/data-lv  /srv	ext4 	rw,defaults,strictatime,lazytime 0 0

# For ARM
/dev/sr0  /mnt/dev/sr0  udf,iso9660  users,noauto,exec,utf8  0  0

ls /dev/mapper also here symlinks are created. However, I have no other LVM so nothing to compare

crw------- 1 root root 10, 236 May 21 22:10 control
lrwxrwxrwx 1 root root       7 May 21 22:10 Data--VG-data--lv -> ../dm-1
lrwxrwxrwx 1 root root       7 May 21 22:10 Data--VG-homes--lv -> ../dm-0

uname and systemctl

Linux cross-section 5.12.4-arch1-2 #1 SMP PREEMPT Sat, 15 May 2021 20:58:02 +0000 x86_64 GNU/Linux

systemd 248 (248.2-2-arch)
+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified

Offline

#3 2021-05-22 17:11:27

matse
Member
Registered: 2011-04-27
Posts: 299

Re: /home on LVM lv not mounted during boot ==> emergency mode

I can just recommend to use the "UUID=XXX" specification everywhere in /etc/fstab to not rely on created /dev/...
I can use LUKS and LVM without problems. To get the UUID of your partitions / disks simply do a

lsblk -o name,kname,UUID

And adjust your fstab - although I guess it should work like you did (but I didn't look in depth on your setup).

Offline

#4 2021-05-22 20:17:25

lawa
Member
Registered: 2021-05-22
Posts: 5

Re: /home on LVM lv not mounted during boot ==> emergency mode

I did use the UUID until the problem started to appear and tried to fix it by going away from UUID to old fashioned dev path. I'll try to switch back and see if it hepls.

Offline

#5 2021-05-26 10:38:06

gorugo
Member
Registered: 2019-03-11
Posts: 8

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi
Thank you both for your replies.
matse, in my case too using either UUIDs or dev paths in the fstab file produces the same error.
Iawa, I noticed that all your partitions do show up in /dev/mapper but in my case they don't (2 out of 4 are listed). Maybe your problem is different than mine. What errors are you getting when reboot fails?
I still experience the same probem today with an up to date system (I don't have the computer with me right now so I cannot uname).
Still looking for some guidance!

Offline

#6 2021-05-27 04:15:33

aoaaceai
Member
Registered: 2021-04-21
Posts: 8

Re: /home on LVM lv not mounted during boot ==> emergency mode

Just to be sure, have you re-executed

mkinitcpio -P

after editing mkinitcpio.conf?

Offline

#7 2021-05-27 14:36:59

gorugo
Member
Registered: 2019-03-11
Posts: 8

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi aoaaceai
I am sure that I re executed mkinitcpio (automatically done after each kernel upgrade + done manually before posting to the forum). Moreover I have been using the same mkinitcpio.conf for years

Offline

#8 2021-11-05 09:07:02

lawa
Member
Registered: 2021-05-22
Posts: 5

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi

did anyone ever find a solution for this. What would be the best approach for a bug report. I wouldn't know which package to assign this to. The kernel, mkinitcpio, systemd, ...

Offline

#9 2021-12-30 21:14:25

bizarre
Member
Registered: 2019-11-14
Posts: 2

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi all! I got same problem. The solution for me was: i merged mkinitcpio.pacnew and my mkinitcpio.conf. In new version there are no systemd hook, but I had it in HOOKS setting. I removed it, rebuild images by  mkinitcpio -P and reboot and problem was solved.

for info - my current setting is
HOOKS=(base udev autodetect modconf block mdadm_udev lvm2 filesystems sd-vconsole keyboard fsck shutdown)

Hope it will help somebody!

Offline

#10 2022-01-03 11:29:59

gorugo
Member
Registered: 2019-03-11
Posts: 8

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi all
Thank you for your replies.
As of now, the problem is still unresolved.

@lawa I don't know where a bug should be reported.
@bizarre there is no mkinitcpio.pacnew on my system. Anyway, if you remove systemd from HOOKS, I don't think your system will start with systemd, which is my choice.

Any further help would be appreciated

Offline

#11 2022-01-03 11:46:51

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: /home on LVM lv not mounted during boot ==> emergency mode

For some reason there is DM_UDEV_DISABLE_DISK_RULES_FLAG=1 set for dm-2. That prevents blkid from running and as a result the lvm2 udev rules do not detect that pv.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#12 2022-01-26 23:01:35

gorugo
Member
Registered: 2019-03-11
Posts: 8

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi progandy
Could you be more precise regarding where you identified this flag? Is it your configuration or lvm's?
Do you have any leads on how to solve the issue?
Regards

Offline

#13 2022-01-27 10:46:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: /home on LVM lv not mounted during boot ==> emergency mode

it is visible in the udevadm info /dev/dm-2 output in post #1 , so this is your configuration .

Comparing the info from dm-2 with dm-1 & dm-0 shows dm-2 doesn't seem to have any disk-by entry .

looking at other logs dm-2 should correspond to sda5 .
please post

# fdisk --list /dev/sda

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2022-02-17 22:28:18

gorugo
Member
Registered: 2019-03-11
Posts: 8

Re: /home on LVM lv not mounted during boot ==> emergency mode

Hi
Thank you Lone_Wolf, that was quite obvious but I missed it.
Indeed dm-2 has these flags:

E: DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
E: DM_UDEV_DISABLE_DISK_RULES_FLAG=1
E: DM_UDEV_DISABLE_OTHER_RULES_FLAG=1

and doesn't have the disk-by entries.
However, I think that it is important to note that this dm-2 was generated with the

vgscan --mknodes

or

vgmknodes

command, which may explain these differences.

About your fdisk command, I already posted the ouput (it is unchanged).
dm-2 corresponds to arch--hddata--vg-arch--home--lv which resides in the arch-hddata-vg vg which sits on the /dev/sda5 partition/pv indeed.

I'll try to reboot without the need for the lvm command and post the udevadm outputs.

Offline

Board footer

Powered by FluxBB