You are not logged in.

#1 2023-07-20 07:43:22

knarh
Member
Registered: 2023-03-11
Posts: 58

[SOLVED]Boot errors while mounting external ssd

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 2

problem 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

#2 2023-07-20 11:08:09

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED]Boot errors while mounting external ssd

Is the device in question plugged in? UUID correct? Why are you having it timeout after 1ms?

Offline

#3 2023-07-20 13:42:24

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: [SOLVED]Boot errors while mounting external ssd

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

#4 2023-07-20 13:45:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED]Boot errors while mounting external ssd

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

#5 2023-07-20 13:56:37

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: [SOLVED]Boot errors while mounting external ssd

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

#6 2023-07-20 14:02:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED]Boot errors while mounting external ssd

You overrode that 90 seconds with 1ms.

Offline

#7 2023-07-20 14:03:20

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: [SOLVED]Boot errors while mounting external ssd

You overrode that 90 seconds with 1ms.

Yes, because I don't want to wait 90s

Offline

#8 2023-07-20 14:08:55

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED]Boot errors while mounting external ssd

We're going in circles. If you really can't grasp that 1ms isn't enough, I can't help you.

Offline

#9 2023-07-20 14:10:44

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: [SOLVED]Boot errors while mounting external ssd

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

#10 2023-07-20 14:13:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,237

Re: [SOLVED]Boot errors while mounting external ssd

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

#11 2023-07-20 14:17:05

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: [SOLVED]Boot errors while mounting external ssd

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

#12 2023-07-20 14:21:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,237

Re: [SOLVED]Boot errors while mounting external ssd

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

#13 2023-07-20 14:32:13

knarh
Member
Registered: 2023-03-11
Posts: 58

Re: [SOLVED]Boot errors while mounting external ssd

Ok, I understood. 1s works fine, wiki needs correction.

Thanks!

Offline

#14 2023-07-20 15:50:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,237

Re: [SOLVED]Boot errors while mounting external ssd

I changed the wiki to something sensible.

Offline

Board footer

Powered by FluxBB