[systemd-devel] fstab automount of a mdns samba share
Julian Sikorski
belegdol at gmail.com
Thu Sep 30 19:20:43 UTC 2021
W dniu 28.09.2021 o 10:34, Colin Guthrie pisze:
> Julian Sikorski wrote on 28/09/2021 07:37:
>> W dniu 27.09.2021 o 16:38, François Cami pisze:
>>> Hi,
>>>
>>> On Mon, Sep 27, 2021 at 4:05 PM Julian Sikorski <belegdol at gmail.com>
>>> wrote:
>>>>
>>>> Hi list,
>>>>
>>>> I am trying to set up an automount of my samba share. It works when
>>>> I go
>>>> by the IP address, i.e.
>>>>
>>>> //192.168.0.220/julian /mnt/openmediavault cifs
>>>> credentials=/home/julas/.credentials,uid=julas,gid=julas,vers=3.1.1,nobrl,auto
>>>>
>>>> 0 0
>>>
>>> If this is in fstab, it's different from autofs/automount.
>>> Try adding _netdev to mount options.
>>>
>>> François
>>
>> Yes, this is in fstab. _netdev has helped, thanks! Would you mind
>> explaining why it was not required when the IP address was being used?
>> Network is needed either way.
>
> I suspect it's just a race condition related to timeouts etc. Perhaps
> the retry/timeout logic of mounting via IP is better than name lookup
> timeouts etc.
>
> _netdev is definitely the right fix here but depending on the
> portability of the machine (i.e. if it's a laptop) you may also want to
> look at x-systemd.automount option too to make it mount the path only
> when you try to access it rather than at boot. If not automount, then
> perhaps "x-systemd.mount-timeout=infinity,retry=9999" is also useful to
> make things more robust (although I'm not sure how these work with cifs).
>
> See man systemd.mount for some more info.
>
> HTHs
>
> Col
>
Thanks for the explanation, it makes sense. This machine is a desktop so
automount is not needed, I might use it for my laptop though.
Best regards,
Julian
More information about the systemd-devel
mailing list