You are not logged in.
Hi,
I put the following samba shares in /etc/fstab:
//192.168.0.125/Obmen /home/alexey/smb4k/WSERVER/Obmen cifs uid=1000,username=uname,password=passwd 0 0
//192.168.0.125/БОС /home/alexey/smb4k/WSERVER/БОС cifs uid=1000,username=uname,password=passwd 0 0
This configuration always passes
$ sudo mount -a
but on boot one of the shares may be mounted unsuccessfully. The probability of total success is about 0.5, that is.
KDE, NetworkManager, everything by default, so far as I know. What would be the correct approach?
There's a lot of options in ArchWiki, but it is not obvious which ways are obsolete or too special. I'd be grateful for any KISS suggestion.
Last edited by Llama (2013-11-08 12:35:47)
Offline
Your network connection needs to be established before fstab parses the samba entry. The "problem" here is, that systemd tries to start as many services parallel as possible, so there is a chance, that the network connection has not been established by the time fstab is parsed and the share is mounted.
Offline
Your network connection needs to be established before fstab parses the samba entry. The "problem" here is, that systemd tries to start as many services parallel as possible, so there is a chance, that the network connection has not been established by the time fstab is parsed and the share is mounted.
That's probably it. Looks like this one will do, /etc/fstab:
//192.168.0.125/Obmen /home/alexey/smb4k/WSERVER/Obmen cifs noauto,uid=1000,credentials=/home/alexey/.smbcredentials,x-systemd.automount 0 0
//192.168.0.125/БОС /home/alexey/smb4k/WSERVER/БОС cifs noauto,uid=1000,credentials=/home/alexey/.smbcredentials,x-systemd.automount 0 0
More or less straight dope on the subject. The killer of the race condition is noauto,x-systemd.automount.
Offline
That's even better than my initial thought, well done. I would probably have written my own mount unit or something along the lines.
Offline