RSIZE / WSIZE

Discussion about using NAS on Linux and Unix OS.
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

no with a buffalo NAS it works...so it does not depend on the client....

There are so many users with the same Problem.
User avatar
Q
Experience counts
Posts: 1436
Joined: Wed Sep 05, 2007 4:18 pm
Location: Switzerland
Contact:

Re: RSIZE / WSIZE

Post by Q »

hmm ich glaube wir reden aneinander vorbei ;)

of course i believe you that it doesn't work in your case. and i know it also doesn't for other people.

but it DOES work in my combination (different client, same server). really, i swear!
do you see what i pasted above? the results of the mount command? it says it IS mounted with 32768. i did copy that right of the shell of a TS-509 which was my nfs client in this case. TS-109 Pro was the NFS server. unless the mount command is telling me BS.... but i don't think so.

so now i wonder, why does it work for me and why it doesn't work for you? i assume it can't be only a QNAP nfs server problem then...

firmware really is 3.1.0 Build 0708?

probably qnap should enlighten us about this issue... i'm a bit confused :?

edit: i wrote now an email to qnap, so they hopefully can let us know the facts here.
I am Q
www.qnap.ch

I don't work at QNAP.
And RAID is really NO backup!
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

THX Q for the email to QNAP...Please let us know if you will get an answer ;)


THX!!!
User avatar
Q
Experience counts
Posts: 1436
Joined: Wed Sep 05, 2007 4:18 pm
Location: Switzerland
Contact:

Re: RSIZE / WSIZE

Post by Q »

no answer by qnap yet, but i just found something very interesting by user sparkss!

from http://forum.qnap.com/viewtopic.php?f=1 ... =10#p86932:
Sparkss wrote:UPDATE : unfs (ipkg unfs3) works fantastic. Here are the speeds that I got to our Dune :

SMB : 9.6 MB/s
NFS (native QNAP) : 8.8 MB/s
UNFS (ipkg) : 16 MB/s

I did pretty much no tuning of unfs and still achieved well over a 60% increase over SMB, not to mention the lesser overhaed (NFS vs SMB) at the media player which will translate into better playback handling. I am pretty sure that if I wanted to play around with knfs (kernel based NFS - ipkg nfs-utils) that I could maybe get another MB/s or two out of it, but there are some link handling limitations to knfs that don't fit into my file system organizational scheme, so I actually prefer unfs. Plus I use it mainly for streamnig media and @ 16 MB/s I am well above the current BD specs for streaming the full BDMV structure/BD ISO.

The TS-509 is now easily meeting my expectations, albeit with some work on my end. Even with little out-of-the-box working as I had hoped, I am still very happy with the overall outcome. Not to mention that I do like more control over things than the GUI and built-in services provided. But I do like the GUI for some of the monitoring components (even though I also installed the cli versions)
sounds good and could probably also help in your case :)

FYI: unfs = http://unfs3.sourceforge.net/
I am Q
www.qnap.ch

I don't work at QNAP.
And RAID is really NO backup!
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

Ok THX Q,

but how do i have to install it?
User avatar
Q
Experience counts
Posts: 1436
Joined: Wed Sep 05, 2007 4:18 pm
Location: Switzerland
Contact:

Re: RSIZE / WSIZE

Post by Q »

on the shell, an ipkg is available

1. get the QPKG "Optware IPKG" and install via web ui, activate.
2. use a tool like putty to connect to your TS by ssh (enable ssh access in the web ui) and login with user admin
3.

Code: Select all

ipkg update
4.

Code: Select all

ipkg install unfs3
installation done.

how to configure/use i don't know (didn't try it). maybe ask Sparkss if you need further help.
I am Q
www.qnap.ch

I don't work at QNAP.
And RAID is really NO backup!
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

thx q!

The installation works fine. But one more questeion, in which folder can i find the intsalled package?
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

if i will start ..it comes the following message..

[/opt/sbin] # ./unfsd
bind: Address already in use
Couldn't bind to udp port 2049
User avatar
Q
Experience counts
Posts: 1436
Joined: Wed Sep 05, 2007 4:18 pm
Location: Switzerland
Contact:

Re: RSIZE / WSIZE

Post by Q »

you need to disable the builtin nfs service first

/opt/etc/init.d/S56unfsd
or what you entered, both do start it.

https://forum.openwrt.org/viewtopic.php?id=11847 helped me to get it running (got an error first)

i also needed to enter

Code: Select all

portmap start
portmap enable
then i was able to start the unfs service without an error message.

i have no clue where it goes searching for the exports file, so just to be sure i did copy it to the optware location (cp /etc/exports /opt/etc/)


don't know if you need to do anything else... got an error as i did try to mount from another TS.
I am Q
www.qnap.ch

