Skip to contentSkip to conversation

mkfs.xfs ... lazy-count=1 ... not mountable by older kernels?

DISCUSSION David Sparks 4 participants 4 messages Dec 11, 2007 – Dec 12, 2007

lore
Share & tools
lore
#0 lore raw

Hi all,

Is it expected that filesystems made with lazy-count=1 are not mountable by older kernels?

I'm installing a system based with install media based on 2.6.19 and mkfs.xfs 2.8.11 (its Gentoo 2007.0). That mkfs.xfs is old so i copied over a 2.9.4 binary and used that to mkfs the filesystem but its unmountable. Removing the lazy-count=1 option makes it mountable.

Is this an expected incompatibility or is mix-n-matching xfsprogs a bad idea?

Thanks!

#1 lore raw
Quoted 4 lines · David Sparks

Hi all,

Is it expected that filesystems made with lazy-count=1 are not mountable by older kernels?

That is expected. lazy-count is a mkfs option because it changes the on-disk format slightly, and older kernels do not understand that format. Hence mkfs sets a superblock feature bit to prevent the filesystem from being mounted on kernels that don't understand the slightly different disk format.

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group
#2 lore raw
Quoted 6 lines · David Chinner
Quoted 4 lines · David Sparks

Hi all,

Is it expected that filesystems made with lazy-count=1 are not mountable by older kernels?

Quoted 8 lines

That is expected. lazy-count is a mkfs option because it changes the on-disk format slightly, and older kernels do not understand that format. Hence mkfs sets a superblock feature bit to prevent the filesystem from being mounted on kernels that don't understand the slightly different disk format.

Cheers,

Dave.

And there will be a message in the logs but it probably isn't overly obvious what it is talking about.

Looking at code, I presume it will come from:

        if (!XFS_SB_GOOD_VERSION(sbp)) {
                xfs_fs_mount_cmn_err(flags, "bad version");
                return XFS_ERROR(EWRONGFS);
        }

so there will be a msg about a "bad version".

--Tim

#3 lore raw
Quoted 19 lines · Timothy Shimmin
Quoted 6 lines · David Chinner
Quoted 4 lines · David Sparks

Hi all,

Is it expected that filesystems made with lazy-count=1 are not mountable by older kernels?

Quoted 8 lines

That is expected. lazy-count is a mkfs option because it changes the on-disk format slightly, and older kernels do not understand that format. Hence mkfs sets a superblock feature bit to prevent the filesystem from being mounted on kernels that don't understand the slightly different disk format.

Cheers,

Dave.

And there will be a message in the logs but it probably isn't overly obvious what it is talking about.

Quoted 10 lines

Looking at code, I presume it will come from:

       if (!XFS_SB_GOOD_VERSION(sbp)) {
               xfs_fs_mount_cmn_err(flags, "bad version");
               return XFS_ERROR(EWRONGFS);
       }

so there will be a msg about a "bad version".

--Tim

Has anyone done any benchmarks with Dave Chinner's recommendations for mkfs.xfs/optmizations?

Justin.