From: Theodore Ts'o <tytso@mit.edu>
To: Phillip Susi <psusi@ubuntu.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: resize2fs minimum size wrong
Date: Sat, 23 May 2015 19:36:03 -0400 [thread overview]
Message-ID: <20150523233603.GA3270@thunk.org> (raw)
In-Reply-To: <5560EEB1.8070003@ubuntu.com>
On Sat, May 23, 2015 at 05:18:41PM -0400, Phillip Susi wrote:
>
> So I have a filesystem with nothing beyond group 16 used ( including
> metadata ), so it should be able to shrink to ~524288 blocks, yet
> resize2fs claims the minimum size is 770083 blocks. Resize debug output
> follows:
Figuring out the minimum size in a way where we don't screw up and
pick a number too _low_ is tricky, because if resize2fs aborts in the
middle, we can end up with a corrupted file system.
I have continued to severely regret accepting the patch that
calculates the minimum size necessary, because it's *hard* to get it
right, and if it's too aggressive, users lose data, and get angry, and
if it's too liberal, then users whine.
I'm going to guess the problem has to do with the reserved space
needed so that resize works correctly, and the amount of reserved
space needed drops as we decrease the nmber of block groups. So if
you start with a very large file system, and then try to shrink it
down to minimum size, you may need to run resize2fs -M multiple times.
Which to be honest, is just fine as far as I'm concerned, because I've
been trying to strongly discourage the use of resize2fs -M in the
first place, because it tends to leave a highly non-optimal file
system.
- Ted
next prev parent reply other threads:[~2015-05-23 23:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-23 21:18 resize2fs minimum size wrong Phillip Susi
2015-05-23 23:36 ` Theodore Ts'o [this message]
2015-05-24 0:27 ` Phillip Susi
2015-05-24 1:34 ` Theodore Ts'o
2015-05-24 3:02 ` [PATCH] resize2fs: fix minimum size calculation Phillip Susi
2015-06-18 0:55 ` Phillip Susi
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=20150523233603.GA3270@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=psusi@ubuntu.com \
/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).