Sign up here and you can log into the forum!

nfs server

This is the place to ask for how to use software that is (or isn't) included in the various wdlxtv flavours. Questions about software such as rtorrent, NZBGet, sshfs, curlftpfs, ssh, telnet, etc.

nfs server   

Postby KAD » Tue Sep 02, 2014 8:24 pm

so close, but so far away

I managed to compile a working nfsd.ko for SMP (well at least it's loads via insmod, ok) and have added nfs-kernel-server start scripts, and what I think are all the needed bits
but can't mount the share

On SMP
Code: Select all
# cat /conf/exports
/tmp/media/usb/USB1140/12a0037f-6b28-4758-8f27-fbcaf339742b 192.168.1.0/24(rw,no_root_squash,sync)
# ./usr/bin/rpcinfo -p 192.168.1.25
   program vers proto   port
    100000    2   tcp    111
    100000    2   udp    111
    100005    1   udp  55717
    100005    1   tcp  59703
    100005    2   udp  55717
    100005    2   tcp  59703
    100005    3   udp  55717
    100005    3   tcp  59703
    100024    1   udp  33544
    100024    1   tcp  58031
    100021    1   udp  54096
    100021    3   udp  54096
    100021    4   udp  54096
    100021    1   tcp  41100
    100021    3   tcp  41100
    100021    4   tcp  41100
    100003    2   tcp   2049
    100003    2   udp   2049
# ps | grep nfs
  277 root         0 SW   [nfsiod]
1694 root     44784 S    unionfs /tmp/apps:/wd-apps /apps
2325 root     12556 S    /usr/sbin/nfs_daemon
4246 root         0 SW   [nfsd]
4247 root         0 SW   [nfsd]
4248 root         0 SW   [nfsd]
4249 root         0 SW   [nfsd]
6395 root      3720 S    grep nfs
#

from ubuntu machine
Code: Select all
# showmount -e 192.168.1.25
Export list for 192.168.1.25:
/tmp/media/usb/USB1140/12a0037f-6b28-4758-8f27-fbcaf339742b 192.168.1.0/24

# sudo mount -v -t nfs 192.168.1.25:/tmp/media/usb/USB1140/12a0037f-6b28-4758-8f27-fbcaf339742b /tmp/test
mount.nfs: timeout set for Tue Sep  2 21:16:44 2014
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.25,clientaddr=192.168.1.123'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.25'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.25 prog 100003 vers 3 prot TCP port 2049
mount.nfs: portmap query retrying: RPC: Program/version mismatch
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: trying 192.168.1.25 prog 100003 vers 3 prot UDP port 2049
mount.nfs: portmap query failed: RPC: Program/version mismatch
mount.nfs: Protocol not supported
# rpcinfo -p 192.168.1.25
   program vers proto   port  service
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100021    1   udp  36525  nlockmgr
    100021    3   udp  36525  nlockmgr
    100021    4   udp  36525  nlockmgr
    100021    1   tcp  39651  nlockmgr
    100021    3   tcp  39651  nlockmgr
    100021    4   tcp  39651  nlockmgr
    100003    2   tcp   2049  nfs
    100003    2   udp   2049  nfs
    100005    1   udp  35782  mountd
    100005    1   tcp  46034  mountd
    100005    2   udp  35782  mountd
    100005    2   tcp  46034  mountd
    100005    3   udp  35782  mountd
    100005    3   tcp  46034  mountd
    100024    1   udp  34890  status
    100024    1   tcp  51085  status
# rpcinfo -u 192.168.1.25 nfs       
program 100003 version 2 ready and waiting
# rpcinfo -u 192.168.1.25 mountd
program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting


so any idea's ?

ps. I'm begining to think the "Application Questions" sub-forum must have been created for me, I seem to be the only person who posts here, lol
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: nfs server   

Postby KAD » Tue Sep 02, 2014 10:03 pm

still digging for more info

this log has some entries from after I attempt to mount the share
Code: Select all
cat /tmp/messages.txt | grep nfs
Sep  3 05:56:30 (none) run-it: Starting init.d Script /etc/init.d/S90nfs-exports
Sep  3 05:56:39 (none) run-it: Starting init.d Script /etc/init.d/S94nfsserver
Sep  3 05:56:40 (none) S94nfsserver: Starting NFS server...
Sep  3 05:56:51 (none) rpc.statd[2929]: statd running as root. chown /var/lib/nfs/sm to choose different user
Sep  3 05:56:52 (none) exportfs[2932]: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/tmp/media/usb/USB1140/12a0037f-6b28-4758-8f27-fbcaf339742b".   Assuming default behaviour ('no_subtree_check').   NOTE: this default has changed since nfs-utils version 1.0.x
Sep  3 05:56:52 (none) S94nfsserver: NFSD started
Sep  3 05:57:06 (none) kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Sep  3 05:57:57 (none) kernel: svc: 192.168.1.123, port=728: unknown version (4 for prog 100003, nfsd)
Sep  3 05:57:57 (none) kernel: svc: 192.168.1.123, port=59327: unknown version (3 for prog 100003, nfsd)
Sep  3 05:57:57 (none) kernel: svc: 192.168.1.123, port=47406: unknown version (3 for prog 100003, nfsd)
Sep  3 05:59:29 (none) kernel: svc: 192.168.1.123, port=858: unknown version (4 for prog 100003, nfsd)
Sep  3 05:59:29 (none) kernel: svc: 192.168.1.123, port=44584: unknown version (3 for prog 100003, nfsd)
Sep  3 05:59:29 (none) kernel: svc: 192.168.1.123, port=37471: unknown version (3 for prog 100003, nfsd)

If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: nfs server   

Postby mad_ady » Tue Sep 02, 2014 10:36 pm

I think ubuntu tries to use NFS v4 by default, so you'll have to manually specify the NFS version in your mount command line:

Code: Select all
sudo mount -v -t nfs -o rw,vers=3,rsize=16384,wsize=16384,hard,proto=udp,timeo=7,retrans=3,nolock 192.168.1.25:/tmp/media/usb/USB1140/12a0037f-6b28-4758-8f27-fbcaf339742b /tmp/test


Also, what is your filesystem for /tmp/media/usb/USB1140/12a0037f-6b28-4758-8f27-fbcaf339742b? Based on the UUID, it seems like ext3, which should be fine. If it's ntfs or vfat, it could be a filesystem issue.
User avatar
mad_ady
Developer
 
Posts: 4532
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: nfs server   

Postby KAD » Wed Sep 03, 2014 3:46 am

actually you can see in the the log ubuntu tried v4 and fails, then tries v3 and still fails
manually specify vers does not change the behavior
I tried vers=3 and vers=2

but another interesting observation
when I boot SMP nfs-server appears fine

after I attempt to mount from ubuntu
nfs on webend goes red
and pidof nsfd does not return any result and nothing in process list
and if I retry test from ubuntu
showmount and rpcinfo shows that the nfs server has indeed stopped

then if I try to restart the nfs server on SMP, output looks fine
but on ubuntu side showmount starts working again
rpcinfo -p 192.168.1.25 is working again
rpcinfo -u 192.168.1.25 nfs shows that this was not correctly restarted "not available"
rpcinfo -u 192.168.1.25 mountd is working again

on smp side pidof nsfd indeed does not return any result, so nfsd service can not be restarted for some reason
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: nfs server   

Postby kroetkroet » Wed Sep 03, 2014 6:05 am

Hello KAD,

maybe a strange suggestion, but what about mounting the nfs share on the SMP itself? Does not make any sense in practical use, but you might see interesting stuff popping up in the logs?
WDLXTV-fan! - In case you need further assistance: read our WIKI, search our Forum and most of all: donate 'something' to b-rad for his great efforts!!!
User avatar
kroetkroet
Beta Tester
 
Posts: 1005
Joined: Mon Apr 05, 2010 11:53 pm

Re: nfs server   

Postby KAD » Wed Sep 03, 2014 8:00 am

that is an odd idea, it would be interesting to see those logs

however, late last night, I crashed my dev system
boot loops
frozen firmware updates
emergency flash recovery screen
etc ...

I've recovered the system already, but will need to re-add all the nfs bits to the firmware
before I can continue testing
and for now, gotta go to work
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: nfs server   

Postby KAD » Wed Sep 03, 2014 10:06 pm

well re-did the last nights work

still getting same error message
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: nfs server   

Postby kroetkroet » Wed Sep 03, 2014 11:45 pm

I'm out of odd ideas then :(

I remember smdb to have an extensive log-level system, that might exist on nfsd too?
WDLXTV-fan! - In case you need further assistance: read our WIKI, search our Forum and most of all: donate 'something' to b-rad for his great efforts!!!
User avatar
kroetkroet
Beta Tester
 
Posts: 1005
Joined: Mon Apr 05, 2010 11:53 pm

Re: nfs server   

Postby mad_ady » Thu Sep 04, 2014 1:28 am

I would try the following (being out of ideas as well):

1. A packet capture between the client and the SMP. You should see the NFS messages - if they are of any help
2. Running the mount command with strace to see the system calls it does. It might show something useful (like the point where it fails)...
User avatar
mad_ady
Developer
 
Posts: 4532
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: nfs server   

Postby KAD » Thu Sep 04, 2014 10:02 am

packet captures and strace all good idea's

I've been trying to weed through google search regarding nfs issues
unfortunately, it's littered with mostly noob questions with mount syntax errors and exports issues

I think I did find something to look into
hosts.allow file, apparently can control which daemons and services have permissions and which ip's or networks have permission to access the services
but I don't think that would explain all the behavior I'm seeing
if it was permissions, I would expect mounting on client side to fail, but not the nsfd process to die on the server side

another interesting test I did last night
I tried the binaries from debian-squeeze.img
those present an entirely different problem
no error messages, everything shows completed successfully
and even if I turn on debugging for rpc.nfsd it completes without error
but then if I check to see if it's actually running, it's not :evil:

another possibility I can try to to cross compile the nfs-utils myself instead of trying to use existing binaries
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Next

Return to Application Questions

Who is online

Users browsing this forum: No registered users and 1 guest