Bug 296361 (nash-relatime) - [PATCH] nash mount should support relatime
Summary: [PATCH] nash mount should support relatime
Keywords:
Status: CLOSED NEXTRELEASE
Alias: nash-relatime
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 426423 426573 430280 475495 478330 (view as bug list)
Depends On:
Blocks: F11Blocker, F11FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2007-09-19 14:06 UTC by Curtis Doty
Modified: 2009-05-06 16:34 UTC (History)
19 users (show)

Fixed In Version: 6.0.71-4.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-04 20:50:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch against fedora 7 CVS to add relatime support to nash (3.16 KB, patch)
2007-10-07 15:20 UTC, Stu Tomlinson
no flags Details | Diff
Patch against fedora devel CVS to add relatime support to nash (3.06 KB, patch)
2007-10-07 15:21 UTC, Stu Tomlinson
no flags Details | Diff
adapt earlier patch for F10 mkinitrd (1.49 KB, patch)
2009-01-04 22:06 UTC, Jayson King
no flags Details | Diff
adapt earlier patch for F10 mkinitrd (1.77 KB, patch)
2009-01-04 23:36 UTC, Jayson King
no flags Details | Diff

Description Curtis Doty 2007-09-19 14:06:08 UTC
Edit /etc/fstab and make your root fs use relatime. Then install a new kernel
and reboot...

The initrc appears to succceed with:

 mkrootdev -t ext3 -o relatime,ro /dev/vg1/root

But then chokes on the next line:

 mount /sysroot

Comment 1 Stu Tomlinson 2007-10-07 15:20:54 UTC
Created attachment 218711 [details]
Patch against fedora 7 CVS to add relatime support to nash

Comment 2 Stu Tomlinson 2007-10-07 15:21:34 UTC
Created attachment 218721 [details]
Patch against fedora devel CVS to add relatime support to nash

Comment 3 William H. Haller 2007-10-31 01:13:45 UTC
The just released 2.6.23.1-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 2.6.22.1-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 2.6.22.1-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 2.6.22.1-91 at all.

Comment 4 Stu Tomlinson 2007-10-31 01:40:36 UTC
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 2.6.23.1-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-2.6.23.1-10.fc7.img 2.6.23.1-10.fc7
but I know the 1st command is what kernel rpm installs use).

Comment 5 William H. Haller 2007-11-04 20:56:10 UTC
Thanks. Only one change was needed. The command line needs to be

/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 
2.6.23.1-10.fc7

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.

Comment 6 William H. Haller 2007-11-04 21:27:42 UTC
Sorry - make that nodiratime and noatime on NFS. Is the atime change made in 
all instances or just relatime?

Comment 7 Warren Togami 2007-12-21 05:54:49 UTC
*** Bug 426423 has been marked as a duplicate of this bug. ***

Comment 8 Michal Jaegermann 2007-12-21 16:52:51 UTC
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?

Comment 9 Bug Zapper 2008-05-14 14:25:21 UTC
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:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Stu Tomlinson 2008-05-14 14:33:14 UTC
This issue still exists in rawhide.

Comment 11 Peter Jones 2008-07-14 21:06:31 UTC
As relatime is the default, this shouldn't need to be set in fstab.  As such, we
also shouldn't need it in nash.

Comment 12 Curtis Doty 2008-07-14 21:13:30 UTC
It's your call. But I say, "harrumph!" Since a valid (albeit superfluous) mount
option shouldn't break a system.

Comment 13 Peter Jones 2008-07-14 21:24:51 UTC
*** Bug 426573 has been marked as a duplicate of this bug. ***

Comment 14 Jayson King 2009-01-04 21:50:34 UTC
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.

Comment 15 Jayson King 2009-01-04 22:06:40 UTC
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.

Comment 16 Jayson King 2009-01-04 23:36:55 UTC
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.

Comment 17 Warren Togami 2009-01-05 10:11:17 UTC
*** Bug 430280 has been marked as a duplicate of this bug. ***

Comment 18 Warren Togami 2009-01-05 10:13:10 UTC
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.

Comment 19 Hans de Goede 2009-01-06 10:11:56 UTC
*** Bug 475495 has been marked as a duplicate of this bug. ***

Comment 20 Michael Cronenworth 2009-01-10 03:01:15 UTC
XFS does not default to "relatime" so this breaks on people using XFS, such as myself, who want to use "relatime" in their fstab.

Comment 21 Michael Cronenworth 2009-01-10 03:01:30 UTC
*** Bug 478330 has been marked as a duplicate of this bug. ***

Comment 22 Curtis Doty 2009-01-10 04:16:22 UTC
Zing! Pop.

Peter, have we convinced you yet? Is there anything else we can do to help push a fix through?

Comment 23 Hans de Goede 2009-02-04 20:50:03 UTC
Hi all,

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.

Comment 24 Matthew Woehlke 2009-02-04 20:57:30 UTC
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).

Comment 25 Hans de Goede 2009-02-04 21:06:17 UTC
(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.

Comment 26 Fedora Update System 2009-03-09 23:10:37 UTC
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.

Comment 27 Jeremy Katz 2009-05-06 16:34:55 UTC
*** Bug 475495 has been marked as a duplicate of this bug. ***


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