0

An Asus RT68U is outfitted with Merlin Firmware and USB flash drive. A Raspberry Pi is pinned to a static LAN IP address at 192.168.1.115. The goal is to mount a raspberry pi directory to the RT68U.

rPi NFS status inquiry:

user@192.168.1.115:~$ service nfs-kernel-server status
* nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor prese
   Active: active (exited) since Sat 2019-10-05 21:25:03 EDT; 19h ago
 Main PID: 1750 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

Oct 05 21:25:02 hostname systemd[1]: Starting NFS server and services...
Oct 05 21:25:03 hostname systemd[1]: Started NFS server and services.

Error Message

myname@RT-AC68U-3D90:/tmp/home/root# mount user@192.168.1.115:/home/user/data/  /tmp/mnt/rpi

mount: user@192.168.1.115: Unknown host

mount: mounting user@192.168.1.115:/home/user/data/ on /tmp/mnt/rpi failed

ls -l  /tmp/mnt/ | grep rpi

drwxrwxrwx    2 user    root            40 Oct  6 17:03 rpi

Why is an error returned? What is the remedy?

from the router: mount -h

BusyBox v1.25.1 (2018-10-21 13:18:02 EDT) multi-call binary.

Usage: mount [OPTIONS] [-o OPT] DEVICE NODE

    Mount a filesystem. Filesystem autodetection requires /proc.


    -a      Mount all filesystems in fstab
    -i      Don't run mount helper
    -r      Read-only mount
    -t FSTYPE[,...] Filesystem type(s)
    -O OPT      Mount only filesystems with option OPT (-a only)
-o OPT:
    loop        Ignored (loop devices are autodetected)
    [a]sync     Writes are [a]synchronous
    [no]atime   Disable/enable updates to inode access times
    [no]diratime    Disable/enable atime updates to directories
    [no]relatime    Disable/enable atime updates relative to modification time
    [no]dev     (Dis)allow use of special device files
    [no]exec    (Dis)allow use of executable files
    [no]suid    (Dis)allow set-user-id-root programs
    [r]shared   Convert [recursively] to a shared subtree
    [r]slave    Convert [recursively] to a slave subtree
    [r]private  Convert [recursively] to a private subtree
    [un]bindable    Make mount point [un]able to be bind mounted
    [r]bind     Bind a file or directory [recursively] to another location
    move        Relocate an existing mount point
    remount     Remount a mounted filesystem, changing flags
    ro      Same as -r

UPDATE 1

mount 192.168.1.115:/home/osmc/data/ /tmp/mnt/rpi

returns an error:

mount: 192.168.1.115:/home/osmc/data/ failed, reason given by server: Permission denied

mount: mounting 192.168.1.115:/home/osmc/data/ on /tmp/mnt/rpi failed: Bad file descriptor

Update 2 (Freddy)

mount -t nfs -o nolock 192.168.1.115:/home/osmc/data/ /tmp/mnt/rpi

mount: 192.168.1.115:/home/osmc/data/ failed, reason given by server: Permission denied mount: mounting 192.168.1.115:/home/osmc/data/ on /tmp/mnt/rpi failed: Bad file descriptor

UPDATE 3

showmount -e 192.168.1.115
Export list for 192.168.1.115:

added to rPi: NFS export: #rpi:sudo vi /etc/exports

showmount -e 192.168.1.115
Export list for 192.168.1.115:
/home/osmc/data 192.168.1.115

Mount Error returned:

mount -t nfs -o nolock osmc@192.168.1.115:/home/osmc/data/  /tmp/mnt/osmc
mount: osmc@192.168.1.115: Unknown host
mount: mounting osmc@192.168.1.115:/home/osmc/data/ on /tmp/mnt/osmc failed

Mount Error returned:

mount -t nfs  192.168.1.115:/home/osmc/data/  /tmp/mnt/osmc
mount: 192.168.1.115:/home/osmc/data/ failed, reason given by server: Permission denied
mount: mounting 192.168.1.115:/home/osmc/data/ on /tmp/mnt/osmc failed: Bad file descriptor

Corrected Export List

Export list for 192.168.1.115:
/home/osmc/Movies 192.168.1.1

Connection Refused:

mount -t nfs  192.168.1.115:/home/osmc/data/  /tmp/mnt/osmc
mount: mounting 192.168.1.115:/home/osmc/data/ on /tmp/mnt/osmc failed: Connection refused
gatorback
  • 1,384
  • 23
  • 48
  • 1
    Remove the user@ part and try it with something like mount -t nfs -o nolock 192.168.1.115:/home/user/data /tmp/mnt/rpi. – Freddy Oct 07 '19 at 03:44
  • Thank you for the update; since I assumed you only had one problem, I deleted my answer. Freddy was on the right track. With this latest update, is /home/osmc/data/ exported from 192.168.1.115? – Jeff Schaller Oct 07 '19 at 19:07
  • @Freddy Thanks for the suggestion: error results are posted in OP under Update 2 – gatorback Oct 07 '19 at 19:16
  • @gatorback, I'd be curious to see the results of running showmount -e 192.168.1.115 from the RT68U. – Jeff Schaller Oct 08 '19 at 12:41
  • @JeffSchaller OP's Update 3 shows that it does not return an export items – gatorback Oct 08 '19 at 18:37
  • 2
    That's the next hurdle, then; see https://unix.stackexchange.com/q/106122/117549 for example of setting up the exports. – Jeff Schaller Oct 08 '19 at 18:40
  • @JeffSchaller Thanks for identifying that hurdle: OP updated: tried mount again but met with error messages – gatorback Oct 08 '19 at 19:38
  • 1
    The IP that you list in /etc/exports should be the client IP, not the server's IP. – Jeff Schaller Oct 08 '19 at 20:00
  • @JeffSchaller Thank you: client IP added. Can I assume client IP provides authorization? OP updated to reflect connection refused. I sense that this is steadily inching its way to being resolved – gatorback Oct 08 '19 at 23:29

0 Answers0