I don't work at QNAP.
And RAID is really NO backup!
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

Ok,

but i don't know exactly how i can stop the built in nfs server?

I habe tried it with this command:

/opt/etc/init.d/S56unfsd stop


but

bind: Address already in use
Couldn't bind to udp port 2049
User avatar
Q
Experience counts
Posts: 1436
Joined: Wed Sep 05, 2007 4:18 pm
Location: Switzerland
Contact:

Re: RSIZE / WSIZE

Post by Q »

in the web administration, just disable it

(that in /opt is unfs you just installed, not the builtin. it is somewhere else)
I am Q
www.qnap.ch

I don't work at QNAP.
And RAID is really NO backup!
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

ok ist running now.

1296 1 500 S portmap start
1305 admin 4924 S /opt/sbin/unfsd

if i type exportfs , it' empty....

I copied the file exports /opt/etc ?!
Sparkss
Getting the hang of things
Posts: 99
Joined: Sat Sep 26, 2009 7:50 am

Re: RSIZE / WSIZE

Post by Sparkss »

Here is what I had sent to Q in a PM. Thanks for pointing me to this thread. This is a little long winded, and I am not sure how much of it has already been covered, as I didn't read the whole thread (sorry). I also apologize ahead of time if I am "talking down" to anyone, I don't know anyone's computer level, so I am just trying to make it all basic, again, I apologize in advance :)


-------------------------------------

There isn't much to do to configure unfs, really, although you will need to create your own exports file as the one created by the QNAP isn't compatible w/ unfs.

So first, lets convert our expors from the QNAP built-in nfs.

Here is what ours looks like :

"/share/HDB_DATA/Public" 192.168.40.0/24(ro,async,no_root_squash)
"/share/HDC_DATA/Public" *(ro,async,no_root_squash)
"/share/HDA_DATA/Menu" 192.168.40.0/24(ro,async,no_root_squash)
"/share/HDA_DATA/Public" *(ro,async,no_root_squash)
"/share/HDD_DATA/Qusb" *(ro,async,no_root_squash)

I had a mix of IP range/subnet restricted "shares" (actually referred to in NFS-speak as mount points) and some wide open to any computer (w/ the * instead of an ip range)

