Skip to contentSkip to conversation

machine hangs - SLES9/NFS

DISCUSSION Shylendra Bhat 2 participants 2 messages Jul 1, 2004

lore
Share & tools
lore
#0 lore raw

Hello,

I am looking answers for the following questions.

Is nfs file lock acquired by client, persistent across the nfs server reboot?
I know that this feature was not there in NFSv3. Does NFSv4 supports this?

Following is the exercise which I did to test nfs file lock.

I have two machines. One among them is the NFS server running on SLES9(kernel 2.6.5-7.79). The other machine mounts the NFS exported filesystem.

I have written a application which locks the files over this nfs mount.

After acquiring the lock, I am restarting the nfs service using "rcnfsserver restart" command.

After the nfs service restart, the client fails to release the lock and is in a hung state. If the mount directory is listed, it shows

"bash: cd: /export: Stale NFS file handle"

After this behavior of the client, server stops responding. Only way to bring back the machine is reboot.

Any help is really appreciated.

Thanks & regards
Shylendra

#1 lore raw

På to , 01/07/2004 klokka 08:00, skreiv Shylendra Bhat:

Quoted 8 lines

Hello,

I am looking answers for the following questions.

Is nfs file lock acquired by client, persistent across the nfs server reboot?
I know that this feature was not there in NFSv3. Does NFSv4 supports this?

FUD. The lock manager for NFSv3 does reclaim locks if the server reboots.

Quoted 4 lines

After the nfs service restart, the client fails to release the lock and is in a hung state. If the mount directory is listed, it shows

"bash: cd: /export: Stale NFS file handle"

Which means that the server is screwed up. Two possibilities: either

1) you have a fibrechannel back end or something like that which doesn't have a fixed device number: you can fix that by using the "fsid" export option.

2) The filesystem you are exporting is using non-permanent inode numbers (FAT filesystems are a prime example). Sorry: no workaround for this other than converting to another filesystem.

Cheers,
Trond