Bug 1216110

Summary: fsck fails with FEATURE_C12 as does e2fsck
Product: [openSUSE] openSUSE Distribution Reporter: Larry Rainey <llrainey15>
Component: OtherAssignee: Jan Kara <jack>
Status: RESOLVED FEATURE QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: aschnell, jack, nwr10cst-oslnx
Version: Leap 15.5   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Leap 15.5   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Larry Rainey 2023-10-10 19:39:46 UTC
fsck / e2fsck is downlevel to gparted created ext4 file systems. There is a new feature C12 for "orphan files", whatever that is, that gparted added to newly created the ext4 file system.

I added a mount to /etc/fstab and it failed to fsck I had to change the 2 to 0 to get past the failure.

The file on /dev/nvme1n1p1 was created by gparted, it was mounted and files copied to it and entry added to /etc/fstab.

Here is the cause:

LLR5:~ # e2fsck -f /dev/nvme1n1p1
e2fsck 1.46.4 (18-Aug-2021)
/dev/nvme1n1p1 has unsupported feature(s): FEATURE_C12
e2fsck: Get a newer version of e2fsck!

VMWIN: ********** WARNING: Filesystem still has errors **********

LLR5:~ # fsck -p /dev/nvme1n1p1
fsck from util-linux 2.37.4
/dev/nvme1n1p1 has unsupported feature(s): FEATURE_C12
e2fsck: Get a newer version of e2fsck!

VMWIN: ********** WARNING: Filesystem still has errors **********

LLR5:~ # uname -a
Linux LLR5 5.14.21-150500.55.28-default #1 SMP PREEMPT_DYNAMIC Fri Sep 22 10:04:29 UTC 2023 (c11336f) x86_64 x86_64 x86_64 GNU/Linux
LLR5:~ #
Comment 1 Neil Rickert 2023-10-12 00:36:41 UTC
Yes, I have run into this.

I have Leap 15.5 as my main desktop, with Tumbleweed installed in a different partition (actually a different LVM volume).  And I cannot access the Tumbleweed root file system from Leap.  And Tumbleweed does not show up in the normal grub boot menu for 15.5.
Comment 2 Jan Kara 2023-10-23 11:36:33 UTC
Yes, orphan file feature is supported only since e2fsprogs 1.46.5 but openSUSE Leap 15.5 has only version 1.46.4 as you noticed. And since e2fsprogs 1.47.0 mkfs enables the orphan file feature by default so if you create a filesystem on Tumbleweed, e2fsck from 15.4 will not understand it and complain (kernel will be fine for cleanly unmounted filesystem though because on such filesystem it is just a compatible feature).

So if you need to access a filesystem from older distro, you either need to disable the orphan feature on the filesystem on Tumbleweed (tune2fs -O ^orphan_file <device>) or you need to install newer e2fsprogs into the old distro (e.g. by adding "filesystems" devel repository and installing the package from appropriate download repository there).
Comment 3 Larry Rainey 2023-10-23 12:16:01 UTC
File system is ext4 created by gparted on 15.4 machine - not on Tumbleweed.

LLR5:~ # uname -a
Linux LLR5 5.14.21-150500.55.31-default #1 SMP PREEMPT_DYNAMIC Wed Oct 4 16:52:05 UTC 2023 (5dc23e0) x86_64 x86_64 x86_64 GNU/Linux
LLR5:~ # tune2fs -O ^orphan_file /dev/nvme1n1p1
tune2fs 1.46.4 (18-Aug-2021)
Invalid filesystem option set: ^orphan_file
LLR5:~ # 


is there a tune2fs for 15.5 that has that feature?
Comment 4 Jan Kara 2023-10-23 12:47:26 UTC
(In reply to Larry Rainey from comment #3)
> File system is ext4 created by gparted on 15.4 machine - not on Tumbleweed.

Ugh, then I'm really puzzled how gparted could have added that feature. I have just tested it and gparted on 15.4 didn't enable orphan_file feature for me when formatting a filesystem.
 
> LLR5:~ # uname -a
> Linux LLR5 5.14.21-150500.55.31-default #1 SMP PREEMPT_DYNAMIC Wed Oct 4
> 16:52:05 UTC 2023 (5dc23e0) x86_64 x86_64 x86_64 GNU/Linux
> LLR5:~ # tune2fs -O ^orphan_file /dev/nvme1n1p1
> tune2fs 1.46.4 (18-Aug-2021)
> Invalid filesystem option set: ^orphan_file
> LLR5:~ # 
> 
> is there a tune2fs for 15.5 that has that feature?

You can install e2fsprogs from this repository
https://download.opensuse.org/repositories/filesystems/15.5/

Those will understand the orphan_file feature.
Comment 5 Larry Rainey 2023-10-23 13:03:58 UTC
I just did - confirmed that that new e2fsprog worked and can fsck that filesystem.
Comment 7 Jan Kara 2023-10-26 16:12:31 UTC
Neil, were you able to resolve your issues by installing newer tools into your 15.5 installation or by removing the feature from the filesystem in your Tumbleweed install?
Comment 8 Larry Rainey 2023-10-26 16:51:24 UTC
I installed from the suggested repo and all works now.
Comment 9 Neil Rickert 2023-10-27 00:11:52 UTC
(In reply to Jan Kara from comment #7)
> Neil, were you able to resolve your issues by installing newer tools into
> your 15.5 installation or by removing the feature from the filesystem in
> your Tumbleweed install?

I removed the feature, and I can now "fsck" the filesystem from Leap.

However, there must be some other "ext4" changes that "grub2" does not like.  Grub2 from Leap cannot boot Tumbleweed.  (I can still use grub2 from Tumbleweed to boot Leap).
Comment 10 Jan Kara 2023-10-27 10:17:16 UTC
Yeah, grub2 is another source of trouble when enabling filesystem features... Comparing grub we have in 15.5 vs set of ext4 features enabled in Tumbleweed I think it is metadata_csum_seed feature that is causing troubles to you. So if you want to boot using grub2 in 15.5 you need to disable that feature on your filesystem as well.

Anyway, closing the bug as everything works as intended here.
Comment 11 Jan Kara 2023-10-27 10:17:37 UTC
Clearing forgotten needinfo.