Can not mount ext4 partition with 64KB cluster size

Creating a bug report/issue

I have searched the existing open and closed issues, not sure that this is particullary a bug, but can not mount of external drive’s ext4 partition with 64KB cluster size, possibly because of EXT4_FEATURE_RO_COMPAT_BIGALLOC not supported or loaded.

Required Information

  • DietPi version | v9.5.1 G_DIETPI_VERSION_CORE=9, G_DIETPI_VERSION_SUB=5, G_DIETPI_VERSION_RC=1, G_GITBRANCH='master', G_GITOWNER='MichaIng'
  • Distro version | bookworm
  • Kernel version | Linux JJRD-Fida 5.10.160-legacy-rk35xx #1 SMP Wed May 15 03:04:45 UTC 2024 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | Orange Pi 5 Plus (aarch64)
  • Power supply used | 5V 1A
  • SD card used | no, installed in eMMC module

Steps to reproduce

format external drive as sudo mkfs.ext4 -b 4096 -C 65536 ${PARTITION}

Expected behaviour

just mount

Actual behaviour

user@Fida:~$ sudo mount /dev/sda1 /media/test
mount: /media/test: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call.

Extra details

seems EXT4_FEATURE_RO_COMPAT_BIGALLOC not supported or loaded, as these commands do not produce any output.

user@Fida:~$ lsmod | grep ext4
user@Fida:~$ sudo lsmod | grep ext4
user@Fida:~$ cat /boot/config-$(uname -r) | grep CONFIG_EXT4_FS_BIGALLOC

probably the feature is not enabled within kernel. But I’m not sure which kernel we use on this device. Could be vendor, Armbian or Mainline? @MichaIng knows for sure.

It is an Armbian kernel build. Here is the config: build/config/kernel/linux-rk35xx-legacy.config at b2aea3ba424e078989c3b31179ebe01e0dc76cde · armbian/build · GitHub

CONFIG_EXT4_FS_BIGALLOC does not exist, at all. All existing ext4 kernel configs are defined in above link, which match the ones from official Debian kernel builds:

root@dietpi:~# grep EXT4 /boot/config-6.7.12-amd64
CONFIG_EXT4_FS=m
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set

And I could not find anything similar in online databases: https://www.kernelconfig.io/search?q=CONFIG_EXT4

Hence I am not sure whether this is a (configurable) kernel feature at all, or just a userland e2fsprogs feature, which seems to be indicated by some Linux wiki: Bigalloc - Ext4

… jep, this is the case: mkfs.ext4(8) — e2fsprogs — Debian bookworm — Debian Manpages

Try to enable the bigalloc feature for the filesystem like this:

sudo tune2fs -O bigalloc /dev/sda1

Or create the filesystem like this:

sudo mkfs.ext4 -b 4096 -C 65536 -O bigalloc ${PARTITION}

It also requires the extent feature: ext4(5) — e2fsprogs — Debian bookworm — Debian Manpages
Currently not sure whether dependency features are added automatically, else add both with -O extent,bigalloc.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.