/share/HDB_DATA/Qweb = rw,no_subtree_check
The bit in capitals will depend on how your box is configured, but that is easy to find out by ssh'ing in as admin and doing an ls -al of /share. The subdir can now be mounted by making the following entry in the /etc/fstab of another Linux box:
<TSx09 IP or name>:/Qweb /mnt/qnap/www nfs defaults 0 0
Then issue a:
$ sudo mount -a
This assumes you've created the mount point, naturally.
I have now supplied the trick of enabling NFS on a non-pro box about 20 times. I've kept the info off the general posts out of respect for the QNAP folk, but it's driving me insane, so here is my hack. If the moderators think I've stepped over the line, they are free to censor it (or me
Ron
------------------------
The following Works For Me and assumes the perpetrator is not totally Linux ignorant and is happy using the command line shell and a text editor (knowing how to drive "vi" is an essential Unix survival skill
In other words: Don't Blame Me! My environment is:
QNAP TS-209 with 1.1.5 firmware (non-pro version, but they are the same anyway)
GNU/Linux 2.6.17-1.2187_FC5 (Fedora Core 5)
1. From the Linux box, ssh (or telnet) to your TS209 as admin
2. Edit /etc/config/nfssetting (the file should already exist, but be empty). Add the following 2 lines:
[Access]
/share = rw
3. Enable NFS with the command
# setcfg NFS Enable True
(this writes to flash ram, so the change persists with restarts)
4. Start NFS
# /etc/init.d/nfs start
5. Confirm that it did the job by examining the file /etc/exports which is (re)created each time NFS is started. It should contain something like:
/share/HDB_DATA/Public *(rw,async,no_root_squash)
[the actual drive partition (eg HDB_DATA in the above example) will depend on your BYOD conf]
7. On your Linux box, confirm that NFS is active:
# /usr/sbin/showmount -e <TS209 name or IP address>
This should respond:
Export list for <TS209 name or IP address>:
/Public
Alternately, enter:
# rpcinfo -p <TS209 name or IP address>
It should show mountd, nfsd, quotad etc and their instance ports.
8. Create the mount point and mount the Public drive
# sudo mkdir -p /mnt/qnap/public
# sudo mount -t nfs <TS209 name or IP>:Public /mnt/qnap/public
This may take a few seconds and you may see a "timeout/retrying" message.
(I've used sudo as mounts must be issued as root and I think it is too dangerous to actually login as root--accidents do happen--especially to me!)
Check all is well:
# ls -al /mnt/qnap/public
Should show the contents of the QNAP Public dir.
Seems that their exporter maps /Public by default (the "/share = rw" line in nfssetting is redundant and can even be removed). You can add other shares manually to nfssetting, a line for each under the [Access] heading, eg:
/share/HDB_DATA/Qweb = rw,no_subtree_check
You will have to determine the right partition name (HDB_DATA in the above example) as this depends on the disk(s) type and RAID config you've chosen, but it's not hard to figure out
After making any changes to nfssetting, you need to restart NFS, naturally:
# /etc/init.d/nfs restart
This will make handles held by NFS mounts "stale", so you have to umount and mount them all again (there are easier ways to do this, but that's normal unix administration left as an exercise for the student ;0)
When you have everything the way you like it, add the NFS mounts to the /etc/fstab file on the Linux box so they mount at boot time, or with a "mount -a". I've confirmed that NFS auto-starts on the QNAP box after the setcfg command has been run so all the above can be a once only exercise.
To remove NFS:
1. Shutdown NFS:
# /etc/init.d/nfs stop
2. delete all lines from the nfssetting file (or replace it with an empty file of the same name)
3. Unset the (flashram) flag:
# setconf NFS Enable False
4. Delete the /etc/exports file
Your box will now look like it has never been used for NFS
Delete message



News