From: Killian De Volder <killian.de.volder@scarlet.be>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Recovery after mkfs.ext4 on a ext4
Date: Sun, 15 Jun 2014 22:27:08 +0200 [thread overview]
Message-ID: <539E019C.6060600@scarlet.be> (raw)
In-Reply-To: <20140615132026.GC2180@thunk.org>
On 15-06-14 15:20, Theodore Ts'o wrote:
> On Sun, Jun 15, 2014 at 10:12:14AM +0200, Killian De Volder wrote:
>
> It could be perhaps argued that qemu should
> add this safety check, and at least warn before you exported a block
> device already in use as a file system. It's probably worth taking
> that up with the qemu folks.
It was Xen, but same issue.
> If it's any consolation the very latest version of e2fsprogs has a
> safety check that might have caught the problem:
>
> # mke2fs -t ext4 /dev/heap/scratch
> mke2fs 1.42.10 (18-May-2014)
> /dev/heap/scratch contains a ext4 file system labelled 'Important Stuff'
> last mounted on Tue Jun 3 16:12:01 2014
> Proceed anyway? (y,n) n
Very good !
>> Can e2fsck recover the directory structure and/or files in this scenario?
> Well, maybe. The problem is what got destroyed.... given some of the
> errors you have described, it looks like more than the inode table got
> wiped. It's quite possible that version of mke2fs used to create the
> original file system is older than the one used in the guest OS. For
> example, we changed where we placed the journal at one point. That
> would explain some of the file system errors.
I assume this includes changing the journal size manually? (For the wiki.)
>> Can I use debugfs to start at a directory inode and then use rdump ?
> Again, maybe. The problem is that if a particular subdirectory is
> destroyed, then you won't find it via rdump. E2fsck can relocate
> files and subdirectories contained in damaged directories to
> lost+found, which rdump obviously can't cope with.
If you mount it read-only all I see is ./ ../ and ./lost+found/, so rdump is out the question.
I'm hoping on e2fsck.
>> Is there a way to reduce the memory usage during e2fsck in this scenario ?
> Sorry, not really.
Sometimes I think it's certain inodes causing the excessive memory usage cause.
20GiB sounds a lot when the normal -f fschk took less then 3GiB. (It's a 16TiB file system).
But suppose it needs more binary maps when the filesystem is this corrupt ?
Actually there might be one thing I could do, I should have a look at zram and zswap.
(Well after this e2fsck -nf check is done, which could be a day or 2...)
I've also been pondering about taking a lvm snapshot and running an actual repair.
(Instead of a testrun.) But I have no idea howbig the snapshot should be. Any indicators ?
> Good luck,
Thank you for the info and luck, I'll need it :)
> - Ted
next prev parent reply other threads:[~2014-06-15 20:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-15 8:12 Recovery after mkfs.ext4 on a ext4 Killian De Volder
2014-06-15 13:20 ` Theodore Ts'o
2014-06-15 20:27 ` Killian De Volder [this message]
2014-06-15 21:44 ` Theodore Ts'o
2014-06-23 6:09 ` Killian De Volder
2014-06-23 12:37 ` Theodore Ts'o
2014-06-23 16:37 ` Killian De Volder
2014-06-23 17:31 ` Theodore Ts'o
2014-06-23 18:34 ` Killian De Volder
2015-03-22 8:19 ` Killian De Volder
2015-03-22 20:19 ` 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=539E019C.6060600@scarlet.be \
--to=killian.de.volder@scarlet.be \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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.