Here is what the "converted" exports file looks like now for unfs (basically removed the quotes "" and all of the *

/share/HDB_DATA/Public 192.168.40.0/24(ro,async,no_root_squash)
/share/HDC_DATA/Public 192.168.40.0/24(ro,async,no_root_squash)
/share/HDA_DATA/Menu 192.168.40.0/24(ro,async,no_root_squash)
/share/HDA_DATA/Public 192.168.40.0/24(ro,async,no_root_squash)
/share/external/sdz1 192.168.40.0/24(ro,async,no_root_squash)


I added a mount to be able to access the eSATA drive via NFS.

Some other things to note, to help you configure it for your own purposes. I set all of these mounts up as Read Only (ro in the config section at the end of each mount line .. changing it to rw makes it read-write). Since I mainly share/stream to media players in our household and do all of my uploading to the NAS from my PC, I set the NFS mounts to read only (to prevent any mistakes from the media players) and use SMB to load/write any data from my PC to the NAS. I also allow access to any system on our local network. The 192.168.40.0/24 is the same as 192.168.40.0:subnet mask 255.255.255.0, or any IP between 192.168.40.1 and 192.168.40.255.

Honestly that is about all the configuring that i did. Then just run portmap and unfsd

I did some additional tweaks, but only to make things a little easier. First I will explain how I run it manually. But before that I want to state that there are ways to run NFS over SSH, basically a more secure NFS share, but to use it the client needs to be able to access a different NFS port, and so far none of the media players I have seen had that configuration ability. Plus, running it secure like that adds overhead, to both the server and the client, and since I am trying to maximize throughput to our media players I am trying to minimize overhead. Not to mention that I have access locked down to local subnet only, and I know every machine on that subnet here, so security isn't really an issue :).

To run it manually I execute the following 2 commands :

portmap
/opt/sbin/unfsd -e /share/HDA_DATA/tmp/exports

The only additional option is that I specify my own file location for my exports file. By default it uses /opt/etc/exports, if I recall, but when I was also playing around with the kernel based nfs there was a script that would link /etc/exports to /opt/etc/exports and that could cause a problem if you accidentally ever turned the built-in nfs back. It would essentially wipe out your modified exports file. So I stuck it in another dir, off of our first hard drive, to ensure that it would not get lost whenever I rebooted, or if I accidentally turned nfs back on (or if a FW update turned it on for me, etc).

To take it a step further, the unfs3 package lays down a startup script in /opt/ext/init.d

# cat /opt/etc/init.d/S56unfsd
#!/bin/sh

if [ -n "`pidof unfsd`" ] ; then
killall unfsd 2>/dev/null
fi

sleep 2
/opt/sbin/unfsd


Which I edited to change the last line that actually calls the unfs daemon :


/opt/sbin/unfsd
[/share/HDA_DATA/tmp] # cat /opt/etc/init.d/S56unfsd
#!/bin/sh

if [ -n "`pidof unfsd`" ] ; then
killall unfsd 2>/dev/null
fi

sleep 2
#/opt/sbin/unfsd
/opt/sbin/unfsd -e /share/HDA_DATA/tmp/exports


I just commented out the original line and added my own at the end. Now I just run :

portmap
/opt/etc/init.d/S56unfsd

I plan to add this to my autorun file, but haven't gotten around to tweaking it just yet :)

I also wanted to note that I installed the nfs-utils ipkg because it has nfs support files that the unfs3 ipkg did not, specifically nfsstat and showmount.

Once you have installed everything and have unfs running you can issue the showmount -e command and you should see all of your exported mounts from your modified exports file. If you don't, then something isn't right.

Ok, so in a bulletized format, here are the steps :

1. copy the existing /etc/exports to another location for editing, preferrably a dir on a hard drive and not one of the system mounts.
2. turn off the NFS service in the admin console GUI on the QNAP
3. install the unfs3 and nfs-utils ipkgs (assuming you already have ipkg installed and configured)
4. edit/convert the exports file that you saved off, adding any custom mounts to it that you may want
5. start up the unfs daemon by running
portmap
/opt/sbin/unfsd -e <full path to your updated exports file>
6. run showmount -e to verify that it is running and exporting your mounts as expected.
7. Go to your client machine and connect
8. Enoy

Optional steps

1. update the /opt/etc/init.d/S56unfsd script to call your modified exports file
2. Add the startup commands to your autorun file to launch at startup


Alternate steps, if you choose not to have a totally separte exports file, which would be more than fine if you don't test or play around with other nfs daemons that may overwrtie it. I do, so I wanted to play it safe :). So if you are just going to set it up and let it go then you can :

You can change step #4 and #5 to read :

4. Edit the /opt/etc/exports file using the exports file you had saved off from /etc/exports at a template, updating it for use w/ unfs
5. start up the unfs daemon by running
portmap
/opt/etc/init.d/S56unfsd

And skip Optional step #1 all together.


HTH :)
Sparkss
Getting the hang of things
Posts: 99
Joined: Sat Sep 26, 2009 7:50 am

Re: RSIZE / WSIZE

Post by Sparkss »

BOLLE wrote:Ok,

but i don't know exactly how i can stop the built in nfs server?

I habe tried it with this command:

/opt/etc/init.d/S56unfsd stop


but

bind: Address already in use
Couldn't bind to udp port 2049
As Q pointed out the builtin NFS is accesible through the admin web console : Home >> Network Services >> NFS Service and uncheck the Enable NFS Service box :)

the S56unfsd startup script is very simple. I know that you are thinking it has cli options like the unfs in fun plug, or any other init.d script would have, but this one is very basic. It just clears any existing, running unsfds and starts up a fresh one. The knfsd ipkg does have all of those options, but I prefer the unfsd for how it translates links, where the knfsd doesn't.

In a nutshell I have all of our drives as separate volumes/drives. While I lose the fault tolerance of RAID I gain some power savings and ability to organize things more to my liking. IE: if what I want is on drive 1, then that is all that spins up when we read/access it.

I like to make a "Menu" mount and have that as the central, singular access point for our media players to point to. And then mount my other drives and directories to it. So for my particular purposes I really only need 1 line in my exports file : /share/HDA_DATA/Menu 192.168.40.0/24(ro,async,no_root_squash)

The rest were for experimenting with other nfsd's and other speed tests. Through that one Menu mount/share I can get to every other drive within our NAS, and even some drives on our old NAS (that I spin up and bring online every once in a while and may use it for remote replication backups now too).
BOLLE
Starting out
Posts: 21
Joined: Fri Sep 25, 2009 9:12 pm

Re: RSIZE / WSIZE

Post by BOLLE »

THX Sparks,

for me a little bit complicated ;)

Code: Select all

[/share/HDB_DATA] # portmap
[/share/HDB_DATA] # /opt/sbin/unfsd -e /share/HDB_DATA/exports
[/share/HDB_DATA] # showmount -e
Export list for Homestation:
[/share/HDB_DATA] #
As you can see, my export list is empty...

her my exports:

Code: Select all

