You are not logged in.

#1 2015-06-30 02:10:48

Herodotus
Member
Registered: 2015-06-16
Posts: 24

external devices and 'nofail'

Hello, I was trying to implement the advice shown here:

https://wiki.archlinux.org/index.php?ti … al_devices

and I found that it caused my boot to take 90 seconds longer (each listed device times out after 90 seconds, but luckily they do it in parallel). My solution was to add "x-systemd.device-timeout=1" to each external device line in /etc/fstab. I updated the wiki

https://wiki.archlinux.org/index.php?ti … did=380470
https://wiki.archlinux.org/index.php/Fs … al_devices

but since I didn't check with the BBS people first, I'm not sure if the new version actually describes a recommended configuration. I don't even know if my own experience was caused by some bug in my setup. Wanted to check what other people do so I can get it right. Thanks in advance.

Offline

#2 2015-06-30 05:15:42

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: external devices and 'nofail'

Can you post your current fstab mount in question?

Offline

#3 2015-06-30 06:03:21

Herodotus
Member
Registered: 2015-06-16
Posts: 24

Re: external devices and 'nofail'

Yes, this is the current one. If I remove the "x-systemd.device-timeout=1" then boot pauses for 90 seconds.

# /dev/sdd3
UUID=74ca4b78-7f81-4930-948c-e3b76cb949ce   /   ext4        rw,relatime 0 1
# /dev/sda1
UUID=9a1ca1cb-055c-4f52-8d3f-0afd92e497c0	none      	swap      	defaults,nofail,x-systemd.device-timeout=1  	0 0
# /dev/sdb5
UUID=020245aa-085c-4f08-868b-62b8c74a2d06               none        swap        defaults,nofail,x-systemd.device-timeout=1    0 0
LABEL=advocate /mnt/advocate            auto            defaults,user,nofail,x-systemd.device-timeout=1         0 0
LABEL=attorney /mnt/attorney            auto            defaults,user,nofail,x-systemd.device-timeout=1         0 0
# /dev/sda3
UUID=4ae25530-b104-4e24-9f1f-9d1d8c23ffb3     /mnt/usbrescue  ext4        rw,relatime,nofail,x-systemd.device-timeout=1 0 2
# /dev/sdb1
UUID=06470f56-3b5e-47c9-9bf5-0787a2707e95     /mnt/silenus    ext3        rw,relatime,nofail,x-systemd.device-timeout=1    0 2

This fstab resides on a USB memory stick; the multiple swaps are located on laptops where I might use the USB stick.

It's a bit of a tangent, but ideally I'd like a system where when I plug in a recognized device, then it appears at an assigned mount point (after being fsck'ed). I see on the fstab article that it is possible to use "x-systemd.automount" and "autofs" to create a setup where mount points are mounted and fsck'ed when first accessed:

https://wiki.archlinux.org/index.php/Fs … th_systemd

But I'd rather have them fsck'ed at boot or when I plug them in, as then I don't have to experience a mysterious delay when trying to access a file.

Offline

#4 2015-06-30 21:45:46

branch
Member
Registered: 2014-03-16
Posts: 209

Re: external devices and 'nofail'

Hotplug events are handled by udev so if you want to fsck on plug-in you can write udev rules for this. Then you can set up auto-mounting with either x-systemd.automount OR autofs (not both).

Offline

Board footer

Powered by FluxBB