Re: knfsd

Michael L. Galbraith (mikeg@weiden.de)
Sat, 22 Nov 1997 04:35:33 +0100 (MET)


On Fri, 21 Nov 1997, Steven N. Hirsch wrote:

>
>
> On Fri, 21 Nov 1997, Bill Hawes wrote:
>
> > Steven N. Hirsch wrote:
> > > Though I've had very little time for testing this week, I've noticed one
> > > consistant problem with knfsd: My exported /usr/src volume on the server
> > > shows up as "file system busy" on every shutdown - triggering an annoying
> > > (and lengthy, as the disk is a 4.0GB filesystem) fsck on the next reboot.
> > > This occurs even when no client has ever mounted the volume! It seems to
> > > be a function of simply having it exported, and I never experienced this
> > > with the unfsd.
> > >
> > > Are you seeing this symptom?
> >
> > Hi Steve,
> > When you export a volume, the export list holds a dentry to the fs. If
> > the fs is still exported at shutdown, then it will appear busy (it _is_
> > busy.) This doesn't cause a fsck on my system, probably because the
> > shutdown script forces r/o anything that it can't umount.
> >
> > It's easy to avoid the problem -- just revoke the exports as an early
> > part of the shutdown.
>
> Ah, but how? There doesn't seem to be any option to exportfs for this,
> and killing off the lockd and mountd processes didn't do the trick.
>
> Steve
>
>
>

Hi Steve,

You can add something like this to your initscripts to handle it..
if [ -x /usr/sbin/exportfs ]
then
echo "Disabling filesystem exports."
/usr/sbin/exportfs -u -a
fi
.. in my case, it's etc/rc.d/rc.6

(thanks for the tip Bill.. I was really getting tired of fscking :)

Do you see this too.. or is my machine broken in some way? What happens
here (consistently) is that the first access attempt to an exported
root (here I mean /) leads to a slew of 'Permission denied' errors where
there should be none. The second and subsequent access attempts leads
to the same permission errors, BUT.. they refer to my /usr partition!

-Mike

-----------------------------the data--------------------------------
mikeg:# exportfs -v
/mnt laptop.mikeg.weiden.de(rw,async,wdelay,no_root_squash)
/ laptop.mikeg.weiden.de(rw,async,wdelay,no_root_squash)
mikeg:# rlogin laptop
Linux 2.0.32.

laptop:~# mount -oasync,rsize=8192,wsize=8192 desktop:/ /mnt

Access attempt 1:

laptop:~# ls /mnt
/bin/ls: /mnt/dos_c: Permission denied
/bin/ls: /mnt/dos_d: Permission denied
/bin/ls: /mnt/proc: Permission denied
/bin/ls: /mnt/shlib: Permission denied
/bin/ls: /mnt/shlibs: Permission denied
/bin/ls: /mnt/cdrom: Permission denied
... ... ...
/bin/ls: /mnt/tmp: Permission denied
/bin/ls: /mnt/home: Permission denied
/bin/ls: /mnt/mnt: Permission denied
/bin/ls: /mnt/archives: Permission denied
/bin/ls: /mnt/fastboot: Permission denied
/bin/ls: /mnt/nfs: Permission denied
/bin/ls: /mnt/System.map: Permission denied
/bin/ls: /mnt/vmunix: Permission denied
bin/
boot/
dev/
etc/
lib/
lost+found/
root/
sbin/
usr/
var/

Followed immediately by access attempt 2:

laptop:~# ls /mnt
/bin/ls: /mnt/lost+found: Permission denied
/bin/ls: /mnt/bin: Permission denied
/bin/ls: /mnt/lib: Permission denied
/bin/ls: /mnt/local: Permission denied
/bin/ls: /mnt/man: Permission denied
... ... ...
/bin/ls: /mnt/doc: Permission denied
/bin/ls: /mnt/src: Permission denied
/bin/ls: /mnt/admin: Permission denied
/bin/ls: /mnt/i586-linux-gnulibc1: Permission denied
/bin/ls: /mnt/i486-linux-gnulibc1: Permission denied
laptop:~# exit
logout
rlogin: connection closed.
mikeg:# df
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sdb1 69408 54480 11348 83% /
/dev/sdb2 29744 300 27908 1% /tmp
/dev/sdb3 1771464 1599924 153252 91% /usr
/dev/sdc1 1869624 1604576 265048 86% /usr/local/src
/dev/sda1 205588 185252 20336 90% /dos_c
/dev/sda2 615248 555024 60224 90% /dos_d
/dev/scd0 326210 326210 0 100% /cdrom