[/share/HDB_DATA] # cat exports
"/share/HDA_DATA/Public" *(rw,async,no_root_squash)
"/share/HDA_DATA/Qdownload" *(rw,async,no_root_squash)
"/share/HDA_DATA/Qmultimedia" *(rw,async,no_root_squash)
"/share/HDA_DATA/Qrecordings" *(rw,async,no_root_squash)
Here are the running processes:

Code: Select all

 PID  Uid     VmSize Stat Command
    1 admin       544 S   init
    2 admin           SWN [ksoftirqd/0]
    3 admin           SW< [events/0]
    4 admin           SW< [khelper]
    5 admin           SW< [kthread]
   11 admin           SW< [kblockd/0]
   14 admin           SW  [khubd]
   53 admin           SW  [pdflush]
   54 admin           SW  [pdflush]
   56 admin           SW< [aio/0]
   55 admin           SW  [kswapd0]
   58 admin           SW  [cifsoplockd]
  194 admin           SW  [scsi_eh_0]
  195 admin           SW  [scsi_eh_1]
  208 admin           SW  [mtdblockd]
  311 admin           SW  [kjournald]
  320 admin       856 S   /sbin/daemon_mgr
  333 admin      1416 S   /sbin/qLogEngined
  334 admin      1416 R   /sbin/qLogEngined
  335 admin      1416 S   /sbin/qLogEngined
  336 admin      1416 S   /sbin/qLogEngined
  402 admin           SW  [kjournald]
  535 admin           SW  [kjournald]
  564 admin       836 S   /sbin/hotswap
  568 admin       956 S   /sbin/hd_util
  589 admin       956 S   /sbin/qsmartd -d
  628 admin       956 S   /sbin/qsmartd -d
  629 admin       956 S   /sbin/qsmartd -d
  630 admin       956 S   /sbin/qsmartd -d
  657 admin       956 S   /sbin/hd_util
  658 admin       956 S   /sbin/hd_util
  662 admin       956 S   /sbin/hd_util
  705 admin       600 S   /usr/sbin/mDNSResponderPosix -f /etc/config/mDNSRespo
  785 admin      1196 S   /usr/local/sbin/_thttpd_ -p 8080 -nor -nos -u admin -
  802 admin      1208 S   /usr/local/sbin/Qthttpd -p 80 -nor -nos -u admin -d /
  823 admin      3384 S   /usr/local/samba/sbin/smbd -l /var/log -D -s /etc/con
  824 admin      3260 S   /usr/local/samba/sbin/smbd -l /var/log -D -s /etc/con
  827 admin      2692 S   /usr/local/samba/sbin/nmbd -l /var/log -D -s /etc/con
  837 guest      2852 S   proftpd: (accepting connections)
  897 admin      1148 S   /sbin/btd
  905 guest       920 S   /sbin/ImRd -d
  929 admin       640 S   /usr/sbin/crond -l 9
  952 admin       832 S   /usr/sbin/ntpdated
  960 admin      1504 S   /usr/sbin/stunnel /etc/stunnel/stunnel.conf
  999 admin       664 S   /usr/sbin/upsd -u admin
 1027 admin      1780 S   /usr/sbin/sshd -f /etc/ssh/sshd_config -p 22
 1059 admin      1176 S   /sbin/bcclient
 1060 admin      1176 S   /sbin/bcclient
 1061 admin      1176 S   /sbin/bcclient
 1066 admin      1176 S   /sbin/bcclient
 1074 admin       952 S   /sbin/picd
 1081 admin       556 S   /usr/sbin/lpd
 1087 admin       812 S   /sbin/gpiod
 1098 admin      1092 S   /usr/bin/rsyncd --daemon --sever-mode=1
 1105 admin      3880 S   /usr/local/samba/sbin/smbd -l /var/log -D -s /etc/con
 1178 admin       900 S   /sbin/qShield
 1179 admin       900 S   /sbin/qShield
 1180 admin       900 S   /sbin/qShield
 1181 admin       900 S   /sbin/qShield
 1182 admin       900 S   /sbin/qShield
 1237 admin       684 S   /opt/sbin/mountd
 1257 admin       496 S   /sbin/getty 115200 ttyS0
 1278 admin      2116 S   /usr/sbin/sshd -f /etc/ssh/sshd_config -p 22 -R
 1279 admin      1300 S   -sh
 1342 1           504 S   portmap
 1344 admin      4924 S   /opt/sbin/unfsd -e /share/HDB_DATA/exports
 1353 admin       668 R   ps
in folder opt/etc/init.d are the following files:

Code: Select all

[/opt/etc/init.d] # ls
S55portmap*   S56nfs-utils* S56unfsd*     exports

Any Idea
Post Reply

Return to “Linux & Unix (NFS)”