Bug 606224

Summary: GFS2 option relatime
Product: Red Hat Enterprise Linux 5 Reporter: Davide Brunato <brunato>
Component: Documentation-clusterAssignee: Steven J. Levine <slevine>
Status: CLOSED CURRENTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: edamato, kzak, mhideo, rpeterso, swhiteho
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-14 04:49:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Davide Brunato 2010-06-21 07:12:41 UTC
Description of problem:

For GFS2 filesystems, in the 5.4 official documentation, there is a mount option "relatime":

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/Global_File_System_2/index.html

But it seems to not work:

# mount /dev/... /mnt -o relatime
/sbin/mount.gfs2: error mounting /dev/..... on /mnt: Invalid argument
Version-Release number of selected component (if applicable):

Is an error in the documentation or I have a misconfiguration in my system?

Thanks & Best Regards

Davide Brunato

Comment 1 Robert Peterson 2010-06-21 15:39:02 UTC
Hi Davide,

I looked into this issue and as far as I can tell, the documentation
is wrong.  The "relatime" mount option was not added to the Linux
kernel until 2.6.20.  Since Red Hat Enterprise Linux 5 is based on
the 2.6.18 kernel, it does not include the option.  I'm reassigning
this bug to Steven Levine to have the documentation fixed.  Thanks
for pointing out the problem.

I'd also like to note that Red Hat Enterprise Linux 6 is now, I
believe, in beta.  Since it's based on a more recent kernel, I tried
the "-o relatime" there and the mount option seemed to work
correctly, although I didn't test the actual function of what
"relatime" does.

Regards,

Bob Peterson
Red Hat File Systems

Comment 2 Steven J. Levine 2010-06-21 16:01:37 UTC
As background here:  I added the relatime information during a GFS2 review. Steve Whitehouse had written the following, in December of 2008:

 > atime_quantum has gone, in its place we support the noatime and relatime
>  > mount options, as per other filesystems. We recommend relatime to get
>  > similar behaviour to gfs1. The "normal" atime mode has been improved to
>  > reduce the number of write I/Os generated by atime updated compared with
>  >gfs1.

I responded:

> I'm glad you noted this, because I had a section in the document about 
> using atime_quantum, which I've now eliminated. I also didn't know about 
> support for relatime. I've replaced the section on atime_quantum with 
> the following. Does this look correct?  (It's based on the existing 
> section on noatime.)

I sent the new section to Steve and he said it looked good.

So that's how this section got into the GFS2 document. I don't know, though, if it's a problem that the option is not supported -- with the normal atime behavior improved it may not be. Bob Peterson is checking into this.

Comment 3 Steve Whitehouse 2010-07-12 11:32:05 UTC
In GFS there was always a problem with atime updates in that if cluster members has differing clocks, then they could potentially fight over updating the time stamp of an inode open on multiple cluster members.

The GFS2 system insists on a monotonically increasing atime, so that the cluster member with the clock which is most ahead will set the atime and it will not be updated until such time as the other cluster members' clocks' catch up with the current atime setting. That greatly reduces the number of updates which are likely to occur when the clocks differ slightly.

relatime is only for RHEL6 and up. Sorry if I made a mistake earlier. The noatime option is supported in all cases. The nodiratime option is supported with GFS2. It might also be supported with some more recent GFS kernels too. I'd need to check on that to be certain. The problem was the change in the VFS layer which changed the way in which atime worked, basically forcing all filesystems to adopt the VFS way of doing things. That was ok for GFS2, but I remember it causing some issues with GFS when it occurred.

Comment 4 Steven J. Levine 2010-12-03 17:19:47 UTC
I have removed the documentaton for relatime from my working RHEL 5 draft of the GFS2 document and the updated, corrected document should be part of the RHEL 5.6 release.