First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 116016
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: plasmagunman <plasmagunman@users.sourceforge.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
rc-scripts-1.6.13.forcefsck_reiserfs.patch adds support for filesystem-dependant forcefsck-options patch plasmagunman 2005-12-19 02:30 0000 1.12 KB Details | Diff
jfs jfs.patch patch Roy Marples (RETIRED) 2007-05-02 15:22 0000 583 bytes Details | Diff
reiser reiserfs.patch patch Roy Marples (RETIRED) 2007-05-02 15:22 0000 657 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 116016 depends on: Show dependency tree
Show dependency graph
Bug 116016 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-12-19 02:27 0000
if you want to force a full fsck on boot /etc/init.s/checkroot and checkfs use
the option "-f". unfortunatelythis is ignored by reiserfs (since the full check
is reiserfsck's default behaviour). the option "-a", which also is always used
by bootscripts is interpreted by reiserfsck as: "these options cause reiserfsck
[...] to do some light-weight checks." long story short: in the moment there's
no way to perform a thorough fsck on reiserfs without booting from a cd. in my
opinion "shutdown -F" (forcefsck) should provide such a thorough fsck.

so i propose changing out bootscripts to provide a filesystem-dependent fsck.

in checkfs that would be replacing the line
    fsck -C -R -A -a -f
by the two lines
    fsck -C -R -A -a -f -t !reiserfs
    fsck -R -A -y -t reiserfs

in checkroot the line
    fsck -C -a -f /
will be replaced by
    fs_type=$(mount -f -n -v / | awk '{ print $5 }')
    if [ $fs_type == "reiserfs" ] ; then
        fsck -y /
    else
        fsck -C -a -f /
    fi

the only thing we lose is the parallel fsck of reiserfs and non-reiserfs
partitions in checkfs. in the future there can be added more
filesystem-dependant fsck-options if that's going to be necessary.

i'm quoting from baselayout-1.11.13-r1 and the applied patch is against that
version. the problem still exists with a newer version
(baselayout-1.12.0_pre11-r3) and if you like this approach i can adjust the
patch to that version.

------- Comment #1 From plasmagunman 2005-12-19 02:30:12 0000 -------
Created an attachment (id=75072) [edit]
adds support for filesystem-dependant forcefsck-options

------- Comment #2 From SpanKY 2005-12-19 06:05:22 0000 -------
cant say i'm really keen on adding this at all

filesystem-dependent calls suck

------- Comment #3 From plasmagunman 2005-12-19 08:13:14 0000 -------
well, i think we all prefer simpler scripts. in the end i see the problem of
not being able to do a proper reiserfs-check out of the box and changing the
bootscripts seemed the easiest solution for me. other approaches may be:
  1) replacing the symlink /sbin/fsck by a wrapper which tweaks the options,
e.g. removes "-a" from the option-list if "-f" is present
  2) waiting for/asking the reiserfsck-developers to support "-f"

actually i'm not really sure if all fsck.* really should support all the same
options, since checking depends a lot from the underlying filesystem and imho
each filesystem-developer should choose his own necessary options. from this
point of view the bootscript-approach seemed the most logic one.

------- Comment #4 From Roy Marples (RETIRED) 2007-01-10 12:47:19 0000 -------
(In reply to comment #2)
> cant say i'm really keen on adding this at all
> 
> filesystem-dependent calls suck
> 

I don't like this either.
Maybe patch reiserfsprogs ?

------- Comment #5 From SpanKY 2007-01-10 16:55:12 0000 -------
the sane thing here would probably be either:
 - have fsck remap options for reiserfs like it does with ext2
 - have change reiserfsck's behavior when given -a

------- Comment #6 From Roy Marples (RETIRED) 2007-04-26 16:23:49 0000 -------
The actual fix here is quite easy really :)

We should use the more friendly preen option -p instead of -a.
In my testing, all fsck helpers support (or work correctly with) -p, -f and -y
which are e2fsprogs, jfsutils, xfsprogs, reiserfsprogs. I've also made the
script a lot simpler by merging the BSD options in better.

You can see the new scripts here
http://sources.gentoo.org/viewcvs.py/baselayout/trunk/init.d/

------- Comment #7 From SpanKY 2007-04-30 18:56:40 0000 -------
-p isnt in fsck man page ;x

