Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2849

System and Network configuration • Re: Error while loading samba network mount point during boot sequence

$
0
0
Hello,
First of all thank you for your detailed answer and sorry for this late answer.
Thanks for updating the discussion.
Too bad that you don't face the same issue so that we can identify the best fix.
You can replicate it as you wish, therefore you can experiment to find the best fix possible. :wink:
I agree that this is a common question, I found indeed many people trying to solve similar issue but without having a clear and systematic answer to solve this.
Yes, deepening into the internal working of systemd can be very interesting: it is what I tried to do.
In my case I must admit that I have spent much more time that expected trying to solve this issue, the extra attributes (_netdev,nofail,x-systemd.automount) in the /etc/fstab didn't really helped on my side.
It would be interesting to check system logs with _netdev,nofail,x-systemd.automount in your /etc/fstab (without the two services listed below as alternative solution).
I fell back on the solution presented in this topic and created the same service as the one suggested :

Code:

cat /etc/systemd/system/ping-available.service[Unit]Description=Wait for ping to be availableAfter=network-online.targetRequires=network-online.target[Service]Type=oneshotExecStart=/usr/bin/bash -c 'until /usr/bin/ping -qW 1 -c1 192.168.1.254; do sleep 1; done'RemainAfterExit=yesTimeoutSec=30[Install]WantedBy=network-online.target
Then added the following requirements on my mount services :

Code:

cat /etc/systemd/system/mnt-synology-western.mount[Unit]Description=mount point for western digital filesAfter=ping-available.serviceWants=ping-available.service[Mount]What=//192.168.1.60/Western DigitalWhere=/mnt/synology/westernType=cifsOptions=vers=3.0,credentials=/root/.synocredDirectoryMode=0700TimeoutSec=30[Install]WantedBy=multi-user.target
This is solution is not as clean as I you have wanted but it does the job and works fine after each reboot.
I also added the same requirement on my docker service as I had a container requiring the mounted directory as well.

Hope it can help other people.
Sure it will do !

I'm glad you sorted it out. :)

Please, mark the discussion as "solved" by manually adding the text tag "[Solved]" to the beginning of the subject of the first post.

Happy Debian !

Statistics: Posted by Aki — 2024-06-09 08:28



Viewing all articles
Browse latest Browse all 2849

Trending Articles