determining superblock version?
Hi all,
as you know kernel prior to 3.16 won't support properly v5 superblocks. xfsprogs v 3.2.4 and higher defaults to v5 superblocks. This bit quite a lot of people a year ago or so, when some distributions shipped 3.2.4 xfsprogs with older kernels.
Anyway, I was surprised to find no easy way to find out the superblock version of an xfs FS. The best I've come across is
xfs_db /dev/this
sb
p
<snip>
versionnum = 0xb4a5
</snip>
So I suppose that the 5 in the end means that the superblock is v5? Can anyone confirm please? The man page still pretends that the last number should be 1 to 4, which is confusing.
Oh by the way I think the trick to create a v4 filesystem with mkfs.xfs higher than 3.2.4 ( mkfs.xfs -m crc=0,finobt=0 /dev/this ) should be in the FAQ, with a line like this:
Mounting the filesystem fails, and output from dmesg says "Version 5 superblock detected." What should I do?
v5 superblocks require a kernel v3.16 of higher. If you need your xfs filesystem to be usable with older kernel, use the following options to mkfs.xfs :
mkfs.xfs -m crc=0,finobt=0 /dev/this
Signature · 11 lines
------------------------------------------------------------------------
Emmanuel Florac | Direction technique
| Intellique
| <[email protected]>
| +33 1 78 94 84 02
------------------------------------------------------------------------
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfsQuoted 10 lines · Emmanuel Florac
Hi all,
as you know kernel prior to 3.16 won't support properly v5 superblocks. xfsprogs v 3.2.4 and higher defaults to v5 superblocks. This bit quite a lot of people a year ago or so, when some distributions shipped 3.2.4 xfsprogs with older kernels.
Anyway, I was surprised to find no easy way to find out the superblock version of an xfs FS. The best I've come across is
Quoted 7 lines
xfs_db/dev/this
sb
p<snip>
versionnum =0xb4a5
</snip>
There is certainly some confusion about naming.
Version 5, compat/incompat features, feature bits, feature names, etc.
Quoted 3 lines
So I suppose that the 5 in the end means that the superblock is v5? Can anyone confirm please? The man page still pretends that the last number should be 1 to 4, which is confusing.
Yes, the last bits contain the version number (masked by 0xf, see below)
#define XFS_SB_VERSION_1 1 /* 5.3, 6.0.1, 6.1 */ #define XFS_SB_VERSION_2 2 /* 6.2 - attributes */ #define XFS_SB_VERSION_3 3 /* 6.2 - new inode version */ #define XFS_SB_VERSION_4 4 /* 6.2+ - bitmask version */ #define XFS_SB_VERSION_5 5 /* CRC enabled filesystem */
#define XFS_SB_VERSION_NUMBITS 0x000f
feel free to send a man page patch :)
Quoted 4 lines
Oh by the way I think the trick to create a v4 filesystem with mkfs.xfs higher than 3.2.4 ( mkfs.xfs -m crc=0,finobt=0
/dev/this) should be in the FAQ, with a line like this:
Quoted 8 lines
Mounting the filesystem fails, and output from dmesg says "Version 5 superblock detected." What should I do?
v5 superblocks require a kernel v3.16 of higher. If you need your xfs filesystem to be usable with older kernel, use the following options to mkfs.xfs :
mkfs.xfs -m crc=0,finobt=0
/dev/this
finobt=0 should not be needed, it should be off if crc=0 AFAIK.
However, -n ftype=1 may still be enabled, and older kernels may have an issue with that as well.
Feel free to add this to the wiki (can new accounts still be created?)
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Le Tue, 7 Jun 2016 12:12:21 -0500
Eric Sandeen <[email protected]> écrivait:
Quoted 3 lines
Quoted 1 line
mkfs.xfs -m crc=0,finobt=0
/dev/thisfinobt=0 should not be needed, it should be off if crc=0 AFAIK.
Yes, that is in the manpage :)
Quoted 3 lines
However, -n ftype=1 may still be enabled, and older kernels may have an issue with that as well.
I'll give it a try.
Quoted 1 line
Feel free to add this to the wiki (can new accounts still be created?)
I don't know, who's in charge? I'm pretty sure I haven't got one.
Signature · 11 lines
------------------------------------------------------------------------
Emmanuel Florac | Direction technique
| Intellique
| <[email protected]>
| +33 1 78 94 84 02
------------------------------------------------------------------------
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfsLe Tue, 7 Jun 2016 12:12:21 -0500
Eric Sandeen <[email protected]> écrivait:
Quoted 3 lines
However, -n ftype=1 may still be enabled, and older kernels may have an issue with that as well.
Indeed, I've made some tests:
mkfs.xfs -f -m crc=0, -n ftype=1 testxfs
3.14 kernel: success
3.13 (ubuntu 14.04): success
3.12 : success
3.10 and lower: failure
mkfs.xfs -f -m crc=0 -n ftype=0 testxfs
3.2 (ubuntu 12.04, Debian oldstable): success
2.6.32 : failure
Signature · 11 lines
------------------------------------------------------------------------
Emmanuel Florac | Direction technique
| Intellique
| <[email protected]>
| +33 1 78 94 84 02
------------------------------------------------------------------------
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs