blkid wrong

Elan Ruusamäe glen at delfi.ee
Tue Jun 10 10:43:20 CEST 2014


hi

i have system where rootfs is on lvm with single pv,
and rest of the system is on xfs on lvm on md
rootfs is inited normally, but as systemd requires all fs to be mounted, 
the system does not boot up (recovery shell given after timeout)

systemd fails to boot up such system because it does not "see" 
partitions where md stuff resides:
# blkid
/dev/sda: TYPE="isw_raid_member"
/dev/sdb: TYPE="isw_raid_member"

i can workaround this by adding to /lib/systemd/pld-storage-init:
# systemd doesn't startup my mdadm
blockdev --rereadpt /dev/sda
blockdev --rereadpt /dev/sdb
modprobe md
mdadm --assemble --scan --auto=yes
vgchange -ay

after that blkid shows stuff (after rereadpt command), then udev creates 
/dev/sd[ab][13] and systemd sees rest of the stuff:
# blkid
/dev/sdb1: UUID="dcf25ea5-a302-24a4-9929-d90d71a9d1f9" 
TYPE="linux_raid_member" PARTUUID="afffafff-01"
/dev/sdb3: UUID="4ed92802-d76e-f428-65a7-88d39a403e70" 
TYPE="linux_raid_member" PARTUUID="afffafff-03"
/dev/sda1: UUID="dcf25ea5-a302-24a4-9929-d90d71a9d1f9" 
TYPE="linux_raid_member" PARTUUID="b1d2b1d2-01"
/dev/sda3: UUID="4ed92802-d76e-f428-65a7-88d39a403e70" 
TYPE="linux_raid_member" PARTUUID="b1d2b1d2-03"
/dev/md0: LABEL="/boot" UUID="4aad5633-a2b4-4106-b3ee-7f8820bcf2cb" 
TYPE="ext2"
/dev/md2: UUID="8S0brw-Yh7S-dAe3-1ogV-e4SY-hZUs-CLaPQq" TYPE="LVM2_member"

# cat /etc/mdadm.conf
DEVICE /dev/sd[ab][123]
ARRAY /dev/md0 UUID=dcf25ea5:a30224a4:9929d90d:71a9d1f9
ARRAY /dev/md2 UUID=4ed92802:d76ef428:65a788d3:9a403e70

packages:
Mon Feb 17 15:10:59 2014 util-linux-2.24.1-1.x86_64
Sat Apr  5 15:48:03 2014 udev-208-11.x86_64
Sat Apr  5 15:48:03 2014 systemd-208-11.x86_64
Mon Feb 17 14:47:39 2014 mdadm-3.3-4.x86_64

-- 
glen



More information about the pld-devel-en mailing list