All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Malkov <malkov@ispras.ru>
To: linux-ext4@vger.kernel.org
Cc: Andrey Tsyvarev <tsyvarev@ispras.ru>,
	Alexey Khoroshilov <khoroshilov@ispras.ru>
Subject: Online resizing of filesystem mounted with backup superblock causes corruption
Date: Wed, 24 Dec 2014 01:32:42 +0300	[thread overview]
Message-ID: <5499ED8A.5010907@ispras.ru> (raw)

# 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.

[ 2669.510800] EXT4-fs (loop0): resizing filesystem from 128000 to
256000 blocks
[ 2669.513558] EXT4-fs warning (device loop0): reserve_backup_gdb:969:
reserved block 32770 not at offset 1
[ 2669.513569] EXT4-fs (loop0): resized filesystem to 256000
[ 2669.516328] EXT4-fs warning (device loop0): ext4_group_extend:1734:
can't shrink FS - resize aborted


-- 
Maxim Malkov
Software Engineering Department, ISPRAS 


             reply	other threads:[~2014-12-23 22:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 22:32 Maxim Malkov [this message]
2014-12-24 22:33 ` Online resizing of filesystem mounted with backup superblock causes corruption Theodore Ts'o
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=5499ED8A.5010907@ispras.ru \
    --to=malkov@ispras.ru \
    --cc=khoroshilov@ispras.ru \
    --cc=linux-ext4@vger.kernel.org \
    --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 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.