Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XFS Ephemeral Storage fails to mount with: Superblock has unknown incompatible features (0x20) enabled. #4281

Open
snowzach opened this issue Nov 4, 2024 · 4 comments · May be fixed by bottlerocket-os/bottlerocket-core-kit#295
Assignees
Labels
area/core Issues core to the OS (variant independent) type/bug Something isn't working

Comments

@snowzach
Copy link

snowzach commented Nov 4, 2024

Image I'm using: bottlerocket-aws-k8s-1.25-x86_64-v1.26.1-943d9a41
This is on a i3en.2xlarge node with local NVMe flash I'm hoping to use as Ephemeral storage.
If I set the type to ext4 it works.

What I expected to happen: The local flash storage would be formatted and mounted as XFS storage

What actually happened: The storage isn't mounted.

I'm guessing because the xfs tools are newer than the kernel?

Error in dmesg:

[  302.626669] XFS (md127): Superblock has unknown incompatible features (0x20) enabled.
[  302.626673] XFS (md127): Filesystem cannot be safely mounted by this kernel.
[  302.626675] XFS (md127): SB validate failed with error -22.

How to reproduce the problem:

Put this in the config:

[settings.bootstrap-commands.k8s-ephemeral-storage]
    commands = [
      ["apiclient", "ephemeral-storage", "init", "-t", "xfs"],
      ["apiclient", "ephemeral-storage" ,"bind", "--dirs", "/var/lib/kubelet"]
    ] 
    essential = true
    mode = "always"
@snowzach snowzach added status/needs-triage Pending triage or re-evaluation type/bug Something isn't working labels Nov 4, 2024
@yeazelm
Copy link
Contributor

yeazelm commented Nov 4, 2024

Hello @snowzach, thanks for cutting this issue!

I believe this is due to the level of XFS support in the 5.15 kernel used in the k8s 1.25 variant. We validated XFS with the 6.1 kernel (all k8s variants 1.28+ and ECS 2 variants) for ephemeral storage, but not on the older variants. We use XFS as the default data partition on these same variants so we know it works well with the 6.1 kernel. We'll need to dig into what the issue might be with the 5.15 kernel and see if we can fix it.

As you found, for ephemeral storage commands, ext4 should work fine on k8s 1.25 and XFS should work well on k8s 1.28+, are you able to switch to a newer k8s variant for XFS support while we sort out what is going on with XFS on k8s 1.25?

@yeazelm yeazelm added area/core Issues core to the OS (variant independent) and removed status/needs-triage Pending triage or re-evaluation labels Nov 4, 2024
@yeazelm
Copy link
Contributor

yeazelm commented Nov 4, 2024

I was able to get a mountable xfs volume for the 5.15 kernel by using this command:

mkfs.xfs -f -m bigtime=1,inobtcount=1 -i nrext64=0 /dev/md127

The only thing strictly required here is the -i nrext64=0. We would need to add logic to the format command to properly format the filesystem when on 5.15 kernels to make this work. This would enable XFS usage on 5.15 kernels with ephemeral storage.

@snowzach
Copy link
Author

snowzach commented Nov 4, 2024

Thanks for looking into it! Unfortunately, I'm not going to be able to upgrade K8S for a bit.

@cbgbt
Copy link
Contributor

cbgbt commented Nov 4, 2024

No worries. I'm working on applying changes to the module @yeazelm mentioned which should do the right thing on older kernels by avoiding nrext64, which is a new XFS feature added in 6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent) type/bug Something isn't working
Projects
None yet
4 participants