problem with nfsd

t3d

Neuer User
Mitglied seit
15 Mai 2008
Beiträge
10
Punkte für Reaktionen
0
Punkte
0
Hi, i have a fritz!box 7140 with freetz 1.1.

I can't run nfs deamon. The web interface shows me
Starting nfsd...Looking for group 'nobody' ... found
Looking for user 'nobody' ... found
failed.

and when i try to run the deamon by init script i get
Code:
/var/mod/root # sh -x /etc/init.d/rc.nfsd start
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/mod/sbin:/mod/bin:/mod/usr/sbin:/mod/usr/bin
+ export LD_LIBRARY_PATH=/mod/lib
+ DAEMON=nfsd
+ NFS_DIR=/var/lib/nfs
+ . /etc/init.d/modlibrc
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/mod/sbin:/mod/bin:/mod/usr/sbin:/mod/usr/bin
+ export LD_LIBRARY_PATH=/mod/lib:/mod/usr/lib
+ [ -n nfsd ]
+ [ ! -r /mod/etc/conf/nfsd.cfg ]
+ . /mod/etc/conf/nfsd.cfg
+ export NFSD_ENABLED=no
+ start
+ set -o noglob
+ echo -n Starting nfsd...
Starting nfsd...+ modlib_addgroup nobody
+ local group=nobody
+ shift
+ echo -n Looking for group 'nobody' ... 
Looking for group 'nobody' ... + grep -q ^nobody: /etc/group
+ echo found
found
+ modlib_adduser nobody -s /bin/false -D -S -H -G nobody -g nobody
+ local user=nobody
+ shift
+ echo -n Looking for user 'nobody' ... 
Looking for user 'nobody' ... + grep -q ^nobody: /etc/passwd
+ echo found
found
+ return 0
+ [ -e /etc/exports ]
+ modprobe nfsd
+ mkdir -p /var/lib/nfs
+ touch /var/lib/nfs/etab
+ touch /var/lib/nfs/rmtab
+ touch /var/lib/nfs/xtab
+ /usr/sbin/portmap
+ exitval1=0
+ /usr/sbin/exportfs -r
+ exitval2=0
+ /usr/sbin/nfsd -p 2047
+ exitval3=1
+ /usr/sbin/mountd
+ exitval4=0
+ [ 0 -eq 0 ]
+ [ 0 -eq 0 ]
+ [ 1 -eq 0 ]
+ echo failed.
failed.
+ exit 1
/var/mod/root #

My config files:
Code:
/var/mod/root # cat /etc/exports 
/var/media/ftp/uStorro2/1us/usb/001/0041 192.168.178.21(async,rw,no_subtree_check)

/var/mod/root # cat /etc/hosts.allow 
ALL: 192.168.178.
/var/mod/root # cat /etc/hosts.deny 
ALL: ALL
/var/mod/root #

It also doesn't start with empty hosts.allow and hosts.deny
The device is at the given location. It is mounted - avaliable on ftp and listed by df.

What's wrong?
 
Perhaps you can attach a strace of "/usr/sbin/nfsd -p 2047"?

Regards
Oliver
 
I had to prepare another image, so it took me some time :)
Code:
/var/mod/root # strace /usr/sbin/nfsd -p 2047
execve("/usr/sbin/nfsd", ["/usr/sbin/nfsd", "-p", "2047"], [/* 131 vars */]) = 0
svr4_syscall()                          = -1 ERRNO_4090 (Unknown error 4090)
open("/mod/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\30\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 122880, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabd000
old_mmap(0x2aabd000, 53876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabd000
old_mmap(0x2aada000, 1020, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x2aada000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/mod/lib/libc.so.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\260\272\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 462848, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aadb000
old_mmap(0x2aadb000, 370340, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aadb000
old_mmap(0x2ab46000, 4452, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5b000) = 0x2ab46000
old_mmap(0x2ab48000, 15096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab48000
close(3)                                = 0
mprotect(0x2aadb000, 370340, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
munmap(0x2aaae000, 4096)                = 0
mprotect(0x2aadb000, 370340, PROT_READ|PROT_EXEC) = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
brk(0)                                  = 0x413000
brk(0x415000)                           = 0x415000
open("/etc/services", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/etc/services", O_RDONLY)         = -1 ENOENT (No such file or directory)
chdir("/var/lib/nfs")                   = 0
open("/dev/null", O_RDWR|O_LARGEFILE)   = 3
dup2(3, 0)                              = 0
dup2(3, 1)                              = 1
dup2(3, 2)                              = 2
stat("/proc/self/fd", {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0
open("/proc/self/fd", O_RDONLY)         = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
getdents64(4, /* 8 entries */, 1024)    = 192
getdents64(4, /* 0 entries */, 1024)    = 0
close(4)                                = 0
open("/proc/fs/nfsd/versions", O_WRONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/proc/fs/nfsd/portlist", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/proc/fs/nfsd/threads", O_WRONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/proc/fs/nfs/threads", O_WRONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
nfsservctl(0, 0x7f9e97d0, 0)            = -1 ENOSYS (Function not implemented)
exit(1)                                 = ?
 
It seems that your kernel doesn't support NFS.
If I remember correctly, it is necessary to use the option "replace kernel" for NFS.
 
It seems that your kernel doesn't support NFS.
If I remember correctly, it is necessary to use the option "replace kernel" for NFS.

I didn't know i had to replace kernel. Anyways in another image i made with the replaced kernel nfsd still doesn't start

EDIT:
Oops, it looks like i uploaded the image with added strace once again instead of uploading the one with replaced kernel. I'll tell you what are the results in a minute.
 
Zuletzt bearbeitet:
ok, the service is up and running. Thank you guys for help and for the excellent firmwares :)
 
Hello,

just for the record I would like to summarize the knowledge in this thread. Please correct me, if I am wrong:

In order to be able to correctly use NFS in Freetz, the option "replace kernel" also has to be ticked within "make menuconfig". In case that this is right, it would make sense, if this option is ticked automatically when NFS is selected.

Then I have a few other questions regarding the Wiki; there are two entries there, one for nfs-utils, the other for plain nfs.

The entry for nfs-utils says:
Die NFS-Utils erweitern Freetz um einen NFS Server inklusive Administrationswebinterface für die Konfigdateien Exports, allow_hosts und deny_hosts'.
To my understanding, this means that this package provides both the server and the corresponding WebGUI, and therefore I would assume that when adding nfs-utils, one would not need (plain) nfs, right?
The point I would like to make is that this could be reflected in the Wiki, if my assuption is correct.

On the other hand, the entry for (plain) nfs says:
Um den doch etwas begrenzten Speicherplatz zu erweitern, kann man die Fritzbox als NFS-Client benutzen. Da es kein Webinterface für diese Funktion gibt muss das manuell erledigt werden. Zur Nutzung von NFS-Shares muss das NFS-Kernel-Modul im menuconfig ausgewählt werden.
Maybe it would help to cross-link to the nfs-utils package, in order to make the user aware that there is a WebGUI available.

I would really like to quickly check whether only these Wiki entries are a little bit outdated (if I did not completely misunderstood them) and wether the real nfs package which can be selected within "make menuconfig" also automatically includes the WebGUI (or maybe only the binaries for the NFS server), but at the moment I do not have access to my build environment, unfortunately. If someone could please check and let us know the results, I can offer to amend the Wiki entries accordingly. Thank you.
 
JFUI...
For the 7270 (67´er Firmware) it is not necessary to replace kernel for the NFS Server.
I am running it without replaced kernel...
 
Ah, thanks, Ralf, I really overlooked that.
Thanks, Darkyputz, for confirmation, too!
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.