On 15.04.2010 05:01, Tim Serong wrote:
> 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.
>
>    
no, here it does not show anything:
r...@lab2:~# fuser -vm /nfs4/test
r...@lab2:~# uname -a
Linux lab2 2.6.24-10-pve #1 SMP PREEMPT Tue Dec 29 10:16:15 CET 2009 
x86_64 GNU/Linux
r...@lab2:~# fuser -V
fuser (PSmisc) 22.6


>> 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)?
>
>    

It dies, but that's not the point. If I kill all nfsd threads it will
kill all NFS exports. The idea of exportfs is that you could move
just one the exported directories to different server.

>> 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
>    

If there are dirty pages to be flushed, this will be done in
"umount" command, so it will take some time. I am prety sure
thet it is the nfsd that keeps open files on the FS. It happens
only if there is nfs client that hold open files.

Maybe I should try with more recent kernel...

Best regards
Luben

_______________________________________________________
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