:: Re: [DNG] Boot hangs with usb disk …
Forside
Slet denne besked
Besvar denne besked
Skribent: J. Fahrner
Dato:  
Til: dng
Emne: Re: [DNG] Boot hangs with usb disk active in fstab
Am 2020-06-14 10:11, schrieb richard lucassen:
> Did you format the disk with a newer system than the system you run it
> on? So, I wonder what happens if you remove the huge_file option


I don't remember on which system I formatted that drive.
After playing around the problem is very strange. It's not the
huge_files option.

With the "nofail" option in fstab the boot does not hang and I can
experiment a little bit.

I made a init script "mounthdd" which mounts the drive if it is not
already mounted, and execute it at several stages. Sometimes the mount
is successful, sometimes not. If I mount the drive interactively with
"sudo mount /hdd" I have 100% success. But if it's executed in
background, it mostly fails.

Next I wrote a little script "wait4hdd"

#!/bin/sh
while ! mountpoint -q /hdd
do
sleep 10
done

and inserted it in the init scripts for daemons that need the disk.
Result: they are waiting endless.

Next I added a cronjob for root:
*/10 * * * * mountpoint -q /hdd || mount /hdd

That tries to mount the drive every 10 minutes if not already mounted.
No success.

But if I do it interactively with "sudo mount /hdd" the drive gets
mounted and the waiting daemons are started.

I'm very confused...