NFS problem: file doesn't appear in file listing, but can be accessed directly

Rick Macklem rmacklem at uoguelph.ca
Sun Dec 19 02:00:06 UTC 2010


> On 08/08/2010 02:06 AM, Rick Macklem wrote:
> >> On 07.08.2010, at 02:35, Rick Macklem wrote:
> >>
> >> I agree, this must be some kind of server issue then. Still, I
> >> wonder
> >> why the solaris client didn't show the problem...
> >>
> >>
> > 2 things:
> > 1 - the solaris client uses ReaddirPlus and not Readdir RPCs by
> >      default (I can't remember if that default can be overridden?).
> I don't know whether this counts or not, but I've tried with an old
> Solaris (x86) 8 (uname says it's Generic_108529-06).
> 
> > ps: I don't recall the previous emails mentioning that the "ls"
> >      was ok for a solaris client.
> >
> It was in 4C582968.9000303 at fsn.hu:
> "I've mounted the share from an old Solaris box, which sees the file."
> 
> This means, when I issue an ls | grep problematic_fname, I can see the
> filename.
> BTW, this turned out to be incorrect, because I've tested with the
> same
> (one of the missing) filename.
> Doing a find . in the directory on both FreeBSD and Solaris client
> shows
> some differences.
> So what I have now is: both the normal and the experimental NFSD show
> the problem on both FreeBSD and Solaris clients (only the missing file
> names are different).
> 
> On Solaris there are 78 files missing, on FreeBSD there are 193, I
> haven't checked that they are persistent across reboots or not.
pjd@ just found a problem which affects both the regular and experimental
NFS servers when exporting a ZFS volume. (Basically there is a hack in
the servers that is needed for UFS, which breaks serving ZFS. If you look
in sys/nfs_serv.c and search for "FreeBSD ufs_readdir" in a comment in
nfs_readdir() you can read about it. ZFS doesn't generate monotonically
increasing directory offset cookies.)

If you were using ZFS for the above, please let me know.

Also, if you can still reproduce the problem and are exporting ZFS and
not UFS, you could test the attached patch (be forwarned that it will break
exporting of UFS!!). And, if you get to test this patch, please let me know
how it goes.

rick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zfsreaddir.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20101219/e0b6e709/zfsreaddir.bin


More information about the freebsd-fs mailing list