NFS mounts from fedora laptop not working


#1

I have an old laptop that is running Fedora 27 on it and a couple of USB drive hard drives. They are Auto mounted by Fedora in run/media/username/drivename.

I followed the instructions above using IPAddress:/run/media/userbame/drivename /mnt/drivename nfs noauto,xsystemd.automount 0 0 in /etc/fstab

When I try to mount them it times out. If I use the -v option it says no such file or directory. Any thoughts?


Configuring fstab based NFS share mounts
Configuring fstab based NFS share mounts
#2

Well this how to is written quite well


#3

I used showmount -e to find the paths and used those in my commands.

I agree this how to is excellent


#4

I wasn’t sure if the automount on the nfs server might be an issue though


#5

Than I suggest to show the output here so people can advice


#6

Showmount -e run on server

/run/media/ncusack/Expansion *
/run/media/ncusack/Elements *


#7

@nickc So, your /etc/fstab should look like

IPAddress:/run/media/ncusack/Expansion /mnt/Expansion nfs defaults,noauto,x-systemd.automount 0 0
IPAddress:/run/media/ncusack/Elements /mnt/Elements nfs defaults,noauto,x-systemd.automount 0 0

  • IPAddress - the IPv4 of the laptop with Fedora
  • assuming you used/mnt/Expansion and /mnt/Elements as mount points

what is the output of

sudo mount -v -a
sudo mount -v /mnt/Expansion
sudo mount -v /mnt/Elements

#8

Hi,
My /etc/fstab file does indeed have those two lines using the laptop IP address.

Sudo mount -v -a
osmc@osmc:~$ sudo mount -a -v
/boot : ignored
/mnt/Expansion : ignored
/mnt/Elements : ignored

osmc@osmc:~$ sudo mount -v /mnt/Expansion
mount.nfs: timeout set for Tue Mar 13 11:12:33 2018
mount.nfs: trying text-based options 'xsystemd.automount,vers=4.2,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'xsystemd.automount,vers=4.1,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'xsystemd.automount,vers=4.0,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'xsystemd.automount,addr=10.0.0.107’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
mount.nfs: trying text-based options 'xsystemd.automount,vers=4.0,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'xsystemd.automount,addr=10.0.0.107’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host


#9

@nickc So, looks like something is blocking the rpcbind protocol communication to the nfs server. Do you have a firewall or iptables rules active on the Fedora?
Try to deactivate it for tests and see whether nfs mounts works then. Typically ports 892 and 2049 are used by nfs mounts.

Just a correction: There is a typo in your post I copied and modified in mine. It must be

x-systemd.automount

and not

xsystemd.automount

in the /etc/fstab


#10

@JimKnopf thanks for the pickup in my /etc/fstab. I corrected that.

i have not installed any firewall with Fedora.

I am not familiar with iptables but I have pasted the list of the tables here.
osmc@osmc:~$ sudo iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

osmc@osmc:~$ sudo iptables --list-rule
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

Could my access point be causing this? the laptop and raspberry Pi are connected though my Telstra router.


#11

@JimKnopf I just ran a NMAP from another pc in the network and scanned my Fedora IP address. It says port 2049 is open.


#12

Could be! So, after the correction in /etc/fstab (hope you inserted the defaults-option as well), please, give again some data

  1. output of cat /etc/fstab
  2. output of sudo mount -v -a
  3. output of sudo mount -v /mnt/Expansion
  4. output of ping < ip address of the Fedora NFS server> (abort with ctrl-c)
  5. output of sudo rpcinfo -p < ip address of the Fedora NFS server>

#13

@JimKnopf
Here it all comes

 osmc@osmc:~$ cat /etc/fstab
/dev/mmcblk0p1  /boot    vfat     defaults,noatime,noauto,x-systemd.automount    0   0
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
10.0.0.107:/run/media/ncusack/Expansion /mnt/Expansion nfs noauto,defaults,x-systemd.automount 0 0
10.0.0.107:/run/media/ncusack/Elements /mnt/Elements nfs noauto,defaults,x-systemd.automount 0 0

(reformated by JimKnopf for better readability)


#14

osmc@osmc:~$ sudo mount -v -a
/boot : ignored
/mnt/Expansion : ignored
/mnt/Elements : ignored


#15

osmc@osmc:~$ sudo mount -v /mnt/Expansion
mount.nfs: timeout set for Tue Mar 13 17:13:00 2018
mount.nfs: trying text-based options 'vers=4.2,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4.1,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=10.0.0.107’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.107,clientaddr=10.0.0.69’
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=10.0.0.107’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
^Cmount.nfs: trying text-based options β€˜vers=4.0,addr=10.0.0.107,clientaddr=10.0.0.69’


#16

osmc@osmc:~$ ping 10.0.0.107
PING 10.0.0.107 (10.0.0.107): 56 data bytes
64 bytes from 10.0.0.107: seq=0 ttl=64 time=6.073 ms
64 bytes from 10.0.0.107: seq=1 ttl=64 time=6.514 ms
64 bytes from 10.0.0.107: seq=2 ttl=64 time=3.961 ms
64 bytes from 10.0.0.107: seq=3 ttl=64 time=3.960 ms
^C
β€” 10.0.0.107 ping statistics β€”
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 3.960/5.127/6.514 ms


#17

osmc@osmc:~$ sudo rpcinfo -p 10.0.0.107
10.0.0.107: RPC: Port mapper failure - Unable to receive: errno 0 (Success)


#18

This is the RPCBIND status of the Fedora machine
[ncusack@localhost ~]$ sudo systemctl status rpcbind
[sudo] password for ncusack:
● rpcbind.service - RPC Bind
Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor pres
Active: active (running) since Sun 2018-03-11 12:43:19 AEDT; 2 days ago
Docs: man:rpcbind(8)
Main PID: 701 (rpcbind)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/rpcbind.service
└─701 /usr/bin/rpcbind -w -f

Mar 11 12:43:18 localhost.localdomain systemd[1]: Starting RPC Bind…
Mar 11 12:43:19 localhost.localdomain systemd[1]: Started RPC Bind.


#19

Is the nfs service running at all on the Fedora?


#20

[ncusack@localhost ~]$ sudo systemctl status nfs-server
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor p
Drop-In: /run/systemd/generator/nfs-server.service.d
└─order-with-mounts.conf
Active: active (exited) since Sun 2018-03-11 12:46:06 AEDT; 2 days ago
Main PID: 2301 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/nfs-server.service

Mar 11 12:46:06 localhost.localdomain systemd[1]: Starting NFS server and servic
Mar 11 12:46:06 localhost.localdomain systemd[1]: Started NFS server and service