6

Is there something wrong with my mounting?

//192.168.1.150/Drew /media/Cloud cifs auto,credentials=/home/drew/.credentials/smb,_netdev,uid=drew,gid=drew,rw 0 0

When I run sudo mount -a the drive is mounted, no issues. But, the drive will not automatically mount when the system boots up?

uname -a
Linux drew-desktop 4.14.24-1-MANJARO #1 SMP PREEMPT Sun Mar 4 21:28:02 UTC 2018 x86_64 GNU/Linux

pacman -Q | grep cifs
cifs-utils 6.7-2

ls -l /media | grep Cloud
drwxr-xr-x  2 drew drew    0 Mar  9 17:32 Cloud
4
  • 1
    Did you enable the service that performs mounting of network filesystems? Commented Mar 11, 2018 at 20:42
  • I do not remember doing so. What is the name of the service that does that? Commented Mar 11, 2018 at 20:49
  • 1
    wiki.archlinux.org/index.php/samba#Automatic_mounting Commented Mar 11, 2018 at 20:52
  • Thanks, I enabled the service and did logged off/in to test it. That seems to have been my issue. Commented Mar 11, 2018 at 20:54

1 Answer 1

8

I had to enable the service that automounts network drives as @Ignacio Vazquez-Abrams said. The details are here.

sudo systemctl enable systemd-networkd-wait-online
3
  • Thanks for reporting your success! <del>The detailed effect of this command is detailed at freedesktop.org/wiki/Software/systemd/NetworkTarget/</del> This sounds like it was a bug in your original setup. Network mounts (especially if you set _netdev in the options) automatically get After=network-online.target and Wants=network-online.target. Pulling in network-online.target is supposed to do the job. E.g. on my computer, NetworkManager-wait-online.service has been enabled, by which it means it is started when (well, before) network-online.target is started... Commented Mar 11, 2018 at 21:10
  • This is Fedora, and the unit is enabled by systemd.preset. However this Fedora setup also appears stupidly fragile. If NetworkManager is used (enabled), I don't see why it wouldn't automatically enable the corresponding wait-online service, using an Also= in the [Install] section of NetworkManager.service Commented Mar 11, 2018 at 21:13
  • There was a similar bug in the systemd-networkd units which was fixed in v234: github.com/systemd/systemd/commit/… Commented Mar 11, 2018 at 21:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.