Hey guys,
I've just upgraded to an ODroid-C2 (replacing my ageing 2012 RPi model B) and was surprised to see that the XFS I have on an external drive won't mount, complaining of incompatible features:
$this->bbcode_second_pass_code('', '# mount /dev/mapper/twotera-lvbackup /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mapper/twotera-lvbackup, missing codepage or helper program, or other error.
# dmesg | tail
[ 352.883842] squeak kernel: XFS (dm-0): Superblock has unknown incompatible features (0x2) enabled.
[ 352.892046] squeak kernel: XFS (dm-0): SB validate failed with error 22.
')
I note that ALARM runs a 3.16 kernel on the ODroid-C2, and it seems this kernel is too old to mount modern XFS. Alarmingly, it cannot mount an XFS image created by itself, using mkfs.xfs defaults.
To reproduce:
$this->bbcode_second_pass_code('', '# dd bs=512 count=100000 if=/dev/zero of=test
100000+0 records in
100000+0 records out
51200000 bytes (51 MB, 49 MiB) copied, 1.21251 s, 42.2 MB/s
# mkfs.xfs test
meta-data=test isize=512 agcount=2, agsize=6250 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=0
data = bsize=4096 blocks=12500, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=855, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
# mount test /mnt
Password:
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
# dmesg | tail
[176109.198319] XFS (loop0): Superblock has unknown incompatible features (0x2) enabled.
Filesystem can not be safely mounted by this kernel.
[176109.198332] XFS (loop0): SB validate failed with error 22.
')
It seems that "(0x2)" translates to metadata CRCs, as creating an XFS iamge with `-m crc=0` passed to mkfs.xfs results in a filesystem that can be mounted:
$this->bbcode_second_pass_code('', '
# mkfs.xfs -m crc=0 -f test
meta-data=test isize=256 agcount=2, agsize=6250 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0, sparse=0, rmapbt=0
= reflink=0
data = bsize=4096 blocks=12500, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=853, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
# mount test /mnt
# findmnt -n /mnt
/mnt /dev/loop0 xfs rw,relatime,attr2,inode64,noquota')
I'm confused though, as (according to the Arch Wiki) metadata CRCs were considered stable as of kernel 3.15, so I'd expect a 3.16 kernel to be able to handle them.
Unfortunately metadata CRCs cannot be disabled (even if they could, this filesystem has all my backups on it, so I'd rather not mess around with filesystem features if I can avoid it) so it seems there's no easy fix for this.
One possible solution may be to boot the mainline kernel, but so far my attempts at that have resulted in an unbootable odroid (or else a booted odroid with no video or networking, and no journal for that session...).
Has anyone got a CRC-enabled XFS working on an ODroid-C2?