All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Harvyl <johan@harvyl.se>
To: Dave Chinner <david@fromorbit.com>,
	Andreas Dilger <adilger@dilger.ca>, Theodore Ts'o <tytso@mit.edu>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: resize2fs: Should never happen: resize inode corrupt! - lost key inodes
Date: Sat, 19 Sep 2015 16:11:50 +0200	[thread overview]
Message-ID: <55FD6D26.1010706@harvyl.se> (raw)
In-Reply-To: <20150919024725.GV3902@dastard>

Thanks for the tip about XFS Dave, I have never used it before but I 
decided to give it a try and managed to reproduce my original issue 
there quite quickly.

I took an old 1 TB disk, put it in a USB cradle and attached it to a 
Linux box running Linux 4.1.0-2-amd64, put XFS on it and created a 24T 
sparse file.

# mkfs.xfs /dev/sda1
# truncate test.img -s 24T

Note that this setup shares no hardware components with the box I 
originally noticed the issue on.
The USB cradle is attached to a different box.

Should this be reported in a bug tracker rather than here?

# mkfs.ext4 test.img -i 262144 -m 0 -O 64bit 15627548672k
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done
Creating filesystem with 3906887168 4k blocks and 61045248 inodes
Filesystem UUID: 53b8a330-beba-4bc4-ab34-5d57c0f457fb
Superblock backups stored on blocks:
         32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 
2654208,
         4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
         102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
         2560000000, 3855122432

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

# resize2fs -p test.img 19534435840k
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on test.img to 4883608960 (4k) blocks.
Begin pass 2 (max = 6)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 119229)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 5 (max = 8)
Moving inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on test.img is now 4883608960 (4k) blocks long.

# resize2fs -p test.img 23441323008k
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on test.img to 5860330752 (4k) blocks.
Begin pass 2 (max = 6)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 149036)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 5 (max = 14)
Moving inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Should never happen: resize inode corrupt!

# debugfs -c test.img
debugfs 1.42.13 (17-May-2015)
test.img: catastrophic mode - not reading inode or group bitmaps
debugfs:  stat <2>
Inode: 2   Type: bad type    Mode:  0000   Flags: 0x0

So, again the root inode is trashed.

-johan

On 2015-09-19 04:47, Dave Chinner wrote:
> On Wed, Sep 16, 2015 at 07:21:59PM -0600, Andreas Dilger wrote:
>> If you add "-b 1024" to the mke2fs command line to use 1KB instead of 4KB blocks, and reduce the sizes by a factor of 4 does the problem still happen? That would make it easier for someone else to test, since it would only need a 4-5TB disk instead of a 19Tb array.
> Sparse files on XFS using loopback will allow you to simulate
> devices larger than 16TB easily. You can turtle it all the way down,
> too, to create the xfs filesystem on a loopback device on a sparse
> file on ext4....
>
> Doing this sort of thing lets me know, for example, that the
> mkfs.ext4 defaults fail on a 500TB device...
>
> # xfs_io -f -c 'truncate 500t' /mnt/xfs/fs.img
> # ls -lh /mnt/xfs
> total 0
> -rw------- 1 root root 500T Sep 19 12:41 fs.img
> # mkfs.ext4 /mnt/xfs/fs.img
> mke2fs 1.42.13 (17-May-2015)
> /mnt/xfs/fs.img: Cannot create filesystem with requested number of inodes while setting up superblock
> #
>
> Cheers,
>
> Dave.


  parent reply	other threads:[~2015-09-19 14:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 18:15 resize2fs: Should never happen: resize inode corrupt! - lost key inodes Johan Harvyl
2015-08-11 22:47 ` Theodore Ts'o
2015-08-12 22:00   ` Johan Harvyl
2015-08-13 13:27     ` Theodore Ts'o
2015-08-13 18:12       ` Johan Harvyl
2015-09-03 22:16         ` Johan Harvyl
2015-09-12 10:27           ` Johan Harvyl
2015-09-14 21:35             ` Johan Harvyl
2015-09-15 17:55               ` Johan Harvyl
2015-09-17  1:21                 ` Andreas Dilger
2015-09-18 18:26                   ` Johan Harvyl
2015-09-19  2:47                   ` Dave Chinner
2015-09-19  5:23                     ` Darrick J. Wong
2015-09-19 14:11                     ` Johan Harvyl [this message]
2015-09-19 15:02                       ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FD6D26.1010706@harvyl.se \
    --to=johan@harvyl.se \
    --cc=adilger@dilger.ca \
    --cc=david@fromorbit.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.