You are not logged in.

#1 2017-05-08 07:39:42

lah
Member
Registered: 2014-08-26
Posts: 28

Samba shares : systemd timeout not respected

From wiki :
https://wiki.archlinux.org/index.php/fs … th_systemd

I added an fstab entry for a samba share and made some tests related to x-systemd.device-timeout https://www.freedesktop.org/software/sy … mount.html
When my share is offline, I do not want my explorer, be blocked during many seconds.

So I did  a test with this entry that is an offline share, 192.168.132.1 is not im my vlan,:

//192.168.132.1/rpi_projects /mnt/rpi-dev_projects  cifs  noauto,x-systemd.device-timeout=3,x-systemd.automount,username=user,password=pass   0   0 
time ls /mnt/rpi-dev_projects/
ls: impossible d'accéder à '/mnt/rpi-dev_projects/': Aucun périphérique de ce type

real	0m10,204s
user	0m0,003s
sys	0m0,003s

I've also tried with  option x-systemd.mount-timeout. In all cases, when system tries to access share, it takes ~10s.

NetworkManager.service and NetworkManager-wait-online.service are active.
Here are systemd logs :

mai 08 09:36:43 remi-hp9470m systemd[1]: mnt\x2drpi\x2ddev_projects.automount: Got automount request for /mnt/rpi-dev_projects, triggered by 15606 (mount.cifs)
mai 08 09:36:43 remi-hp9470m systemd[1]: Mounting /mnt/rpi-dev_projects...
mai 08 09:36:52 remi-hp9470m systemd[859]: Time has been changed
mai 08 09:36:52 remi-hp9470m systemd[1]: Time has been changed
mai 08 09:36:54 remi-hp9470m systemd[1]: mnt\x2drpi\x2ddev_projects.mount: Mount process exited, code=exited status=32
mai 08 09:36:54 remi-hp9470m systemd[1]: Failed to mount /mnt/rpi-dev_projects.
mai 08 09:36:54 remi-hp9470m systemd[1]: mnt\x2drpi\x2ddev_projects.mount: Unit entered failed state.

Why aren't systemd timeout respected?

Offline

#2 2017-05-08 20:03:15

lah
Member
Registered: 2014-08-26
Posts: 28

Re: Samba shares : systemd timeout not respected

Here is a solution not using systemd that handle mounting / umounting when shares are online/offline :
https://gist.github.com/Lahorde/f54bc23 … 3fa40e9016

Offline

Board footer

Powered by FluxBB