linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Curtis Jones <curtis.jones@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Can't resize2fs - combination of flex_bg and !resize_inode
Date: Mon, 20 Aug 2012 23:02:45 -0400	[thread overview]
Message-ID: <20120821030245.GA4222@thunk.org> (raw)
In-Reply-To: <0FB0C67C-CF56-4589-857F-8B57BC25AB7D@gmail.com>

On Mon, Aug 20, 2012 at 03:18:35AM -0400, Curtis Jones wrote:
> Hi. I hope this is the right list for ext4-related user questions. If not, please point me in the right direction.
> 
> I recently set up my first software raid with mdadm and after adding more disks to the raid I am unable to resize the filesystem to the full size of the raid. I created a single (~16TB) filesystem on /dev/md0 via:
> 
> 	mkfs.ext4 -v -b 4096 -t huge -E stride=128,stripe-width=256 /dev/md0

This is wrong.  It should have been

mke2fs -v -b 4096 -t ext4 -T huge -E stride=128,stripe-width=256 /dev/md0

Unfortunately -t huge overrode the ".ext4" in "mkfs.ext4", leading to
an incorrect set of file system options.  I didn't expect people would
try to use do this.  I'll have to improve mke2fs's error handling to
prevent the -t/-T confusion.

That being said, you must have a non-standard /etc/mke2fs.conf file,
since when I tried your command line, here's the file system features
that I ended up with:

Filesystem features:      ext_attr resize_inode dir_index filetype sparse_super large_file

This wouldn't have given you any of ext4's advanced features, but
resize2fs should have worked in that case.

Can you send me the output of "dumpe2fs -h /dev/md0", and your
/etc/mke2fs.conf file?

> While I await any suggestions, I'm going to look at a more
> up-to-date versions of these tools. Please let me know if I need to
> provide any more information. I *really* would like to find out that
> there's a way to resize the fs without having to recreate the
> fs. Copying all of this data off and back on would be painful.

Yes, you should definitely get a newer version of e2fsprogs.  The
latest version is 1.42.5.

As to whether you'll need to recreate the filesystem, I'll need to see
the output of dumpe2fs -h.  It may be that file system was created in
sufficiently poor configuration that it would be highly advisable that
you recreate the file system.

My apologies for the confusion with the options parsing.  Originally
the goal was to allow new fs-types (ext2/ext3/ext4) specified with -t,
and new usage-types (huge/big/small/etc.) specified with -T, to be
defined via new stanzas in /etc/mke2fs.conf.  The problem came when we
also added backwards compatibility support for argv[0] being set to
mkfs.<fs-type>.

That's not something I normally use --- I normally use mke2fs and
e2fsck directly --- and so it didn't occur to me that there would be
confusion if someone confused -t and -T while using an argv[0] of
mkfs.ext4.

Regards,

						- Ted

  reply	other threads:[~2012-08-21  3:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20  7:18 Can't resize2fs - combination of flex_bg and !resize_inode Curtis Jones
2012-08-21  3:02 ` Theodore Ts'o [this message]
2012-08-21  3:23   ` Curtis Jones
2012-08-27 11:37   ` Kai Grosshaus
2012-11-02  1:17     ` Mark Casey

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=20120821030245.GA4222@thunk.org \
    --to=tytso@mit.edu \
    --cc=curtis.jones@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).