hi, Also, sprach Waldemar Brodkorb am Dienstag, den 30. Januar 2007 um 22:37: > On Tue, 30 Jan 2007 at 11:51 +0100, Sebastian Fontius wrote: > > As per http://forum.openwrt.org/viewtopic.php?pid=39135 the problem is > > the filesystem. And indeed exporting/mounting a mounted USB stick > > (ext3) directly works. > > > > There is another problem: exportfs -r needs to be run by hand at the > > moment, so if it could be added to the init script I think that would > > help a lot. (I do not know if the portmap entries are needed in > > /etc/services, but I added them nevertheless.) > > Can you please provide a patch against freewrt_1_0 branch, adding > all mkdir stuff into the normal nfs init script?
Of course. But I noted an oddity (though I must admit that I do not
know my way around the FreeWRT ADK all too well): On my router the
/etc/init.d/S70nfsd script (unaltered) reads:
,----
| start)
| /usr/sbin/lockd
| /usr/sbin/mountd
| /usr/sbin/nfsd
| ;;
`----
Whereas in freewrt_1_0/package/nfs-server/files/nfsd.init it reads:
,----
| start)
| /usr/sbin/rpc.mountd -r
| /usr/sbin/rpc.nfsd
| ;;
`----
My _patch_ is against the latter while I _run_ the former on my router
(of course with the patched lines)... The latter works fine. I have
no idea (and no time to find out) where the discrepancy comes from,
but a quick glance at rpc.mountd(8) on my Debian Sarge box does not
show an -r option to rpc.mountd. And to even further the confusion
rpc.mountd(8) is the same as mountd(8) (the first is a symlink to the
latter).
So just to make sure everyone "gets" me: This is what works right now
on my router as /etc/init.d/S70nfsd:
,----
| #!/bin/sh
|
| . /etc/rc.conf
|
| case $1 in
| autostart)
| test x"${nfsd:-NO}" = x"NO" && exit 0
| exec $0 start
| ;;
| start)
| /bin/mkdir -p /var/lib/nfs
| /bin/touch /var/lib/nfs/{rm,e,x}tab
| /bin/touch /var/lib/nfs/state && chmod 0600 /var/lib/nfs/state
| /usr/sbin/exportfs -r
| /usr/sbin/lockd
| /usr/sbin/mountd
| /usr/sbin/nfsd
| ;;
| stop)
| killall nfsd
| killall mountd
| ;;
| restart)
| $0 stop
| $0 start
| ;;
| *)
| echo "Usage: $0 {start | stop | restart}"
| exit 1
| ;;
| esac
| exit $?
`----
I attached another patch against
freewrt_1_0/package/nfs-server/files/nfsd.exports to clarify that
exporting /mnt will not work as expected (I tried to export a tmpfs
file system, /tmp, and this did not work, too, with the same error:
Stale NFS file handle on the client side)
Greetings,
--
: Sebastian Fontius : www.fsfe.org : www.fsfe.org/en/fellows/smc
`--------+----------+--------------+-----------------------------------.
[] | "They that can give up essential liberty to obtain a little |
[][][] | temporary safety deserve neither liberty nor safety." |
|| : Attributed to Benjamin Franklin, 1759 :
--- freewrt_1_0/package/nfs-server/files/nfsd.init 2007-01-19
13:46:29.000000000 +0100
+++ freewrt_1_0/package/nfs-server/files/nfsd.init.smc 2007-01-31
09:20:12.580487264 +0100
@@ -8,6 +8,10 @@
exec $0 start
;;
start)
+ /bin/mkdir -p /var/lib/nfs
+ /bin/touch /var/lib/nfs/{rm,e,x}tab
+ /bin/touch /var/lib/nfs/state && chmod 0600 /var/lib/nfs/state
+ /usr/sbin/exportfs -r
/usr/sbin/rpc.mountd -r
/usr/sbin/rpc.nfsd
;;
--- freewrt_1_0/package/nfs-server/files/nfsd.exports 2007-01-19 13:46:29.000000000 +0100 +++ freewrt_1_0/package/nfs-server/files/nfsd.exports.smc 2007-01-31 08:45:07.656484352 +0100 @@ -1 +1,5 @@ -/mnt (ro,all_squash,insecure) +# Please note that exporting a directory on a jffs2/tmpfs filesystem +# (e.g. /mnt) does not work! Exports have to be something else +# (e.g. ext2/3 or vfat). + +#/mnt/foo *(ro,all_squash,insecure,subtree_check)
signature.asc
Description: Digital signature
_______________________________________________ freewrt-users mailing list [email protected] https://www.freewrt.org/lists/listinfo/freewrt-users
