Autofs won't work on new install

No mount command. When you restart the actual autofs.service.

EDIT: I see the confusion. I meant checking after you restart the autofs.service, by using the mount command without any parameters. (Simply typing mount in the terminal will list the contents of your mtab, AKA current mounts.)

Not when using systemd-mount or the .mount / .automount units, it will be handled automatically :wink:


@Magician1981 new technologies replace old ones in due time, so trust the knowledge of those trying to help you and switch to the systemd way of mounting and auto-mounting…
It is already part of your default system install, and most other distros, no need to install and fiddle with old software…

When it comes to autofs most likely not starting at boot has already been pointed out with the systemctl enable --now command…

:information_source: :mega:I wish as a New-year present that no-one in the world will ever use the mount command again ever and all switch to systemd-mount eg:

  • systemd-mount -t nfs 192.168.1.100:/Torrent /mnt
    or similar commands…

systemd-mount can do much more as the prehistoric mount command with a much more user-friendly and understandable way of config…

  • Death to /etc/fstab :rofl:
2 Likes
    ~  mount                                                            ✔ 
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=15988712k,nr_inodes=3997178,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/nvme0n1p2 on / type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=21569)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p2 on /home type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home)
/dev/nvme0n1p2 on /var/cache type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=258,subvol=/@cache)
/dev/nvme0n1p2 on /var/log type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=259,subvol=/@log)
tmpfs on /tmp type tmpfs (rw,noatime,inode64)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3199956k,nr_inodes=799989,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdb1 on /run/media/magician/poep type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/etc/autofs/auto.misc on /misc type autofs (rw,relatime,fd=5,pgrp=2773,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=29187)
-hosts on /net type autofs (rw,relatime,fd=11,pgrp=2773,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=32428)
/etc/autofs/auto.shares on /mnt type autofs (rw,relatime,fd=17,pgrp=2773,timeout=600,minproto=5,maxproto=5,indirect,pipe_ino=32431)

Some autofs refference near the bottom.

I’m aware of sotfware progres, however if it works it works…
This will automount at boot every time? What happens when nfs shares are not available when nas is offline? Thank you for your input.

The systemd automount functionality when properly setup does yes…

Then the unit (action) will just fail and not mount, simple as that :smile_cat:

I used this method and it is working for me.
If you need to see any of my config files I can show them to you.
https://forum.manjaro.org/t/root-tip-how-to-use-systemd-to-mount-any-device/1185

I am having a look at some guides online right now, but your examples would surely help.

AW HELL YEAH!!!

Found out what the problem was. Basically I created a new text file called auto.nas and put the contents of auto.shares in that file. Modified auto.master to point to the new ‘‘shares’’ file and it worked. My guess is that it had something to do with permissions right? Strange that on all other systems it was just a matter of copy pasting the files and restarting autofs service.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.