Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

x-systemd.automount & CIFS shares in fstab

Writer Matthew Harrington

In my /etc/fstab, I have set up a few CIFS shares to be mounted, using the template shown below:

//192.168.0.1/volume /mnt/mountpoint/ cifs auto,_netdev,x-systemd.automount,uid=1000,cache=none,user=XXX,password=XXX,workgroup=WORKGROUP 0 0

I copied the same lines to my colleague's computer (we are both running Ubuntu 12.04 LTS); however, the shares wouldn't mount on his computer until I removed the x-systemd.automount option.

As I'd like to understand the problem, could you please let me know what might have caused it?

1

2 Answers

systemd was introduced in ubuntu 15.04.

After adding x-systemd.automount to an fstab line, you need to run:

sudo systemctl daemon-reload

and then one, or both, of the following:

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

only then will the automount become active.

1

Ubuntu doesn't use systemd, so x-systemd.automount won't work. I guess it is just interpreted as an invalid mount option.

If you want to have your CIFS share mounted on-demand have a look at this:

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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