Red Hat Bugzilla – Bug 296361
[PATCH] nash mount should support relatime
Last modified: 2009-05-06 12:34:55 EDT
Edit /etc/fstab and make your root fs use relatime. Then install a new kernel
The initrc appears to succceed with:
mkrootdev -t ext3 -o relatime,ro /dev/vg1/root
But then chokes on the next line:
Created attachment 218711 [details]
Patch against fedora 7 CVS to add relatime support to nash
Created attachment 218721 [details]
Patch against fedora devel CVS to add relatime support to nash
The just released 220.127.116.11-10 kernel also panics with either LVM or direct
extfs3 file systems that have had /etc/fstab set with nodiratime,relatime as
options on / and /boot.
Booting the previous 18.104.22.168-91 kernel and setting these options back to
defaults in /etc/fstab has no effect.
Also did a remount of the live file systems in 22.214.171.124-91 to be just read
write and executed a telinit 0 and reboot to the 23 kernel. Still gives a
kernel panic after Unrecognized mount option relatime or missing value even
when not in /etc/fstab.
No errors reported in 126.96.36.199-91 at all.
This is not directly dependent on kernel version, but on the mount options
specified in /etc/fstab *at the time a kernel update is installed*.
I now know that relatime is actually the default now, so anyone encountering
this can remove relatime from their /etc/fstab and rebuild the initrd for their
kernel to avoid this bug (I still think the patch should be applied for safety),
and still have / mounted using relatime.
To rebuild your initrd you can run:
/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 188.8.131.52-10
after removing the relatime flag from /etc/fstab. (This is probably an overkill
way of rebuilding the initrd, it may be sufficient to run:
mkinitrd /boot/initrd-184.108.40.206-10.fc7.img 220.127.116.11-10.fc7
but I know the 1st command is what kernel rpm installs use).
Thanks. Only one change was needed. The command line needs to be
/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install
I suspect that this is going to bite quite a few people in upgrading to F8. If
relatime is the default (any word on noadir?) then it should be silently
ignored if it's in /etc/fstab or perhaps generate a warning when the kernel
upgrades and be silently ignored.
Sorry - make that nodiratime and noatime on NFS. Is the atime change made in
all instances or just relatime?
*** Bug 426423 has been marked as a duplicate of this bug. ***
Oh, this is filed for F7 so a bugzilla search for duplicates in F8
missed it. :-)
I did not realize that 'relatime' is now a default. Thanks.
OTOH I fully agree with a comment 1 to bug 426423 that this should
be fixed. No good reasons for failed boots because somebody did
valid /etc/fstab edits. Say you are running with / on a CF card
and you want to mount 'noatime' to cut down on writes. This is
a "real life" example and those few things which care about a correct
atime may be not needed. I do not know if 'noatime' will trip
mkrootdev from nash or not but something else will.
Is a stopgap measure of modifying kernel package scripts to
use '--rootopts=defaults' with mkinitrd somehow simpler?
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.
Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This issue still exists in rawhide.
As relatime is the default, this shouldn't need to be set in fstab. As such, we
also shouldn't need it in nash.
It's your call. But I say, "harrumph!" Since a valid (albeit superfluous) mount
option shouldn't break a system.
*** Bug 426573 has been marked as a duplicate of this bug. ***
I recently ran into this as well. IMO nash should be able to handle relatime just as it handles the other flags (it does noatime, nodiratime, etc already). I adapted the patch here for F10, and it Just Works. Here are some thoughts that I have about this, though:
1) nash.c should include linux/fs.h, instead of defining its own MS_* constants.
2) mkinitrd should know about the flags that nash understands, and reject any that won't work, or at least warn the user.
Created attachment 328155 [details]
adapt earlier patch for F10 mkinitrd
I don't know if there is a compelling reason to define the MS_* constants explicitly, but here's a patch for F10 mkinitrd that is an adaptation of the earlier patch with the change that it replaces #define MS_* with #include <linux/fs.h>.
Tested on x86_64.
Created attachment 328162 [details]
adapt earlier patch for F10 mkinitrd
As long as we're including linux/fs.h we can get rid of the other MS_* defines also.
*** Bug 430280 has been marked as a duplicate of this bug. ***
While it is true that it is meant to be default, a valid option in fstab should NOT break nash's ability to boot the system. This should be fixed in nash.
*** Bug 475495 has been marked as a duplicate of this bug. ***
XFS does not default to "relatime" so this breaks on people using XFS, such as myself, who want to use "relatime" in their fstab.
*** Bug 478330 has been marked as a duplicate of this bug. ***
Peter, have we convinced you yet? Is there anything else we can do to help push a fix through?
I'm terrible sorry this took us so long. This is fixed in mkinitrd-6.0.76, which will be in the next rawhide push.
Thank you! Do you plan to push this to F10 at least (after suitable testing)? I'd like to be able to test it against my asus (bug 478878).
(In reply to comment #24)
> Thank you! Do you plan to push this to F10 at least (after suitable testing)?
> I'd like to be able to test it against my asus (bug 478878).
Yes the plan is to include this in the next mkinitrd update for F-10 which will be soonish.
mkinitrd-6.0.71-4.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.