------- Comment #8 From Roy Marples (RETIRED) 2007-04-30 19:19:27 0000 -------
(In reply to comment #7)
> -p isnt in fsck man page ;x

Picking some nits here, but it's listed as under -a when it's remapped to -p
for e2fsck. However, the man page is wrong here as fsck itself does no such
thing. e2fsck maps -a to -p itself, and the other fsck helpers also support -p
which strangely enough so do the BSD userlands.

So I guess the man page is out dated or incorrect.

------- Comment #9 From Roy Marples (RETIRED) 2007-05-02 14:59:12 0000 -------
OK, it's a little more tricky.

reiserfs is the only helper that doesn't like -f
xfs doesn't work with fsck and it's helper just spits out a message about this
jfs -f doesn't work with -n (which is kinda daft)
e2fsck is the only helper which requires either -y or -n when using -f

So, the easiest solution is to patch jfsutils to allow -f -n and change
reiserfsprogs meaning of -n from --nolog to --no.

OR

We patch jfsutils -f "fix everything" to mean "-f -n" as above and patch e2fsck
(and busybox) to default to -n if no terminal (which it hasn't when in an init
script).

OR

We scrap the forcefsck on boot option in our init scripts.

Personally I'm in favour of the first option and will provide patches.

------- Comment #10 From Roy Marples (RETIRED) 2007-05-02 15:22:13 0000 -------
Created an attachment (id=117959) [edit]
jfs.patch

------- Comment #11 From Roy Marples (RETIRED) 2007-05-02 15:22:35 0000 -------
Created an attachment (id=117961) [edit]
reiserfs.patch

------- Comment #12 From Kalin KOZHUHAROV 2007-07-22 17:04:13 0000 -------
I saw the post on dev- and let me comment a bit.

To comment #10, comment #11:
Did you try to contact upstream with such patches?

They do seem trivial and logical to me, but patching something as basic as fsck
is wrong in the first time. Imagine the day everything is b0rked on a
"production" box and you are doing your best ('cause that box sysadmin is on
vacation) just to find out that fsck does not behave as the rest (pick a
distro) boxen....

Think again:

Problem: We (=Gentoo) are having problems unifying the boot scripts...

Solution A: fix/workaround/patch the boot-scripts
Solution B: fix "the root cause", patching the "wrong" fsck utils

Boot scripts are something Gentoo specific and although I'd hate them change
too often, I can live with it. My colleague, who is a (pick a distro) diehard
doesn't care probably. I don't care since once the box is up everything behaves
as expected.

Solution B is wrong since it fixes basic (i.e. all dsitros) commands to behave
differently, IMHO.

And if you (devs) decide to implement this, do put a big fat warning in the
manpage and --help like "***NB: Gentoo specific: bla-bla-bla ***"

Just my two yen.

------- Comment #13 From Roy Marples (RETIRED) 2007-07-23 09:16:23 0000 -------
(In reply to comment #12)
> To comment #10, comment #11:
> Did you try to contact upstream with such patches?

No, as we have not yet decided which course of action to take.

> They do seem trivial and logical to me, but patching something as basic as fsck
> is wrong in the first time. Imagine the day everything is b0rked on a
> "production" box and you are doing your best ('cause that box sysadmin is on
> vacation) just to find out that fsck does not behave as the rest (pick a
> distro) boxen....

We're not patching fsck - we're patching the fsck helpers. All fsck does is
pass cmdline options to the helpers ....

------- Comment #14 From Roy Marples (RETIRED) 2007-07-23 09:26:26 0000 -------
jfs patch submitted upstream
http://sourceforge.net/tracker/index.php?func=detail&aid=1758767&group_id=128802&atid=712756

------- Comment #15 From Dave Kleikamp 2007-07-23 17:25:01 0000 -------
Thanks for opening the jfs bug.  I'll fix the jfs piece upstream

------- Comment #16 From Roy Marples (RETIRED) 2007-08-02 09:39:20 0000 -------
OK, I've added these patches to portage as no-one seems they'll break anything.
jfs upstream has been notified (Hi Dave!)
and I've emailed the reiserfs mailing list with the attached patch, so we
should be golden now :)

------- Comment #17 From Dave Kleikamp 2007-08-24 21:11:15 0000 -------
This is now fixed in upstream - jfsutils-1.1.12

------- Comment #18 From Roy Marples (RETIRED) 2007-08-28 15:34:27 0000 -------
Works for me - thanks :)

------- Comment #19 From Miroslaw Mieszczak 2007-08-29 08:16:38 0000 -------
What about fsck.reiser4?


The option -p just prints profile, so it has to be changed too.

------- Comment #20 From Roy Marples (RETIRED) 2007-08-29 12:15:14 0000 -------
That must have been a recent change as when I tested it supported -p just fine.
Open a new bug for that please.

First Last Prev Next    No search results available      Search page      Enter new bug