Linux-f2fs-devel Archive on lore.kernel.org
 help / color / 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, back to index

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

Linux-f2fs-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-f2fs-devel/0 linux-f2fs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-f2fs-devel linux-f2fs-devel/ https://lore.kernel.org/linux-f2fs-devel \
		linux-f2fs-devel@lists.sourceforge.net
	public-inbox-index linux-f2fs-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/net.sourceforge.lists.linux-f2fs-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git