Bug 606224 - GFS2 option relatime
GFS2 option relatime
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: Documentation-cluster (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Steven J. Levine
Cluster QE
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-21 03:12 EDT by Davide Brunato
Modified: 2011-04-14 00:49 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-14 00:49:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Davide Brunato 2010-06-21 03:12:41 EDT
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 11:39:02 EDT
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 12:01:37 EDT
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 07:32:05 EDT
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 12:19:47 EST
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.

Note You need to log in before you can comment on or make changes to this bug.