You are not logged in.

#1 2026-03-07 12:22:06

ledity
Member
Registered: 2024-02-24
Posts: 3

LVM fails to process volume groups at boot automatically

Hello,

I can't finish installation. The boot stucks on lvm hook. After proceccing them manually with

vgscan && vgchange -ay

the boot process continues successfullly.

LVM is configured like this: an single volume group cotaining a PV on an HDD and cache on sata SSD.

# lsblk
NAME                                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                                           8:0    0 232,9G  0 disk 
└─sda1                                        8:1    0 232,9G  0 part 
  ├─CachedHDDVolGroup-ssd_cache_cpool_cdata 253:0    0 232,8G  0 lvm  
  │ └─CachedHDDVolGroup-hdd                 253:3    0 931,5G  0 lvm  /storage
  └─CachedHDDVolGroup-ssd_cache_cpool_cmeta 253:1    0    48M  0 lvm  
    └─CachedHDDVolGroup-hdd                 253:3    0 931,5G  0 lvm  /storage
sdb                                           8:16   0 931,5G  0 disk 
└─sdb1                                        8:17   0 931,5G  0 part 
  └─CachedHDDVolGroup-hdd_corig             253:2    0 931,5G  0 lvm  
    └─CachedHDDVolGroup-hdd                 253:3    0 931,5G  0 lvm  /storage
nvme0n1                                     259:0    0 931,5G  0 disk 
├─nvme0n1p1                                 259:1    0   512M  0 part /boot
└─nvme0n1p2                                 259:2    0   931G  0 part /

Initramfs hooks:

HOOKS=(base systemd autodetect microcode plymouth modconf kms keyboard keymap sd-vconsole lvm2 block  filesystems fsck)

Journalctl:

# journalctl -b | grep "archlinux lvm"
мар 07 14:39:48 archlinux lvm[344]: PV /dev/sda1 online, VG CachedHDDVolGroup incomplete (need 1).
мар 07 14:39:49 archlinux lvm[368]: PV /dev/sdb1 online, VG CachedHDDVolGroup is complete.
мар 07 14:39:49 archlinux lvm[371]:   wait4 child process 372 failed: Interrupted system call
мар 07 14:39:49 archlinux lvm[371]:   Can't process LV CachedHDDVolGroup/hdd: cache target support missing from kernel?
мар 07 14:39:49 archlinux lvm[371]:   Interrupted...
мар 07 14:39:49 archlinux lvm[371]:   0 logical volume(s) in volume group "CachedHDDVolGroup" now active

Am I missing something?

Last edited by ledity (2026-03-07 12:28:29)

Offline

#2 2026-03-07 13:32:37

frostschutz
Member
Registered: 2013-11-15
Posts: 1,639

Re: LVM fails to process volume groups at boot automatically

You could try adding dm-cache to MODULES in mkinitcpio.conf (actually run lsmod and add all dm*)

If that's it then something didn't work about including or autoloading modules in time. mdadm had a similar issue with missing modules recently...

Offline

#3 2026-03-07 13:59:26

ledity
Member
Registered: 2024-02-24
Posts: 3

Re: LVM fails to process volume groups at boot automatically

I found a workaround with scanning volume groups with a systemd service after actual boot.

Write these modules:

# /etc/systemd/system/scan-lvm.mount
[Unit]
Description=Scan LVM after boot

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=vgscan
ExecStart=vgchange -ay

[Install]
WantedBy=multi-user.target
# /etc/systemd/system/storage.mount
[Unit]
Desription=Mount filedumpster partition
Requires=scan-lvm.service
After=multi-user.target

[Mount]
What=UUID=93c9aad1-84ee-4414-aa54-5a9ea0f3be72
Where=/storage
Type=btrfs
Options=rw,relatime,discard=async,space_cache=v2,subvol=/

[Install]
WantedBy=multi-user.target

By doing with

systemctl enable --now storage.mount

you will enable automount your dir.
Note that:

  • This will now work for root partition

  • *.mount file must be called in pattern path-to-mountpoint.mount, if the partition is mounted to /path/to/mountpoint

I will not mark this topic as solved for a while because this is still a workaround as lvm2 hook still doesn't to it's job.

Offline

#4 2026-03-07 14:31:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,712

Re: LVM fails to process volume groups at boot automatically

The entire point of the initramfs is to set up and mount the root volume; if your root volume isn't on LVM, you shouldn't be using the lvm2 hook at all.

Offline

#5 2026-03-08 16:59:13

ledity
Member
Registered: 2024-02-24
Posts: 3

Re: LVM fails to process volume groups at boot automatically

Scimmia wrote:

The entire point of the initramfs is to set up and mount the root volume; if your root volume isn't on LVM, you shouldn't be using the lvm2 hook at all.

The problem is that modern initramfs on Arch with default settings is based on systemd, and it by default tries to mount everything from /etc/fstab during the init phase

Last edited by ledity (2026-03-08 17:05:37)

Offline

#6 2026-03-08 18:14:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,712

Re: LVM fails to process volume groups at boot automatically

No, it doesn't, fstab does not get pulled into the initramfs.

Offline

Board footer

Powered by FluxBB