1828658 Members
1266 Online
109983 Solutions
New Discussion

NFS client - ASYNC write

 
Matt Sears
Occasional Advisor

NFS client - ASYNC write

Does anyone know how to get an NFS client to send a WRITE with the stable bit set to ASYNC?

I've exported the share using ASYNC, but it seems there is something else I'm missing. I mounted the share and used vi to write a character to a file. Using Wireshark, I can see that the client is sending FILE_SYNC rather than ASYNC.
4 REPLIES 4
Dave Olker
Neighborhood Moderator

Re: NFS client - ASYNC write

Hi Matt,

Have you tried using other applications to send WRITE data to the server other than vi? It could be the way vi is issuing the write that causes the FILE_SYNC semantics. I know there are different ways to write data on other platforms, like mmap(), that cause synchronous semantics.

Do you see the same behavior with something like cp? Also, are you using default NFS mount options? If not, what options are you using to mount the filesystem?

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Matt Sears
Occasional Advisor

Re: NFS client - ASYNC write

Dave, thank you for your response. I had tried vi and emacs, and when I tried cp it too gave used WRITE with FILE_SYNC. I then tried dd. I used dd if=/dev/full of=/nfs_mounted_file bs=1024 count=100. This caused the WRITE request to be called with the stable bit set to UNSTABLE. I guess my other WRITE requests were just too small.
Dave Olker
Neighborhood Moderator

Re: NFS client - ASYNC write

What NFS mount options are you using for this filesystem? Can you do an "nfsstat -m" and cut/paste the output here so I can see exactly which options you're using?

Also, what OS is running on the NFS client and server?

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Matt Sears
Occasional Advisor

Re: NFS client - ASYNC write

> nfsstat -m
/mnt/1 from e4s01:/mnt/1
Flags: rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=e4s01

Client OS: CENTOS5 (linux kernel 2.6.18-128)
Server OS: RHEL5 (linux kernel 2.6.18-92)

I may not have been clear with my previous post. I was able to force the desired condition by sending a large WRITE request. My guess is that the other requests were just too small.