Moving from autofs to automount with systemd

Ask questions about Arch Linux ARM. Please search before making a new topic.

Moving from autofs to automount with systemd

Postby unformatted » Mon Aug 09, 2021 4:10 pm

Since autofs has moved to AUR and not for arm (see viewtopic.php?f=60&t=15490) I decided to go for automount with systemd (thanks @graysky). I have added the following line to fstab to connect to my NFS server:

$this->bbcode_second_pass_code('', '
192.168.4.51:/mnt/ /net/192.168.4.51/mnt nfs noauto,fg,nofail,x-systemd.automount,x-systemd.mount-timeout=30,_netdev,x-systemd.idle-timeout=60 0 0
')

which mounts the drive volume mounted on the server (under 192.168.4.51:/mnt/ ) on /net/192.168.4.51/mnt (the same path as used by autofs so I don't have to reconfigure all my clients).

As with autofs this mounts on demand and unmounts after 1 minute of inactivity. I also added "fg,nofail" so that in case the NFS server goes down, the client does not "freeze" when trying to connect.

This all works very well but my question is about the order of the options: can these be in random order or is there a preferred order? I don't want to mess up anything on my server and want to be absolutely sure that there are no pitfalls here before I start rolling this out to all of my Pi's. I couldn't find anything on the wiki.
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

Re: Moving from autofs to automount with systemd

Postby graysky » Mon Aug 09, 2021 5:36 pm

Order should not matter
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to User Questions

Who is online

Users browsing this forum: No registered users and 8 guests