[Gluster-users] Gluster vs NFS export sync
Santosh Pradhan
spradhan at redhat.com
Wed Jul 16 03:02:19 UTC 2014
On 07/15/2014 06:24 AM, Franco Broi wrote:
> I think the option I need is noac.
noac is no-attribute-caching in NFS. By default, NFS client would cache
the meta-data/attributes of FILEs for 3 seconds and directory for 30
seconds (default value). NFS client revalidates the attr cache by
sending periodic GETATTR call. But if the client is mounted with noac,
then it wont cache attrs. I dont think it's available in FUSE mount.
This is not applicable to WRITE I/O which keeps changing the attrs. This
cant make I/Os synchronous. I/Os may get cached (VM subsystem cache) in
either side (NFS client and NFS server side).
Thanks,
Santosh
>
> On Fri, 2014-07-11 at 16:10 +0530, Santosh Pradhan wrote:
>> On 07/11/2014 02:37 PM, Franco Broi wrote:
>>> On Fri, 2014-07-11 at 14:22 +0530, Santosh Pradhan wrote:
>>>> On 07/11/2014 06:10 AM, Franco Broi wrote:
>>>>> Hi
>>>>>
>>>>> Is there any way to make Gluster emulate the behaviour of a NFS
>>>>> filesystem exported with the sync option? By that I mean is it possible
>>>>> to write a file from one client and guarantee that the data will be
>>>>> instantly available on close to all other clients?
>>>> I think FUSE also supports the sync option with mount similar to NFS.
>>> There's 2 types of NFS sync, server and client but they behave very
>>> differently. With sync at the client end, NFS just calls fsync on close
>>> (I think),
>> No. If the NFS client is mounted with sync flag i.e. -o sync, then all
>> the WRITEs will be synchronous i.e. they wont be cached in client side
>> and they(WRITEs) will hit the server with FILE_SYNC (stable write) flag
>> which is nothing but FILE I/O with O_SYNC flag.
>>
>>> with sync at the server end, all writes are synchronous.
>>>
>>> Opening the file with O_SYNC also doesn't give the desired effect
>>> although you'd think it would.
>> It should be same as above.
>>
>> Thanks,
>> Santosh
>>> NFS must have some way of communicating
>>> the file attribute changes to all the clients immediately the write
>>> completes.
>>>
>>>> Man page snippet for fuse(8):
>>>> OPTIONS
>>>> Most of the generic mount options described in mount are
>>>> supported (ro, rw, suid, nosuid, dev,
>>>> nodev, exec, noexec, atime, noatime, sync, async, dirsync).
>>>> Filesystems are mounted with
>>>> nodev,nosuid by default, which can only be overridden by a
>>>> privileged user.
>>>>
>>>> Thanks,
>>>> Santosh
>>>>
>>>>> Cheers,
>>>>>
>>>>> _______________________________________________
>>>>> Gluster-users mailing list
>>>>> Gluster-users at gluster.org
>>>>> http://supercolony.gluster.org/mailman/listinfo/gluster-users
>
More information about the Gluster-users
mailing list