If I have a line like this in my fstab: /dev/disk/by-uuid/c9ae0ba9-cf16-4d7c-b069-cab43a0529c6 /opt/somedir ext4 defaults,x-systemd.automount,nofail 0 0 and then do a "ls /opt" the ls command will never finish (of course only if there is no device with that UUID). I can only guess that this is because systemd tries to mount the directory but the device does not exist. Regards Martin
Yes, systemd will wait for the device to appear. Everything else would be racy since during boot-up there's no guarantee that devices might have been probed by the time the first access might happen to the automount directory. Hence systemd must wait for the device to show up, and when it never does this will time out after 90s. You can shorten that timeout howver with the x-systemd.device-timeout= mount option in fstab.
I've changed the line like this: /dev/disk/by-uuid/c9ae0ba9-cf16-4d7c-b069-cab43a052123 /opt/somedir/vivado_2015.2 ext4 defaults,x-systemd.automount,x-systemd.device-timeout=0,nofail 0 0 but ls still does not return. I have created mount scripts that use the "ConditionPathExists=" option to check if the device is available before it gets mounted. Is this also possible with a fstab entry? Should I use the mailing list for further questions?
setting the timeout to 0 actually makes it infinitely long... Set it to "1us" or so... (In reply to Martin Stolpe from comment #2) > I've changed the line like this: > /dev/disk/by-uuid/c9ae0ba9-cf16-4d7c-b069-cab43a052123 > /opt/somedir/vivado_2015.2 ext4 > defaults,x-systemd.automount,x-systemd.device-timeout=0,nofail 0 0 > but ls still does not return. > > I have created mount scripts that use the "ConditionPathExists=" option to > check if the device is available before it gets mounted. Is this also > possible with a fstab entry? No, it is currently not available, and I don't think it will be added. > Should I use the mailing list for further questions? Well, if another issue pops up, sure...
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.