Bug 484112 - USB mount via /etc/fstab doesn't work at system startup
Summary: USB mount via /etc/fstab doesn't work at system startup
Keywords:
Status: CLOSED DUPLICATE of bug 481470
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-04 20:51 UTC by Frank van Maarseveen
Modified: 2014-03-17 03:17 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-03-20 21:06:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Frank van Maarseveen 2009-02-04 20:51:17 UTC
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.

/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 2.6.27.13
(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 21:37:06 UTC
/proc/partitions actually has devices *detach* while in start_udev? That shouldn't happen.

Comment 2 Bill Nottingham 2009-03-20 21:06:27 UTC
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 16:03:02 UTC
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.