On Thu, Jun 23, 2016 at 04:58:30PM -0700, J Mo wrote:
> Package: e2fsprogs
> Version: 1.43.1-1
> Severity: normal
> 
> I have an ext4 filesystem where I wanted to remove the metadata_csum feature, 
> but tune2fs doesn't seem to support this, even though the man page seems to 
> indicate that it should.
> 
> The command I am using is: sudo tune2fs -O ^metadata_csum /dev/sde1
> 
> But every time I run it, I am told I need to check the filesystem, even 
> though it's clean and I literally just checked it.
> 
> 
> user@host-->sudo fsck.ext4 -y /dev/sde1 
> e2fsck 1.43.1 (08-Jun-2016)
> /dev/sde1: clean, 5312/1949696 files, 3994069/7791488 blocks

I'll adjust the help message to make it clear what needs to be done,
but when the file system is "clean", e2fsck doesn't actually do a check.
You'll note that it was very fast.  That's why it didn't work.

Try running "sudo fsck.ext4 -fy /dev/sde1", and you will notice that
it takes a longer; because it's actually doing a real check.

> Since I now have to replace the whole filesystem anyway, I figured
> I'd test removing some other feature like huge_file, and that worked
> as-expected.

There are certain tune2fs operations that are riskiers than others.
Removing the metadata checksum requires rewriting pretty much all of
the metadata blcoks, so tune2fs wants to make sure the file system is
completely consistent before starting the operation.

For similar reasons, resize2fs requires that you do a full file system
check, first, but it also gives a much more explicit error message:

# resize2fs /dev/closure/scratch
resize2fs 1.43.1 (08-Jun-2016)
Please run 'e2fsck -f /dev/closure/scratch' first.

We need to change tune2fs to give a similar message.

Cheers,

                                                - Ted

Reply via email to