On 4/15/2010 at 02:06 AM, luben karavelov <[email protected]> wrote: 
> On 14.04.2010 08:59, Tim Serong wrote: 
> > 
> > Can you be more specific about that?  From memory it should just be nfsd 
> > processes that have the open file handles. 
> > 
> > What happens if you open some files from a client, then run the following 
> > on your server?: 
> > 
> >    # fuser -vm /mountpoint 
> > 
> > Likewise if you run that command after/during a stop op? 
> > 
> > Regards, 
> > 
> > Tim 
> > 
> >     
>  
> fuser command does not show open files.

Correct, but it does (or should) show what processes are using a given
filesystem.  For example (on a system where I happen to have exported
/var/www via NFS):

  # fuser -vm /var/www 2>&1 | grep nfs
                     root       1506 .rc.. nfsiod
                     root       1933 .rc.. nfsd4
                     root       1934 .rc.. nfsd
                     root       1935 .rc.. nfsd
                     root       1936 .rc.. nfsd
                     root       1937 .rc.. nfsd
                     root       1938 .rc.. nfsd
                     root       1939 .rc.. nfsd
                     root       1940 .rc.. nfsd
                     root       1941 .rc.. nfsd

Note that you have to run it as root to see everything.

> My understanding is 
> that nfsd is a kernel thread. In fact this is the case here: 
>  
> r...@lab2:~# ps axu | grep nfs 
>  
> root       913  0.0  0.0    356   144 pts/2    R+   19:01   0:00 grep nfs 
> root     25379  0.0  0.0      0     0 ?        S<   Apr12   0:00 [nfsd4] 
> root     25380  0.0  0.0      0     0 ?        S    Apr12   0:00 [nfsd] 
> root     25381  0.0  0.0      0     0 ?        S    Apr12   0:00 [nfsd] 
> ... 

Sure, but they're processes, and they are killable.  What happens if you
"kill -9 25379"?  Does it die immediately and release whatever open files
it had?  Or does it wedge up somehow (get stuck in D state or whatever)?

> After unexporting a directory there are some time (around 1 minute) 
> when the kernel still holds open files on the underlying fs. 

So if it's the NFSDs that are holding files open, the Filesystem RA should
have killed these within about 6 seconds.  If they have all been killed,
it's not NFSD keeping the filesystem busy, it's something else.  Mabye
there's a whole lot of dirty pages that need to be flushed to the disk?
In which case, "fuser" should show some other kernel process active on
the filesystem...

Regards,

Tim


-- 
Tim Serong <[email protected]>
Senior Clustering Engineer, OPS Engineering, Novell Inc.



_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to