Hi, I also have been battling with this race condition for the past few years. I have a non-complicated non-RAID (although I do see this on my software RAID boxen too) where /usr, /var and /home are part of an LVM however my root is not.
My /etc/fstab typically looks like: ---- LABEL=swap none swap sw 0 0 LABEL=root / auto relatime 0 1 LABEL=usr /usr auto relatime,nodev 0 2 LABEL=var /var auto relatime,nodev,nosuid 0 2 LABEL=home /home auto relatime,nodev,nosuid,noexec 0 2 tmpfs /tmp tmpfs nodev,nosuid,noexec,size=32M 0 0 tmpfs /var/tmp tmpfs nodev,nosuid,noexec,size=8M 0 0 varrun /var/run tmpfs nodev,nosuid,noexec,size=512k 0 0 varlock /var/lock tmpfs nodev,nosuid,noexec,size=96k 0 0 #/dev/hda /media/cdrom0 auto ro,user,noauto 0 0 #/dev/hdf /media/cdrom1 auto ro,user,noauto 0 0 #/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 ---- When my box boots I can often stumble onto: ---- Setting up LVM Volume Groups Reading all physical volumes. This may take a while... Found volume group "lvm-oghma" using metadata type lvm2 3 logical volume(s) in volume group "lvm-oghma" now active . Checking file systems...fsck 1.41.3 (12-Oct-2008) /sbin/fsck.xfs: XFS file system. /sbin/fsck.xfs: XFS file system. /sbin/fsck.xfs: LABEL=home does not exist fsck died with exit status 8 failed (code 8). File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file sy A maintenance shell will now be started. CONTROL-D will terminate this shell and resume system boot. (warning). Give root password for maintenance (or type Control-D to continue): ---- This happens about 80% of the time on some kit, 10% on others. Sometimes it grumbles that LABEL=usr or LABEL=var does not exist instead so it is very obviously a race condition. Looking at what could be going on, /etc/rcS.d/S26lvm2 shoots through without pausing and so udev is in a state where it has not quite created all the softlinks in /dev/disk/by-label in time for when /etc/rcS.d/S30checkfs.sh kicks in. This is trivially fixed by amendment to /etc/init.d/lvm2 that 'StalkR' suggested, and is done by the patch I have attached. Now when my boxes boot I get: ---- Setting up LVM Volume Groups Reading all physical volumes. This may take a while... Found volume group "lvm-oghma" using metadata type lvm2 3 logical volume(s) in volume group "lvm-oghma" now active . Checking file systems...fsck 1.41.3 (12-Oct-2008) /sbin/fsck.xfs: XFS file system. /sbin/fsck.xfs: XFS file system. /sbin/fsck.xfs: XFS file system. done. Setting kernel variables (/etc/sysctl.conf)...done. Mounting local filesystems...Filesystem "dm-0": Disabling barriers, not supported by the underlying device XFS mounting filesystem dm-0 Filesystem "dm-1": Disabling barriers, not supported by the underlying device XFS mounting filesystem dm-1 [snipped] ---- Please include this, get it pushed into 'lenny' too and 'squeeze' as it really is a nasty showstopper that makes booting of servers potentially very unreliable. Cheers -- Alexander Clouter .sigmonster says: What foods these morsels be!
--- /etc/init.d/lvm2.orig 2010-04-09 11:37:38.797612918 +0100 +++ /etc/init.d/lvm2 2010-04-09 11:41:54.381369016 +0100 @@ -37,6 +37,7 @@ 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac + [ -x /sbin/udevadm ] && /sbin/udevadm settle ;; stop) log_begin_msg "Shutting down LVM Volume Groups"