2

I am mounting a samba share using fstab file as:

//192.168.2.2/Expansion     /samba/raspberry/   cifs    x-systemd.automount,x-systemd.device-timeout=10s,_netdev,users,nofail,uid=1000,gid=1000,credentials=/home/edward/.smbcredentials,iocharset=utf8,sec=ntlm    0   0

but the thing with this entry is systemd will try to mount it even if I don't need it.
So is there any option of mount command for fstab file that will mount this only on first access by shortcut in nautilus?

I am using latest Arch Linux with Gnome 3.18

Please note: I am taking this question with samba share but the question is about option we can use in fstab file

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

i haven't tested this with samba, but it's probably the same as with a local filesystem.

you need to change edit fstab line to include the two options x-systemd.automount,noauto and then it will not be mounted automatically, it will only be mounted when accessed. to make it active instantly, instead of having to reboot, do the following:

  sudo systemctl daemon-reload

and then both, or one, of the following:

  sudo systemctl restart remote-fs.target
  sudo systemctl restart local-fs.target

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.