DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-10-30 23:37:26

puterboy
Member
Registered: 2008-09-18
Posts: 306

nfsd randomly dropping files & directories!!!!

I am running kernel-space nfsd (from fun_plug) using a recompiled 2.6.12.6 kernel.

I started noticing that seemingly at random certain files (temporarily) vanish when read from the client (while always there on the server).

For example when I ran 'find' on a large number of files from the client, the number of results returned would vary with varying numbers of files and subdirectories being missing while at other times it works ok.

The kernel logs on both the server and client are completely clean when this happens (not even any timeouts).

On the server side, I am using the following options: rw,async,wdelay,root_squash,no_subtree_check

On the client side, I am mounting the share using: noexec,nosuid,nodev,intr,_netdev,async,timeo=25,soft

This is obviously a very dangerous situation since it can lead to extreme corruption, especially since I am using the dns-323 for backups.

I have googled lots but haven't find any definitive answers though some people speculated about things like having the right mtu size on both machines.

Offline

 

#2 2008-10-31 01:46:55

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Fonz - is your nfsd package using recent versions?
Did you have to do any unusual configurations or patches to make it work?
Is there anything you know about NFS on a dns-323 that could be causing my problems?
(e.g., do I have to use non-default values of rsize/wsize or worry about the MTU etc.)

Offline

 

#3 2008-10-31 09:22:47

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: nfsd randomly dropping files & directories!!!!

puterboy wrote:

Fonz - is your nfsd package using recent versions?
Did you have to do any unusual configurations or patches to make it work?
Is there anything you know about NFS on a dns-323 that could be causing my problems?
(e.g., do I have to use non-default values of rsize/wsize or worry about the MTU etc.)

Are you using ext3? I remember issues like disappearing files with early firmwares that supported ext3.

Offline

 

#4 2008-10-31 10:08:06

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Just to clarify - the files are all there on the dns-323 and never vanish from the device itself.
They only vanish when viewed from the nfs client.
Even then, I can make the files reappear by either remounting the nfs share or by accessing the files directly on the server.

It's almost like they are stored in some volatile cache that then gets overwritten and needs to be refreshed.

I tried using the 'noac' mount parameter to turn off all attribute caching but that didn't help either...

By the way, this is not a rare event -- within a few minutes of remounting the partition and accessing files, I will find that 70-80% of the files and directories in a directory tree are not accessible. The timing and distribution of which ones vanish seems "random" to my eyes so far....

This is making nfs completely unusable for me... sad

Offline

 

#5 2008-10-31 10:18:56

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: nfsd randomly dropping files & directories!!!!

I don't have this problem.

Offline

 

#6 2008-10-31 17:09:04

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Are you using kernel 2.6.12.6 or a later kernel?

Offline

 

#7 2008-10-31 18:04:59

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: nfsd randomly dropping files & directories!!!!

Most of the time 2.6.12.6

Offline

 

#8 2008-11-02 04:41:37

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

I think you are right about ext3.
So far, I am not getting the same errors when I mount HD_a2 as ext2.
Interesting though that the error only affects the NFS mount. I have not seen any errors when logged into the dns-323 or when using samba mounts. The problem also doesn't seem to happen with unfs on ext3.

So it seems like a kernel problem with nfs & ext3 interacting.

Fonz, if you or anybody else is mounting ext3, would it be possible to check whether the problem is universal or just unique to my setup.
Test case:
- kernel 2.6.12.6
- nfsd.o module and funpkg nfs server (NOT unfs)
- mount nfs share on another linux client
- Run something like "find ." repeatedly on a directory tree with a lot of files from the NFS client.
After a (random) number of repeated 'find's, I start getting errors like:
" No such file or directory"

Offline

 

#9 2008-11-05 00:17:35

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Fonz,
Are you using nfsd?
If so can you post or send me a copy of your kernel module (that works with the 2.6.12.6 kernel you supply) so that I can verify whether my problems exist also with your compiled version.

Just want to rule out that it's not due to a bug in my compile environment...

