Extroot on LVM not found after /lib/preinit/80_lvm2

I’m using a OpenWRT image with lvm2 installed as Customize installed packages built from firmware-selector and a LVM extroot partition on an external USB storage.

But the LVM extroot is not found at the boot process. logread shows that the preinit script /lib/preinit/80_lvm2 had been run before mount_root. But the lvm partition still cannot be found.
After the mount_root, the logs shows lvm2 was started by /etc/rc.d/S15lvm2.

I replaced the /bin/block binary with a script to execute real-block info > /tmp/overlay/b.log to confirm that the LVM partition is not detected by block info.
After the system totally booted up, block info does show the LVM partition.

What’s the possible reason for this? Thanks in advance!

Related log entries:


Wed Feb 21 15:36:51 2024 kern.info kernel: [    6.347007] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
Wed Feb 21 15:36:51 2024 kern.info kernel: [    6.380365] scsi host0: uas
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.384002] scsi 0:0:0:0: Direct-Access     JMicron  Generic DISK00   0103 PQ: 0 ANSI: 6
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.393588] scsi 0:0:0:1: Direct-Access     JMicron  Generic DISK01   0103 PQ: 0 ANSI: 6
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.393803] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.409416] sd 0:0:0:0: [sda] 4096-byte physical blocks
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.414791] sd 0:0:0:0: [sda] Write Protect is off
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.416019] sd 0:0:0:1: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
Wed Feb 21 15:36:51 2024 kern.debug kernel: [    6.419577] sd 0:0:0:0: [sda] Mode Sense: 4b 00 00 00
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.419891] sd 0:0:0:0: [sda] Disabling FUA
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.427330] sd 0:0:0:1: [sdb] 4096-byte physical blocks
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.432363] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.436717] sd 0:0:0:1: [sdb] Write Protect is off
Wed Feb 21 15:36:51 2024 kern.warn kernel: [    6.441880] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Wed Feb 21 15:36:51 2024 kern.debug kernel: [    6.450772] sd 0:0:0:1: [sdb] Mode Sense: 4b 00 00 00
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.451150] sd 0:0:0:1: [sdb] Disabling FUA
Wed Feb 21 15:36:51 2024 kern.info kernel: [    6.469543] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    6.471238] sd 0:0:0:1: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Wed Feb 21 15:36:51 2024 kern.info kernel: [    6.475570] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
Wed Feb 21 15:36:51 2024 kern.info kernel: [    6.483729] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
Wed Feb 21 15:36:51 2024 user.debug kernel: [    8.537084] Starting lvm2 during preinit
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    9.802060] UBIFS (ubi0:2): Mounting in unauthenticated mode
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    9.807783] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 684
Wed Feb 21 15:36:51 2024 kern.notice kernel: [    9.948703] UBIFS (ubi0:2): recovery needed
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   10.254225] UBIFS (ubi0:2): recovery completed
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   10.258728] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   10.266539] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   10.276432] UBIFS (ubi0:2): FS size: 84819968 bytes (80 MiB, 668 LEBs), max 679 LEBs, journal size 4190208 bytes (3 MiB, 33 LEBs)
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   10.288060] UBIFS (ubi0:2): reserved for root: 4006256 bytes (3912 KiB)
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   10.294655] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID FB234513-5FCC-4D8A-BF32-6DC0236D2747, small LPT model
Wed Feb 21 15:36:51 2024 user.info kernel: [   10.329860] mount_root: loading kmods from internal overlay
Wed Feb 21 15:36:51 2024 user.info kernel: [   10.344355] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Wed Feb 21 15:36:51 2024 user.info kernel: [   10.357112] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Wed Feb 21 15:36:51 2024 kern.err kernel: [   14.448014] xhci-mtk 11200000.usb: ERROR Transfer event for unknown stream ring slot 1 ep 6
Wed Feb 21 15:36:51 2024 kern.err kernel: [   14.456358] xhci-mtk 11200000.usb: @0000000041712a20 41751100 00000000 1a001000 01078001
Wed Feb 21 15:36:51 2024 kern.warn kernel: [   14.464521] sd 0:0:0:1: [sdb] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   14.494771] sd 0:0:0:1: [sdb] Attached SCSI disk
Wed Feb 21 15:36:51 2024 kern.info kernel: [   14.570529]  sda: sda1 sda2
Wed Feb 21 15:36:51 2024 kern.notice kernel: [   14.575044] sd 0:0:0:0: [sda] Attached SCSI disk
Wed Feb 21 15:36:51 2024 user.info kernel: [   14.672613] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
Wed Feb 21 15:36:51 2024 user.info kernel: [   14.690480] block: extroot: device not present, retrying in 60 seconds
Wed Feb 21 15:36:51 2024 user.err kernel: [   75.529937] block: extroot: cannot find device with UUID cce6ce8f-ba06-4a2f-8994-6f052e330daf
Wed Feb 21 15:36:51 2024 user.info kernel: [   75.542338] mount_root: switching to ubifs overlay
Wed Feb 21 15:36:51 2024 kern.warn kernel: [   75.561492] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
Wed Feb 21 15:36:51 2024 user.debug kernel: [   75.605545] urandom-seed: Seeding with /etc/urandom.seed
Wed Feb 21 15:36:51 2024 user.info kernel: [   75.675751] procd: - early -
Wed Feb 21 15:36:51 2024 user.info kernel: [   75.678694] procd: - watchdog -
Wed Feb 21 15:36:51 2024 user.info kernel: [   76.295266] procd: - watchdog -
Wed Feb 21 15:36:51 2024 user.info kernel: [   76.304710] procd: - ubus -
Wed Feb 21 15:36:51 2024 user.info kernel: [   76.392798] procd: - init -
Wed Feb 21 15:36:51 2024 user.info kernel: [   76.746784] kmodloader: loading kernel modules from /etc/modules.d/*
Wed Feb 21 15:36:51 2024 kern.info kernel: [   76.758141] crypto-safexcel 10320000.crypto: EIP97:230(0,1,4,4)-HIA:270(0,5,5),PE:150/433(alg:7fcdfc00)/0/0/0
Wed Feb 21 15:36:51 2024 kern.info kernel: [   76.772202] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
Wed Feb 21 15:36:51 2024 kern.info kernel: [   76.779692] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
Wed Feb 21 15:36:51 2024 user.info kernel: [   76.886499] urngd: v1.0.2 started.
Wed Feb 21 15:36:51 2024 kern.info kernel: [   77.231937] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221012174648a
Wed Feb 21 15:36:51 2024 kern.info kernel: [   77.231937]
Wed Feb 21 15:36:51 2024 kern.info kernel: [   77.600704] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20221012174725
Wed Feb 21 15:36:51 2024 kern.info kernel: [   77.753066] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20221012174937
Wed Feb 21 15:36:51 2024 kern.info kernel: [   81.680272] PPP generic driver version 2.4.2
Wed Feb 21 15:36:51 2024 kern.info kernel: [   81.685311] NET: Registered PF_PPPOX protocol family
Wed Feb 21 15:36:51 2024 user.info kernel: [   81.693055] kmodloader: done loading kernel modules from /etc/modules.d/*
Wed Feb 21 15:36:51 2024 daemon.notice procd: /etc/rc.d/S15lvm2: File descriptor 13 (pipe:[3208]) leaked on lvm invocation. Parent PID 1306: /bin/sh
Wed Feb 21 15:36:51 2024 daemon.notice procd: /etc/rc.d/S15lvm2:   Found volume group "hdd1" using metadata type lvm2
Wed Feb 21 15:36:51 2024 daemon.notice procd: /etc/rc.d/S15lvm2: File descriptor 13 (pipe:[3208]) leaked on lvm invocation. Parent PID 1306: /bin/sh
Wed Feb 21 15:36:51 2024 daemon.notice procd: /etc/rc.d/S15lvm2:   2 logical volume(s) in volume group "hdd1" now active
Wed Feb 21 15:36:52 2024 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Wed Feb 21 15:36:52 2024 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: started, version 2.89 cachesize 1000
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: DNS service limited to local subnets
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Wed Feb 21 15:36:52 2024 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Wed Feb 21 15:36:52 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names