Activate NFS Support on QNAP TS-209 II

The QNAP TS-209 II and TS-209 Pro II have the same hardware specifications, however, the firmwares are slightly different, the main differences are: NFS and ADS support are only available on TS-209 Pro II. Afte some investigation, I found it’s easy to enable NFS on TS-209 II. This post describes the way to achieve it.

SSH to TS-209 II and then take the following steps:

1. Enable NFS support in system configuration

setcfg NFS Enable 1

This will create an NFS section in system configuration file (/etc/config/uLinux.conf) and add an item under the section which enables NFS during bootstrap.

2. Create user for NFS

TS-209 II defaults to run NFS with UID=500 and GID=20, so let’s create a user for it:

addgroup -g 20 nfsgroup
adduser -u 500 -G nfsgroup nfs


3. Prepare exported filesystems

Now edit /etc/exports, the original contents look like this:

"/share/MD0_DATA/Public" *(rw,async,no_root_squash)

Change it to:

"/share/MD0_DATA/Public" *(rw,insecure,no_subtree_check,async,no_root_squash)

You can add more exports as you like. If you want to restrict the access, change the * to your desired hosts or subnets, in my case I changed it to:

"/share/MD0_DATA/Public" 172.16.1.0/24(rw,insecure,no_subtree_check,async,no_root_squash)

So only the hosts in subnet 172.16.1.0/24 can mount this exported filesystem.

NOTE: in order to mount it on Mac OS X, the insecure option is vital.

4. Start NFS

Now let’s start NFS by entering:

/etc/init.d/nfs start

NOTE: the above nfs script checks the NFS settings in system configuration, so make sure you have added NFS configuration item in step 1. If eveything goes fine, you should see something like this:

Starting NFS services: Starting portmapper:.
re-export.
Starting NFS quotas: rpc.rquotad.
Starting NFS mountd daemon: Shutting down NFS mountd:
Starting NFS mountd. Mountd port number assigned automatically.
Starting NFS daemon: rpc.nfsd
Starting NFS lockd status:.

5. Mount it

You’re now able to mount the exported filesystem on a remote host, just enter:

mount -t nfs nfs_host:/share/MD0_DATA/Public /local_mount_point

I tested on OS X, worked like a charm.


9 Comments

  1. aki
    Posted February 3, 2009 at 7:19 pm | Permalink

    Hello, I do everithing, at the end, when I execute :

    mount -t nfs nfs_host:/share/MD0_DATA/Public /local_mount_point

    I have this

    [~] # mount -t nfs nfs_host:/share/MD0_DATA/Public /local_mount_point
    mount: can’t get address for nfs_host

  2. Posted February 6, 2009 at 8:52 am | Permalink

    @aki, nfs_host is just an example, you should replace it with your NFS host name or ip address, check NFS manual to learn how to use it.

  3. Ola
    Posted March 27, 2009 at 3:29 am | Permalink

    Thanks George for your tip. I have also a TS-209 II but when coming to step 3, my NAS is missing /etc/exports. Is this file created in earlier steps or can I do it myself? If created, how will it affect SAMBA etc?

    Tanks!

  4. Posted March 27, 2009 at 8:54 am | Permalink

    @Ola, the /etc/exports is supposed to be maintained by yourself, just create it if it’s not there. The NFS has nothing to do with SAMBA, however, you might have permission issues while using NFS if you don’t have some UNIX knowledge.

  5. Ola
    Posted March 29, 2009 at 5:42 am | Permalink

    George, thanks for your clarification.

  6. Matt
    Posted September 25, 2009 at 6:04 pm | Permalink

    Hey George,

    tried your tutorial, but got stuck at “etc/exports”, there is no such file or directory.

    QNAP TS-209 II with the newest Firmware.

    Thanks in advance

  7. Matt
    Posted September 25, 2009 at 6:12 pm | Permalink

    Sorry sorry sorry :) Didn´t read Ola´s comment. Forget my question ….

  8. Renholm
    Posted May 25, 2010 at 4:44 am | Permalink

    Thanks a million! Really saved my day since QNAP and AFP plays along as badly as Mac and SMB does!
    This guide worked perfectly on Mac OS 10.6.3 and Qnap TS-209 II.
    One additional tip is to mount the shares using Disk Utility:
    Start Disk Utility
    Select NFS Mounts from the File menu
    Click the plus sign in the lower left corner
    Enter in your remote NFS URL (nfs://nas-ip/share/MD0_DATA/SHARE_NAME)
    Enter the mount point, anything of your choice (/private/mnt/SHARE_NAME). If you add it to /Network, then it will show up in the Shared section of Finder, in an entry called All.
    Click Verify
    Save your settings

  9. HeinJan
    Posted July 4, 2010 at 8:38 pm | Permalink

    Hi,
    i have a qnap 459 pro unit and tried the solution. Most of it works, however the changes i make in the /etc/exports file
    are set back to factory default, the minute i restart the NFS service. (and yes, I have verified that i saved the file properly!)
    On this link http://support.apple.com/kb/TA21553 Apple claims that the ‘insecure’ option indeed should fix the problem,
    however that doesn’t work for me as this setting gets reset every time…

    Another issue i experience with the way Renholm uses the Disk Utility of Apple, is that the local mountpoint gets Root
    privileges and those cannot be changed, even though i tried to change them as root user.

    SMB connects fine but performance is really bad, approx 30MByte/s on a gigabit link.

    any help is appreciated!

    (i am using the 3.3.0 newest firmware)

One Trackback

  1. [...] can find his tutorial here : George Zhu’s Blog Category: Divers  |  Comment (RSS) [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Site hosted by