linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jakob Lagerstedt <jakob.lagerstedt@slu.se>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: resize2fs unresponsive
Date: Sat, 27 Feb 2016 14:56:03 -0500	[thread overview]
Message-ID: <20160227195603.GA24887@thunk.org> (raw)
In-Reply-To: <1531dc8e596.f715a7bd144008.4814276246115556854@slu.se>

On Fri, Feb 26, 2016 at 02:33:38PM +0100, Jakob Lagerstedt wrote:
> Dear developers,
> 
> We started a resize2fs (version 1.42.9) on Ubuntu 14.04 against a unmounted raid. 
> 
> It has taken a long time and not much seems to be happening. We have
> not found any answers to these questions in the documentation and
> conflicting answers from forums.

So a couple of things.  resize2fs using a mounted raid is safer than
an unmounted filesystems.  There were bugs with older versions of
resize2fs that could cause corruption, specifically with doing
resize2fs for large file systems while unmounted.  So I strongly
recommend that you not try to do unmounted resize2fs except with the
very lastest version of e2fsprogs (1.42.13).

Unfortunately, killing an resize2fs while unmounted while _usually_
safe, *can* cause damage while it is relocating the inode table
blocks.  This normally wouldn't happen, since we reserve space to
avoid needing to do this, but without knowing how big the file system
was when it was originally created, and how big you are trying to
resize it to.  If you send it an interrupt signal (e.g., type
control-C) it will try to stop at a clean point.  But if you send it a
kill -9 or there is a power failure while it is relocating the inode
table, you can lose data.  (This is not a problem if you use resize2fs
while it is mounted, since when it is mounted it uses the journal to
make sure things stay consistent even if the sytem crashes.)

Given the balance of risks, it's probably better to interrupt it with
a control C, and then run e2fsck on the file system afterwards.

> Can the resize be restarted if we kill it?

No, it can't be restarted.

						- Ted

      reply	other threads:[~2016-02-27 19:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 13:33 resize2fs unresponsive Jakob Lagerstedt
2016-02-27 19:56 ` Theodore Ts'o [this message]

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=20160227195603.GA24887@thunk.org \
    --to=tytso@mit.edu \
    --cc=jakob.lagerstedt@slu.se \
    --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).