1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

RT-AC66U USB Application - NFS Exports - USB stick/SSD as NFS share

Discussion in 'ASUS AC Routers & Adapters' started by ruasonid, Oct 6, 2019.

Tags:
  1. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    If it is possible I want to use a USB stick in the router as a backup target from a Linux device since the NAS I would otherwise use is not always on. The backup job will not work with a Windows share and I cannot change anything on that side.

    The NFS Exports option states "Export directories from plugged USB disks over NFS".

    Is this the option I need?
     
  2. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    Yes.
     
  3. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    Thank you. I'll give it a try.
     
  4. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    I've got NFS export enabled via the toggle switch.

    I cannot see any reference to NFS in the system log - is that normal?

    The main problem I have at the moment is connecting to the NFS ext3 USB stick on the router from a Raspberry Pi. My fstab is:

    192.168.0.1:/tmp/mnt/backup /media/backup nfs

    /media/backup is created as a directory on the Pi.

    When I try to mount the target I get
    mount: special device 192.168.0.1:/tmp/mnt/backup does not exist

    I had formatted to ext3 on a Windows machine so I went into the router via SSH and recreated the partition, formatted ext3, and rebooted. Same as above.
     
  5. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    What do your export options look like in the router's GUI?
     
  6. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    /mnt/backup

    (Asuswrt-Merlin 380.70)
     
    Last edited: Oct 7, 2019
  7. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    You want something like this:

    Untitled.png
     
  8. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    Yes, in more detail that is what I have:

    Path: /mnt/backup
    Access list: IP address of Pi
    Options: rw,sync

    Tried again with /mnt/backup nfs

    mount.nfs: mounting 192.168.0.1:/mnt/backup failed, reason given by server: No such file or directory
     
    Last edited: Oct 7, 2019
  9. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    Try it from the command line instead of fstab.
    Code:
    sudo mount -t nfs 192.168.0.1:/mnt/backup /media/backup
    If that doesn't work look in the syslog of the router for error messages.
     
  10. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    Checked on the router file system.

    There is no directory named backup in /mnt (empty) or /tmp/mnt (only sda1).
     
  11. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    mount point /media/backup does not exist.
     
  12. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    Oct 7 19:02:08 mountd[676]: authenticated mount request from 192.168.0.100:734 for /mnt/backup (/mnt/backup)
    Oct 7 19:02:08 mountd[676]: can't stat exported dir /mnt/backup: No such file or directory

    Edit:

    Just above those entries...

    kernel: svc: 192.168.0.100, port 693: unknown version (4 for prog 100003, nfsd)
     
    Last edited: Oct 7, 2019
  13. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    :confused: Did you create it?

    You said in post #4 that it exists. :confused:
     
    ruasonid likes this.
  14. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    OK, I'm getting confused too. Last time I was this hands on with Linux was on Yggdrasil Linux (look it up if you have to).

    I was following instructions to set up access from a Pi to the NFS export and following those instructions I set up a backup directory /media/backup on the Pi (it's still there). Where should backup be created in this case?
     
  15. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    Use the router's NFS interface to navigate to /mnt/sda1 and create directories using the "+" icon at the top right of the window. Then it should be selectable as the directory to share.
     
  16. ruasonid

    ruasonid Occasional Visitor

    Joined:
    Oct 17, 2015
    Messages:
    42
    The only interface I can see on the router (RT-AC66U) is USB Applications / NFS Exports (path, etc). I went in via PuTTY/SSH to create backup under /dev/sda1. It now shows on the router under USB Applications / NFS Export and I can select the directory. It appears as /mnt/sda1/backup.

    Updated fstab, ran mount -a on the Pi and it's all systems go.

    Will backup (under /media) now auto mount on reboot of the Pi?

    Thanks a lot for your kind assistance.
     
  17. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,325
    Location:
    UK
    Glad to hear that you got it working. I don't know the answer to your Raspberry Pi question. I'm not really a Pi person.