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 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...
    – sourcejedi
    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
    – sourcejedi
    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/…
    – sourcejedi
    Mar 11, 2018 at 21:16

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.