Davide Mancusi wrote: > Hi .*, > > I have an external USB hard disk that I use for automated > backups. I have written the following udev rules: > SUBSYSTEMS=="usb", ATTRS{serial}=="574341535530323537353839", > KERNEL=="sd?", SYMLINK+="exthd", GROUP="plugdev" SUBSYSTEMS=="usb", > ATTRS{serial}=="574341535530323537353839", KERNEL=="sd?1", > SYMLINK+="exthd1", GROUP="plugdev" > to create symlinks to the right device and partition, and I have a > fstab entry: > /dev/exthd1 /mnt/exthd ext3 user,auto,errors=remount-ro 0 2 > to mount the backup partition automatically at boot time. > > The problem is that sometimes, when init calls > fsck, /dev/exthd1 has not appeared yet, fsck bombs and init drops me to > an emergency shell. This happens about 50% of the times. Then I use the > emergency prompt to check if /dev/exthd1 actually exists, and, again, > 50% of the times it doesn't; the /dev/sd?1 file is always there, > though. When /dev/exthd1 doesn't exist, a "udevadm trigger" will bring > it up. > > This looks like some kind of race condition between kernel and > udev, but I don't really understand why udev doesn't pick on the new > devices automatically, as soon as the kernel creates them. I have tried > to add WAIT_FOR="/dev/exthd1" to my udev rule, but it didn't help. > > Any help would be appreciated. > > Davide >
Upto 2.6.26 I know there is a delay_use option for usb_storage. It's set to 5sec by default. I didn't look for such an option in 2.6.28, but as delay_use is doing nothing I assume it was either removed or replaced. What you describe sounds like this default is working for you. Are you using 2.6.26 or similar. try adding following somehwere in your /etc/modprobe.d/ files options usb-storage delay_use=0 regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org