1 |
Wil Reichert <wil.reichert@×××××.com> posted |
2 |
7a329d910904282211wc8fa1a4ya40de3686c2480a1@××××××××××.com, excerpted |
3 |
below, on Tue, 28 Apr 2009 22:11:54 -0700: |
4 |
|
5 |
> Seems root mounts get special treatment as well. Compare my / & /opt - |
6 |
> both ext4, both created identically & mounted with just noatime: |
7 |
> |
8 |
> /dev/vg/root on / type ext4 (rw,noatime,barrier=1,data=ordered) |
9 |
> /dev/mapper/vg-opt on /opt type ext4 (rw,noatime) |
10 |
> |
11 |
> Or perhaps its just more verbose since like Duncan said data=ordered is |
12 |
> the default & barriers are currently disabled on lvm. |
13 |
|
14 |
The thing with root is that it must be originally mounted before fstab is |
15 |
accessible (with possible modifications for any userland config in the |
16 |
initramfs/initrd). Kernel and fstuning defaults apply, but little else. |
17 |
I do know it's possible to change the rw/ro bit on the kernel command |
18 |
line (so from grub or whatever) and that's reasonably commonly done, but |
19 |
not much else. It's also worth noting that some filesystems, xfs I know |
20 |
is one, aren't as flexible with the remount options as they are with the |
21 |
initial mount options. Thus, if these options aren't setup as desired on |
22 |
original mount, they don't get setup as desired period, because the |
23 |
remount can't change them. (I'm not sure how many filesystems, beyond |
24 |
xfs as mentioned, have such inflexible remounts.) |
25 |
|
26 |
At least some modules have additional options that can be passed either |
27 |
on-load or if built-in, on the kernel command line. However, I'm not |
28 |
entirely sure how flexible that is and whether the kernel command line |
29 |
can handle rootfs mountopts beyond rw/ro. Additionally, get the command |
30 |
line too long and it becomes difficult to manage. Of course it's much |
31 |
easier from 2.6.29 or was it .28, with the addition of a compiled-in |
32 |
command line, it was sure nice seeing a clean kernel-filename-only |
33 |
default kernel command line in grub again! Thus, using whatever fstun |
34 |
app ships with the maintenance utils for your choice of fs to set sane |
35 |
defaults is quite useful. In fact, it's worth noting the reduced line |
36 |
length benefits apply to the options field in fstab (and hal's fdi files |
37 |
too) as well as to the kernel command line, for filesystems other than |
38 |
root, loaded from userspace. |
39 |
|
40 |
Talking about which... I think I'll have to lookup reiserfstune again, |
41 |
and see if I can set some of my mount options as default. Since on |
42 |
reiserfs a standard mount and journal playback does almost as much as a |
43 |
normal fsck would (beyond that, there's --rebuild-tree, but that's a |
44 |
drastic measure not recommended for normal use), I toyed with mounting |
45 |
the rootfs as read/write at initial kernel mount time, instead of the |
46 |
normal read-only, then remount. But then I noticed it was doing atime |
47 |
updates because doing it that way skipped the remount, which added all my |
48 |
normal mount options (including noatime) while doing the remount. So I |
49 |
went back to doing it the traditional way, feed ro at the kernel command |
50 |
line and let it get remounted. (It doesn't take much longer that way, |
51 |
after all, as long as the fsck field is set to 0 in ordered to skip it, |
52 |
since the mount process itself does almost exactly the same thing on |
53 |
reiserfs.) If reiserfstune can handle stuff like noatime by default, |
54 |
that'll clear quite a bit out of my fstab as well as allowing me to go |
55 |
back to mounting root rw from the kernel command line. =:^) |
56 |
Unfortunately, if memory serves, it's not quite that flexible and doesn't |
57 |
allow one to set mount-option defaults, only filesystem internal details |
58 |
(side/location of the log, etc), with the fs label being perhaps the only |
59 |
externally visible exception. =:^( |
60 |
|
61 |
-- |
62 |
Duncan - List replies preferred. No HTML msgs. |
63 |
"Every nonfree program has a lord, a master -- |
64 |
and if you use the program, he is your master." Richard Stallman |