linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Maxim Malkov <malkov@ispras.ru>
Cc: linux-ext4@vger.kernel.org, Andrey Tsyvarev <tsyvarev@ispras.ru>,
	Alexey Khoroshilov <khoroshilov@ispras.ru>
Subject: Re: Online resizing of filesystem mounted with backup superblock causes corruption
Date: Wed, 24 Dec 2014 17:33:16 -0500	[thread overview]
Message-ID: <20141224223316.GD29088@thunk.org> (raw)
In-Reply-To: <5499ED8A.5010907@ispras.ru>

On Wed, Dec 24, 2014 at 01:32:42AM +0300, Maxim Malkov wrote:
> # mkfs.ext4 /dev/loop0 100M # adjust if necessary, should be less than
> partition size
> 
> Superblock backups stored on blocks:
>         8193, 24577, 40961, 57345, 73729
> (pick one)
> 
> # mount -t ext4 -o sb=40961 /dev/loop0 /media/
> # resize2fs /dev/loop0
> resize2fs 1.42.12 (29-Aug-2014)
> Filesystem at /dev/loop0 is mounted on /media; on-line resizing required
> old_desc_blocks = 1, new_desc_blocks = 4
> 
> Now, depending on your luck, various things may happen. resize2fs may hang.
> You might see BUG() in your dmesg. Either way, system will become
> severely corrupted (as indicated by fsck). You won't be able to mount
> it, either.

Thanks for the bug report; I've can reproduce this using a 3.18 based
kernel.

It may be that simplest bug fix is to simply disallow resizing if we
are using a backup superblock.

						- Ted

  reply	other threads:[~2014-12-24 22:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 22:32 Online resizing of filesystem mounted with backup superblock causes corruption Maxim Malkov
2014-12-24 22:33 ` Theodore Ts'o [this message]
2014-12-27  4:59   ` [PATCH] ext4: prevent online resize with backup superblock 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=20141224223316.GD29088@thunk.org \
    --to=tytso@mit.edu \
    --cc=khoroshilov@ispras.ru \
    --cc=linux-ext4@vger.kernel.org \
    --cc=malkov@ispras.ru \
    --cc=tsyvarev@ispras.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).