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.


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