Offline

 

#10 2008-11-05 00:36:54

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: nfsd randomly dropping files & directories!!!!

puterboy wrote:

Are you using nfsd?
If so can you post or send me a copy of your kernel module (that works with the 2.6.12.6 kernel you supply) so that I can verify whether my problems exist also with your compiled version.

Yes, nfsd. But I don't have a kernel module, it's compiled in.

Offline

 

#11 2008-11-06 09:58:50

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

OK - I will then reboot from your kernel 2.6.12.6 and see whether I get the same problems under ext3 vs. ext2.
Thanks.

Offline

 

#12 2008-11-07 10:10:57

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Well, I just tried using your 2.6.12 kernel from the fsck package and had the same problem with ext3. So there is definitely something wrong with the ext3/nfs combination at least -- and probably more broadly with ext3 given its history...

Offline

 

#13 2009-01-02 23:21:35

Sparkss
Member
Registered: 2008-05-09
Posts: 44

Re: nfsd randomly dropping files & directories!!!!

are you saying that the zImage-2.6.12.6 in the fsck package has nfs support compiled into the kernel ? and if I recall, you have a B1 version 323 ?

TIA  smile

Offline

 

#14 2009-01-04 00:42:56

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

it's turned on but not compiled in I believe. I think you need to add the module separately but I can't remember 100%.
I use my own re-compiled 2.6.12.6 kernel with an nfsd.ko module.

Last edited by puterboy (2009-01-08 20:05:10)

Offline

 

#15 2009-01-07 08:37:53

Sparkss
Member
Registered: 2008-05-09
Posts: 44

Re: nfsd randomly dropping files & directories!!!!

could you point to some resources that you used to compile your own kernel ? Been a while since I compiled one (BSD and maybe 10+ yrs ago). Is there a thread that you have here that you either followed or started for the compile ?

TIA

Offline

 

#16 2009-01-08 09:32:30

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Look on the wiki

Offline

 

#17 2009-01-08 18:24:07

Sparkss
Member
Registered: 2008-05-09
Posts: 44

Re: nfsd randomly dropping files & directories!!!!

yea, I found that last night. I got the kernel from fsck.2007 to load, but it was limited in functionality (from what I could tell). I have been playing around w/ the new loader that Fonz set up for you last October (in Misc). I had to add in my IP settings to the command line being passed, then it worked, but I haven't gone through the config to see if it has what I am looking for or if I need to get all set up to recompile my own. The tough part is finding time to take the NAS down to work with it. My wife and daughter use it (all of our kids shows are on the NAS streamed to our TV, it keeps the little one occupied and the wife sane). After even more reading it looks like the kernel needs to be compiled on the DNS itself (although I saw one person mention that they tried that as a last resort to get a "good" kernel), so the other option would be on another Linux system ? (but not on a Window box, right ?). I spent more time tweaking the dif loaders and trying different initrds and kernels to really take the time to read nad digest that wiki (though I did download most of files from the links there). Any suggestions, advice or gotchas you have come across ? Care to share your currently working config ? (seems like I remember that one of the network configs needs to be set a certain way....) Thanks in advance.

Offline

 

#18 2009-01-08 18:56:15

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: nfsd randomly dropping files & directories!!!!

Compiling kernel on dns would probably take a long time.
The wiki recommends setting up a libc toolchain and cross-compile environment on another linux system -- again read the wiki -- it is all there in detail.

You can use the baseline config from the gpl'd and modified 2.6.12 kernel provided by d-link.
To get NFS, I think all I need to do was turn on the nfs server option. This is what I have:
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
# CONFIG_ROOT_NFS is not set

Offline

 

#19 2009-01-08 19:26:19

Sparkss
Member
Registered: 2008-05-09
Posts: 44

Re: nfsd randomly dropping files & directories!!!!

Thanks, I just need to set aside the time to re-read that in greater detail. Guess I can use VMWare to setup a Linux VM for that compile. Thanks for the NFS entries for the config.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB