linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] fsck.f2fs tool causes endless reboots if used with systemd
@ 2020-07-23  8:18 Norbert Lange
  2020-07-24  3:31 ` Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Norbert Lange @ 2020-07-23  8:18 UTC (permalink / raw)
  To: linux-f2fs-devel

Hello,

I have the problem that a f2fs filesystem together with systemd (and
an installed fsck.f2fs) will endlessly reboot.

The fsck.f2fs tool behaves differently to the ext variants, does not
seem to support the -a switch and fails on a mounted device (by
default). ie. it would not help calling fsck from the initramfs
either.
fsck tools seem wildly different, but systemd assumes some basic uniformity

systemd version the issue has been seen with

systemd 245 (245)
-PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK -SYSVINIT -UTMP
-LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ +LZ4 -SECCOMP +BLKID -ELFUTILS
+KMOD -IDN2 -IDN -PCRE2 default-hierarchy=unified

fsck.f2fs 1.13.0 (2019-09-24)

The root filesystem is f2fs, mounted read-only from the initrd.
Systemd will endlessly reboot the system as the fsck attempt fails.

The systemd-fsck tool will end up calling fsck.f2fs with the parameter below,
and will fail as this device is mounted (tries to open it in exclusive mode).

$ fsck.f2fs -a /dev/mmcblk0p5; echo $?
Info: Fix the reported corruption.
Info: Mounted device!
Info: Check FS only on RO mounted device
Error: Failed to open the device!
255

A workaround would be to force or skip the check

fsck.f2fs -a -f /dev/mmcblk0p5; echo $?
Info: Fix the reported corruption.
.....
Done: 0.232165 secs
0

Norbert

[1] - https://github.com/systemd/systemd/issues/15106


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [f2fs-dev] fsck.f2fs tool causes endless reboots if used with systemd
  2020-07-23  8:18 [f2fs-dev] fsck.f2fs tool causes endless reboots if used with systemd Norbert Lange
@ 2020-07-24  3:31 ` Jaegeuk Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2020-07-24  3:31 UTC (permalink / raw)
  To: Norbert Lange; +Cc: linux-f2fs-devel

On 07/23, Norbert Lange wrote:
> Hello,
> 
> I have the problem that a f2fs filesystem together with systemd (and
> an installed fsck.f2fs) will endlessly reboot.
> 
> The fsck.f2fs tool behaves differently to the ext variants, does not
> seem to support the -a switch and fails on a mounted device (by
> default). ie. it would not help calling fsck from the initramfs
> either.
> fsck tools seem wildly different, but systemd assumes some basic uniformity
> 
> systemd version the issue has been seen with
> 
> systemd 245 (245)
> -PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK -SYSVINIT -UTMP
> -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ +LZ4 -SECCOMP +BLKID -ELFUTILS
> +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=unified
> 
> fsck.f2fs 1.13.0 (2019-09-24)
> 
> The root filesystem is f2fs, mounted read-only from the initrd.
> Systemd will endlessly reboot the system as the fsck attempt fails.
> 
> The systemd-fsck tool will end up calling fsck.f2fs with the parameter below,
> and will fail as this device is mounted (tries to open it in exclusive mode).
> 
> $ fsck.f2fs -a /dev/mmcblk0p5; echo $?
> Info: Fix the reported corruption.
> Info: Mounted device!
> Info: Check FS only on RO mounted device
> Error: Failed to open the device!
> 255
> 
> A workaround would be to force or skip the check
> 
> fsck.f2fs -a -f /dev/mmcblk0p5; echo $?
> Info: Fix the reported corruption.
> .....
> Done: 0.232165 secs
> 0

I think we ended up the discussion here.

https://lore.kernel.org/linux-f2fs-devel/CADoWrG-0GWtwqaW7rsPWLDYcoAsvXhwRa9zVib9bN94g1LLw6Q@mail.gmail.com/

> 
> Norbert
> 
> [1] - https://github.com/systemd/systemd/issues/15106
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-24  3:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  8:18 [f2fs-dev] fsck.f2fs tool causes endless reboots if used with systemd Norbert Lange
2020-07-24  3:31 ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).