ronnih
September 26, 2021, 3:08pm
#1
Hello,
my NFS storage is not mounting in openSuse 15.3 after I start my computer. If I do a manual
*sudo mount -a*
all NFS storage are mounted without any problem.
The output from showmount on my openSuse 15.3 Computer:
iglu**:~ #** showmount -e mynfsserver
Export list for mynfsserver:
/mnt *
/srv/nfs/USBDisk/NFSFreigabe *
/srv/nfs/USBDisk/backup iglu.speedport.ip,tvpi.speedport.ip,eisbaer,pinguin.speedport.ip,wolf.speedport.ip
I know it from my other computer(raspbery Pi´s) where I mount the NFS storage too. Here I musst select in the
raspi-config
Wait for Network at Boot. In openSuse I had activate the following systemd units:
systemctl enable systemd-networkd-wait-online.service
the other units:
tux@iglu:~> systemctl list-unit-files --no-pager |grep -i wait
chrony-wait.service disabled disabled
NetworkManager-wait-online.service enabled disabled
plymouth-quit-wait.service static -
systemd-networkd-wait-online.service enabled disabled
systemd-time-wait-sync.service disabled disabled
What can I do in openSuse to mount it during boot?
Many Thanks for helping me
ronni
hcvv
September 26, 2021, 3:51pm
#2
More people have found this. Some found in their logings that it is mounted on boot, but immediately unmounted again.
Many have found that using automount using systemd (even easier to use then the classic way of automount using /etc/auto.master) helps here. It will mount when needed (when some process accesses a file in there) and unmount after a certain amount of time of no usage. This is an example of the options used in /etc/fstab for such an entry:
noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min
Remarks:
the _netdev is not really needed, it is forced already by the other options;
x-systemd.idle-timeout=5min, choose you own time-out (10 mins does also look not bad to me);
x-systemd.mount-timeout=10 is the time-out at mounting before an error is thrown, normally mounting is with the second.
Are you using systemd-networkd to manage your network configuration?
What can I do in openSuse to mount it during boot?
It depends on what network management program you are using. And it is openSUSE, not openSuse.
ronnih
September 26, 2021, 8:21pm
#4
Hello together,
thank you for the fast answers.
@arvidjaar
yes I use the systemd-networkd.service:
**iglu:~ #** systemctl status systemd-networkd.service
**●** systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: disabled)
Active: **active (running)** since Sun 2021-09-26 08:47:46 CEST; 11h ago
Docs: man:systemd-networkd.service(8)
Main PID: 430 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/systemd-networkd.service
└─430 /usr/lib/systemd/systemd-networkd
Sep 26 08:47:45 iglu systemd[1]: Starting Network Service...
Sep 26 08:47:46 iglu systemd-networkd[430]: Enumeration completed
Sep 26 08:47:46 iglu systemd[1]: Started Network Service.
Sep 26 08:47:55 iglu systemd-networkd[430]: eth0: Link UP
Sep 26 08:48:09 iglu systemd-networkd[430]: eth0: Gained carrier
Sep 26 08:48:11 iglu systemd-networkd[430]: eth0: Gained IPv6LL
In Yast he shows network-Manager
Okay openSUSE, you are right
@hcvv
I see in the journal that he try to mount it during boot and the error message is here:
[FONT=monospace]mount.nfs: Network is unreachable
[/FONT]
I will try you fstab options and I enable the autofs.service
regards
ronnih
hcvv
September 26, 2021, 8:35pm
#5
I doubt you need that. On the system where I use it:
beneden:~ # systemctl status autofs
● autofs.service - Automounts filesystems on demand
Loaded: loaded (/usr/lib/systemd/system/autofs.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:automount(8)
man:autofs(5)
beneden:~ #
The full /etc/fstab entry is
beneden:~ # grep nfs /etc/fstab
boven.henm.xs4all.nl:/home/wij /home/wij nfs noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min 0 0
beneden:~ #
and that was all I needed.
Really? Did you actually configure it to do anything? You never mentioned it.
In Yast he shows network-Manager
Which means you now have two programs that manage network.
systemd-networkd-wait-online waits for known interfaces. You did not say anything about having configured anything for systemd-networkd, so the obvious conclusion - there are no interfaces to wait for.
NetworkManager-wait-online waits for nm-online to return success. Whether your NFS server is also available when this happens we do not know. Nor do we even know whether you configured system or user connections in NetworkManager.
Show full output of “journalctl -b” after boot before you mount anything. This may provide some hint what happens.
ronnih
September 28, 2021, 7:12pm
#7
Hi,
short feedback, at the moment I had restart my computer 2 times. And my NFS storage was mounted at boot. The only think what I had changed was:
systemctl enable autofs.service
My fstab looks:
...
....
mynfsserver:/srv/nfs/USBDisk/backup /media/backup nfs rw 0 0
mynfsserver:/srv/nfs/USBDisk/NFSFreigabe /home/pi/NFSFreigabe nfs rw 0 0
I will give further feedback if I become trouble with this setup.
Regards
ronnih