1

I added an automount rule to /etc/fstab for a USB drive in my board as follows:

/dev/sda1  /media  vfat  noauto,nofail,x-systemd.automount,x-systemd.idle-timeout=2,x-systemd.device-timeout=2 ..

I use the device name because it'll be the same, UUID might vary.

After running

systemctl daemon-reload && systemctl restart local-fs.target

the automount works fine and the drive is mounted in the right path.

However when I check the content of /proc/mounts, I see an entry that corresponds to my automount rule but the device name is replaced by systemd-1, here:

systemd-1 /media autofs rw,relatime,fd=32,pgrp=1,timeout=2,minproto=5,maxproto=5,direct 0 0

My questions are:

  1. Why /dev/sda1 is replaced by systemd-1?
  2. How to fix it so the device name appears instead?
0

autofs is not your mount point, it's a virtual mount point which systemd uses to monitor access to it, and decide when to mount the actual filesystem. If you try to cd /media, you should notice a slight delay, and a new child mountpoint with the actual device.

The advantage of automount is the ability to give a reserved mount point to removable devices, without needing to connect them when the system starts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.