lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 9 Dec 2016 22:35:07 -0600
From:   Eric Sandeen <sandeen@...hat.com>
To:     Andreas Dilger <adilger@...ger.ca>,
        Simon Matthews <simon.d.matthews@...il.com>
Cc:     linux-ext4@...r.kernel.org
Subject: Re: Filesystem size problem.

On 12/9/16 2:29 PM, Andreas Dilger wrote:
> On Dec 8, 2016, at 10:40 PM, Simon Matthews <simon.d.matthews@...il.com> wrote:
>>
>> I have an ext3 filesystem that will not mount under newer versions of
>> the kernel and I hope someone here can help.
>>
>> Obviously, one solution is "backup and re-create from scratch". I have
>> the backups, but I hope that there may be a quicker method to fix the
>> issues.
>>
>> The root issue is that the filesystem is very slightly smaller than
>> the allocated space.

So the device is now smaller than the filesystem thinks, right?

> The filesystem exists on a MDRAID device and I
>> think that when I converted the MDRAID to a newer metadata version, it
>> truncated the available size, slightly. However, how I got here isn't
>> really important, fixing it now is.
> 
> Running "e2fsck -fy" should fix this.  I'd recommend to use the latest
> version of e2fsck.

Reaslly?  e2fsck can change total blocks in the superblock to accomodate a
shrunken device?  That's a new one for me...

I don't think so:

$ truncate --size=101m testfile
$ mkfs.ext3 testfile
$ truncate --size=100m testfile
$ e2fsck -f testfile
...
The physical size of the device is 102400 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? n
...
$ e2fsck -f testfile
...
The physical size of the device is 102400 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? n
$ e2fsck -f testfile
...
The physical size of the device is 102400 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? n

etc.


The proper solution is to fix your block device, not the filesystem; it was
the block device which was inappropriately shortened.

I don't know if just poking a smaller total blocks number into the superblock
via debugfs would be safe or not.

-Eric

> Cheers, Andreas

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