Bug 484112 - USB mount via /etc/fstab doesn't work at system startup
USB mount via /etc/fstab doesn't work at system startup
Status: CLOSED DUPLICATE of bug 481470
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-02-04 15:51 EST by Frank van Maarseveen
Modified: 2014-03-16 23:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-03-20 17:06:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frank van Maarseveen 2009-02-04 15:51:17 EST
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
(no modules but this is probably not an issue). Except for the home brew
(stock) kernel all up-to-date for F10.

How reproducible:
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).

Actual results:

Expected results:

Additional info:
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.
Comment 1 Bill Nottingham 2009-02-04 16:37:06 EST
/proc/partitions actually has devices *detach* while in start_udev? That shouldn't happen.
Comment 2 Bill Nottingham 2009-03-20 17:06:27 EDT
I believe this bug is a duplicate of another one already filed.b

*** This bug has been marked as a duplicate of bug 481470 ***
Comment 3 Radek Hladik 2009-11-02 11:03:02 EST
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. 

FSTAB line:
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).

Note You need to log in before you can comment on or make changes to this bug.