You are not logged in.
Hello,
I have some errors while booting after adding an external drive to fstab.
fstab:
UUID=f114e359-8c26-458d-8e98-88b8e5887a72 /mnt ext4 defaults,nofail,x-systemd.device-timeout=1ms 0 2problem part of journalctl:
dev-disk-by\x2duuid-f114e359\x2d8c26\x2d458d\x2d8e98\x2d88b8e5887a72.device: Job dev-disk-by\x2duuid-f114e359\x…t timed out.
Timed out waiting for device /dev/disk/by-uuid/f114e359-8c26-458d-8e98-88b8e5887a72.
Dependency failed for /mnt.
mnt.mount: Job mnt.mount/start failed with result 'dependency'.
Dependency failed for File System Check on /dev/disk/by-uuid/f114e359-8c26-458d-8e98-88b8e5887a72.full journalctl:
http://0x0.st/He-E.txt
upd:
device mounts to /mnt at start up and all is fine, I just want to get rid of the warnings
How to get rid of these errors, they show up at start up and annoying.
Need I a mount unit maybe instead of fstab?
Thanks in advance
Last edited by knarh (2023-07-20 14:33:12)
Offline
Is the device in question plugged in? UUID correct? Why are you having it timeout after 1ms?
Offline
Is the device in question plugged in?
Yes
UUID correct?
Yes
Why are you having it timeout after 1ms?
from fstab wiki:
The nofail option is best combined with the x-systemd.device-timeout option. This is because the default device timeout is 90 seconds, so a disconnected external device with only nofail will make your boot take 90 seconds longer, unless you reconfigure the timeout as shown. Make sure not to set the timeout to 0, as this translates to infinite timeout.
The problem that I see while booting thing like that:
[TIME] Timed out waiting for device /dev/disk/by-uuid/f114...
[DEPEND] Depandency failed for /mnt
[DEPEND] Dependency failed for File System Check on /dev/disk/by-uuid/f114...upd:
maybe I need to turn off systemd warning? to get rid of this
[TIME] Timed out waiting for device /dev/disk/by-uuid/f114...but I don't know that to do with dependencies
Last edited by knarh (2023-07-20 13:47:35)
Offline
1ms means that the service waits for 1 millisecond for the device to become available before failing. You really don't see an issue with that?
You might want to look into the noauto or systemd.automount options
Last edited by Scimmia (2023-07-20 13:47:52)
Offline
You might want to look into the noauto option
Why? I want to mount it on start up if it's plugged
1ms means that the service waits for 1 millisecond for the device to become available before failing.
if I understood correctly from this
so a disconnected external device with only nofail will make your boot take 90 seconds longer
then service will wait 90s. Is it wrong?
Offline
You overrode that 90 seconds with 1ms.
Offline
You overrode that 90 seconds with 1ms.
Yes, because I don't want to wait 90s
Offline
We're going in circles. If you really can't grasp that 1ms isn't enough, I can't help you.
Offline
If you really can't grasp that 1ms isn't enough
Why it isn't enough?
upd:
i didn't write it in original post but, device mounts to /mnt and all is fine, I just want to get rid of the warnings
Last edited by knarh (2023-07-20 14:14:25)
Offline
No disk hardware in the world will answer within 1ms. Do something sensible that doesn't annoy you too much, like 5 seconds or so. You can probably go lower 2 to 3 secs, depends on your hardware. 1ms will not be enough ever, not even with the fastest SSD.
Also note that this timeout (when sensible) will only be relevant when the device is not actually there. FWIW properly configuring systemd.automount will transparently for you take care of this without the shenanigans you are getting yourself into with the conditions you currently have.
Last edited by V1del (2023-07-20 14:16:39)
Offline
But why it mounts anyway?
upd:
properly configuring systemd.automount will transparently for you take care of this
maybe
Last edited by knarh (2023-07-20 14:19:40)
Offline
You simply fail the systemd mount unit (and the filesystem check), the mount command as such has been issued and will succeed eventually. But best not gamble with such trivially correctable side effects and set something useful.
Offline
Ok, I understood. 1s works fine, wiki needs correction.
Thanks!
Offline
I changed the wiki to something sensible.
Offline