Red Hat Bugzilla – Bug 484112
USB mount via /etc/fstab doesn't work at system startup
Last modified: 2014-03-16 23:17:27 EDT
Description of problem:
Permanent UUID= based mount of an USB storage device via /etc/fstab
mostly doesn't work due to a race between mount and kernel+udev in
/etc/rc.sysinit calls /sbin/start_udev. Before, the kernel knows the particular
USB storage device according to /proc/partitions but afterwards not (!). It
takes seconds for the device to appear again in /proc/partitions and probably
a bit longer for udev to populate /dev accordingly. This causes a mount -a
around line 666 in /etc/rc.sysinit to fail.
Version-Release number of selected component (if applicable):
Using F10, initscripts-8.86-1.i386, udev-127-3.fc10.i386, kernel 188.8.131.52
(no modules but this is probably not an issue). Except for the home brew
(stock) kernel all up-to-date for F10.
3 out of 4 times the USB storage device doesn't get mounted and "mount -a"
around line 666 in /etc/rc.sysinit correctly complains that there is no
/dev/sd* (verified with strace).
Steps to Reproduce:
Boot the system with an USB storage device present and preconfigured
in /etc/fstab. If mount happens to succeed everytime then compare
/proc/partition output before and after the /sbin/start_udev command
in /etc/rc.sysinit (it is a race condition after all).
The work-around is to wrap the /sbin/start_udev command inside
/etc/rc.sysinit: before, remember the devices present in
/proc/partitions. Afterwards, wait until they are all present in
/dev. This results in a considerable delay however.
/proc/partitions actually has devices *detach* while in start_udev? That shouldn't happen.
I believe this bug is a duplicate of another one already filed.b
*** This bug has been marked as a duplicate of bug 481470 ***
I am expiriencing the same problem on F11 (64bit). Initscripts is version initscripts-8.95-1.x86_64 that should fix the problem according to duplicate bug. However it still fails on almost every boot.
UUID=9ebdd657-f31b-43db-85aa-8185e60ad3ea /boot ext3 defaults 1 0
If I change the last 0 to 1 to force fsck on boot the system fails to boot. On console one can see the prompt for root password and a few moments after message that USB device has been found. With the zero system boots but if it would not be /boot partition it could make problems during service startup (the USB device us sometimes found even after complete startup).