- Posts: 96
- Thank you received: 0
RPi 4B - Network File Share - nfs
- electrosteam
- Topic Author
- Offline
- Premium Member
-
Less
More
1 year 1 month ago #334743
by electrosteam
RPi 4B - Network File Share - nfs was created by electrosteam
Trying to get nfs between workstation and mill.
Posted here hoping the RPi developers may have a solution.
nfs server - workstation: hp desktop ubuntu 24.04.
nfs client - mill: RPi 4B 4GB LC 2.9.4.
wifi is working fine.
sftp between the stations without issue.
nfs works after a manual mount on the client.
Cannot get nfs to mount automatically at start up.
The /etc/fstab file is populated (to the best of my searching).
Tried a couple of web suggestions, but no solution yet.
Looked through the startup log:
- "mount.nfs: Network is unreachable".
Tried several web suggestions, including increasing the wait time.
Did some searching on the Raspberry Forum without success.
When I issue a terminal command "mount' after starting LC, there is a response about an old version and to use "systemctl-daemon reload".
After reboot, entered 'systemctl-daemon reload', got 'command not found'.
Tried 'systemctl daemon-reload', accepted without success.
Any suggestions getting the mount at start-up ?
John.
Posted here hoping the RPi developers may have a solution.
nfs server - workstation: hp desktop ubuntu 24.04.
nfs client - mill: RPi 4B 4GB LC 2.9.4.
wifi is working fine.
sftp between the stations without issue.
nfs works after a manual mount on the client.
Cannot get nfs to mount automatically at start up.
The /etc/fstab file is populated (to the best of my searching).
Tried a couple of web suggestions, but no solution yet.
Looked through the startup log:
- "mount.nfs: Network is unreachable".
Tried several web suggestions, including increasing the wait time.
Did some searching on the Raspberry Forum without success.
When I issue a terminal command "mount' after starting LC, there is a response about an old version and to use "systemctl-daemon reload".
After reboot, entered 'systemctl-daemon reload', got 'command not found'.
Tried 'systemctl daemon-reload', accepted without success.
Any suggestions getting the mount at start-up ?
John.
Please Log in to join the conversation.
1 year 1 month ago #334745
by unknown
Replied by unknown on topic RPi 4B - Network File Share - nfs
My guess is that it's trying to mount the nfs share before the wifi interface is up.
So you may have to look through dmesg to see when the nfs share is being mounted and when the wifi interface is being brought up.
Do you have any issues trying to mount the share after the wifi network is up ?
There may be a way to do it via systemd that waits for the wifi network to come up, I've got a couple of ones that turn off the power related stuff for wifi, but only after the interface is up. Might be able to use the same mechanism to mount the shares once that interface is up.
I'd suggest this isn't a issue related to the Raspberry Pi platform but any situation where an nfs or samba share is automounted and the required interface isn't up at that time.
So you may have to look through dmesg to see when the nfs share is being mounted and when the wifi interface is being brought up.
Do you have any issues trying to mount the share after the wifi network is up ?
There may be a way to do it via systemd that waits for the wifi network to come up, I've got a couple of ones that turn off the power related stuff for wifi, but only after the interface is up. Might be able to use the same mechanism to mount the shares once that interface is up.
I'd suggest this isn't a issue related to the Raspberry Pi platform but any situation where an nfs or samba share is automounted and the required interface isn't up at that time.
Please Log in to join the conversation.
1 year 1 month ago #334746
by unknown
Replied by unknown on topic RPi 4B - Network File Share - nfs
"automount nfs but wait for interface to be up" is a google search phrase that brings up some good answers. Apparently there are some options you can add to fstab to help out.
Please Log in to join the conversation.
- electrosteam
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 96
- Thank you received: 0
1 year 1 month ago #334747
by electrosteam
Replied by electrosteam on topic RPi 4B - Network File Share - nfs
Thanks for the response.
Changed the parameters in the /etc/fstab entry to:
defaults,x-systemd.automount,x-systemd.mount-timeout=30,_netdev,x-systemd.after=network-online.target 0 0
This works fine, thanks.
John.
Changed the parameters in the /etc/fstab entry to:
defaults,x-systemd.automount,x-systemd.mount-timeout=30,_netdev,x-systemd.after=network-online.target 0 0
This works fine, thanks.
John.
Please Log in to join the conversation.
1 year 1 month ago #334748
by unknown
Replied by unknown on topic RPi 4B - Network File Share - nfs
www.geraldonit.com/auto-mount-nfs-share-using-systemd/
My config, original non-auto line commented out new auto one below
#192.168.1.70:/exports/share /nfs/share nfs users,noauto,hard,intr 0 0
192.168.1.70:/exports/share /nfs/share nfs users,_netdev,auto,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=5s 0 0
My config, original non-auto line commented out new auto one below
#192.168.1.70:/exports/share /nfs/share nfs users,noauto,hard,intr 0 0
192.168.1.70:/exports/share /nfs/share nfs users,_netdev,auto,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=5s 0 0
Please Log in to join the conversation.
1 year 1 month ago #334769
by unknown
Replied by unknown on topic RPi 4B - Network File Share - nfs
Thanks mate, must have been posting at the same time.
Anyways I've added this thread to the RPi Index thread under Linuxcnc General Questions.
Anyways I've added this thread to the RPi Index thread under Linuxcnc General Questions.
Please Log in to join the conversation.
Time to create page: 0.124 seconds
