Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 681618 - sys-fs/f2fs-tools-1.12.0-r1 fails to fsck rootfs on boot
Summary: sys-fs/f2fs-tools-1.12.0-r1 fails to fsck rootfs on boot
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-24 09:33 UTC by Charo del Genio
Modified: 2019-08-21 08:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charo del Genio 2019-03-24 09:33:18 UTC
In what looks exactly like a continuation of old bug 671786, revision 1 of f2fs-tools-1.12.0 is unable to check a rootfs when fsck is called on boot:


 * Checking local filesystems ...
Info: Use default preen mode
Info: Mounted device!
Info: Check FS only due to RO
        Error: Failed to open the device!
 * Filesystems couldn't be fixed
 * rc: Aborting!


Downgrading to the previous version (f2fs-tools-1.11.0-r1) or disabling fsck for rootfs fixes the problem.
Comment 1 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-03-24 13:00:40 UTC
Do you have -f in your fsck args on boot?
Comment 2 Charo del Genio 2019-03-24 15:29:39 UTC
I haven't changed anything in /etc/conf.d/fsck. So, if -f is a default boot option, then I do have it, otherwise I don't.

Also, two questions: first, am I supposed to add -f? And second, how comes it appears to work with versin 1.11.0-r1?
Comment 3 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-03-24 15:36:54 UTC
(In reply to Charo del Genio from comment #2)
> I haven't changed anything in /etc/conf.d/fsck. So, if -f is a default boot
> option, then I do have it, otherwise I don't.
> 
> Also, two questions: first, am I supposed to add -f? And second, how comes
> it appears to work with versin 1.11.0-r1?

answer to both at once:

upstream now wants -f being stated as an arg to fsck which is clearly stated in the patch [0]. If this is your case this is probably would be a good idea to state this as an elog message

[0] - https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch
Comment 4 Charo del Genio 2019-03-24 15:54:41 UTC
(In reply to Mikle Kolyada from comment #3)
> (In reply to Charo del Genio from comment #2)
> > I haven't changed anything in /etc/conf.d/fsck. So, if -f is a default boot
> > option, then I do have it, otherwise I don't.
> > 
> > Also, two questions: first, am I supposed to add -f? And second, how comes
> > it appears to work with versin 1.11.0-r1?
> 
> answer to both at once:
> 
> upstream now wants -f being stated as an arg to fsck which is clearly stated
> in the patch [0]. If this is your case this is probably would be a good idea
> to state this as an elog message
> 
> [0] -
> https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/f2fs-tools/files/f2fs-
> tools-1.12.0-fsck.patch

OK, I added -f and it works. Also, I second the request to add an elog message informing the users of this requirement.

However, before closing this bug and opening a new one for the request of the elog message, I'd like to point out that this solution is quite sub-optimal, since it will force fsck to always run on ALL the filesystems, and not just the f2fs ones. So, shouldn't an actual solution be one that allows fsck.f2fs and only fsck.f2fs to use -f as needed?
Comment 5 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-03-24 18:46:59 UTC
(In reply to Charo del Genio from comment #4)
> (In reply to Mikle Kolyada from comment #3)
> > (In reply to Charo del Genio from comment #2)
> > > I haven't changed anything in /etc/conf.d/fsck. So, if -f is a default boot
> > > option, then I do have it, otherwise I don't.
> > > 
> > > Also, two questions: first, am I supposed to add -f? And second, how comes
> > > it appears to work with versin 1.11.0-r1?
> > 
> > answer to both at once:
> > 
> > upstream now wants -f being stated as an arg to fsck which is clearly stated
> > in the patch [0]. If this is your case this is probably would be a good idea
> > to state this as an elog message
> > 
> > [0] -
> > https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/f2fs-tools/files/f2fs-
> > tools-1.12.0-fsck.patch
> 
> OK, I added -f and it works. Also, I second the request to add an elog
> message informing the users of this requirement.
> 
> However, before closing this bug and opening a new one for the request of
> the elog message [break]

Not needed, I can actually point this one in a commit message



> [snip]
> So, shouldn't an actual solution be one that
> allows fsck.f2fs and only fsck.f2fs to use -f as needed?

This is out of gentoo maintenance scope and should not be distro-specific at all. Scripts we run at a startup are common for all the file systems. If I were you I'd go to upstream demanding more-less acceptable solution.
Comment 6 Charo del Genio 2019-03-24 19:19:55 UTC
(In reply to Mikle Kolyada from comment #5)
> > So, shouldn't an actual solution be one that
> > allows fsck.f2fs and only fsck.f2fs to use -f as needed?
> 
> This is out of gentoo maintenance scope and should not be distro-specific at
> all. Scripts we run at a startup are common for all the file systems. If I
> were you I'd go to upstream demanding more-less acceptable solution.

Sounds reasonable. I don't know what status to give to this bus (fixed via elog message, invalid as it's not a programming bug of f2fs-tools, upstream because they need to fix their stuff...), so I'll let you decide that.

I will also contact the upstream devs and see if I can get anything reasonable from them.
Comment 7 Charo del Genio 2019-03-29 09:17:54 UTC
Quick status update: upstream replied that they are reluctant to allow fsck.f2fs to check an already-mounted rootfs without explicitly using the -f flag, due to increased potential for users to do damage to their machines.

I'm trying to reason with them about it.
Comment 8 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-07-25 07:16:55 UTC
(In reply to Charo del Genio from comment #7)
> Quick status update: upstream replied that they are reluctant to allow
> fsck.f2fs to check an already-mounted rootfs without explicitly using the -f
> flag, due to increased potential for users to do damage to their machines.
> 
> I'm trying to reason with them about it.

Any news about it?
Comment 9 Charo del Genio 2019-07-26 06:26:50 UTC
(In reply to Mikle Kolyada from comment #8)
> (In reply to Charo del Genio from comment #7)
> > Quick status update: upstream replied that they are reluctant to allow
> > fsck.f2fs to check an already-mounted rootfs without explicitly using the -f
> > flag, due to increased potential for users to do damage to their machines.
> > 
> > I'm trying to reason with them about it.
> 
> Any news about it?

I've talked several times to the main developer. Eventually, he seemed to have understood the problem. After a while he sent me a patch, which I tested and which did not work. I wrote to him again, but I have no heard anything back (yet). I'm currently busy with other projects for a couple of weeks, but I plan on getting back to him as soon as I can.
Comment 10 Charo del Genio 2019-08-21 08:12:32 UTC
Possibly the final update from me:
the main developer seems unable to understand the problem, or unwilling to fix it. In addition, it appears that fsck.f2fs can only detect file system errors but not fix them.
At this point, I simply switched to ext4, which means I won't be able to provide help any more.

Anyway, I suggest providing elog messages to Gentoo users concerning these issues with f2fs, as well as adding some notes in the Gentoo installation manual about them.