linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: dreusser@gmail.com, sandeen@redhat.com
Cc: linux-ext4@vger.kernel.org, linux@horizon.com
Subject: Re: Issue with bad file system
Date: 19 Nov 2012 16:15:37 -0500	[thread overview]
Message-ID: <20121119211537.5429.qmail@science.horizon.com> (raw)
In-Reply-To: <CAPAnFc8z1zn=Fh4LLz-WCq1qHa5oFTQvct04UEh9xDxFTJRvuQ@mail.gmail.com>

> There is no encryption to my knowledge (not an expert in mdadm).

linux md doesn't do encryption.  But there are other things, like
dm-crypt, that it can be combined with to do encryption.

That doesn't look like a superblock, that looks like random bits,
as produced by encryption or good compression.  (Could be jpeg,
mp3, or compressed video, it's hard to tell.)

*And* the first few backup superblocks appear to be trashed
as well.

This means either at least a gigabyte of data got overwritten, or some
kind of underlying transformation got changed, so the superblocks
aren't visible in the right places any more.

The obvious possibilities are:
1) Data scrambling, such as from encryption.
2) Address scrambling, such as by moving the components
   in a RAID aroud or assembling with a different stripe
   size.

If you can find anywhere a sector that looks like a superblock as
described at
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#The_Super_Block

we can try to figure out what's going on.

They're supposed to be located at blocks 32768 * 3**k, 32768 * 5**k,
and 32768 * 7**k, for k = 0, 1, 2, ....  That is, 32768 times 1, 3, 9,
27, 81, 243, ...; 32768 times 1, 5, 25, 125, 625, ...; and 32768 times 1,
7, 49, 343, ...

(Those are 4K blocks; myltiply by 8 for 512-byte sector numbers.)

While the primary superblock contains file system statistics and flags,
the backups are generally never written after file system creation time,
so it's *really* hard to understand how they could have been overwritten
by any sort of normal file system activity.

Let's see... you have 1952211968K in your RAID, meaning 488052992 4K
blocks, and 14895 block groups.

The *last* backup superblocks should be at 3^8 = 6561, 5^5 = 3125,
and 7^4 = 2401.

Try the following:
dumpe2fs -h -o superblock=$((32768*3**8)) /dev/md0
dumpe2fs -h -o superblock=$((32768*5**5)) /dev/md0
dumpe2fs -h -o superblock=$((32768*7**4)) /dev/md0
dumpe2fs -h -o superblock=$((32768*3**7)) /dev/md0

If none of those work, either something overwrote *most* of your drive,
or something has happened to give that illusion.

As Ted says, I'd research option 2 very carefully.

  reply	other threads:[~2012-11-19 21:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19  6:30 Issue with bad file system George Spelvin
2012-11-19  7:23 ` Drew Reusser
2012-11-19  8:32   ` George Spelvin
2012-11-19 15:29     ` Eric Sandeen
2012-11-19 17:00       ` Drew Reusser
2012-11-19 16:57     ` Drew Reusser
2012-11-19 17:14       ` Eric Sandeen
2012-11-19 18:41         ` Theodore Ts'o
2012-11-19 19:15           ` George Spelvin
2012-11-19 19:36             ` Theodore Ts'o
2012-11-19 19:53           ` Drew Reusser
2012-11-19 20:24             ` Theodore Ts'o
2012-11-19 19:54         ` Drew Reusser
2012-11-19 21:15           ` George Spelvin [this message]
2012-11-19 21:30             ` Eric Sandeen
  -- strict thread matches above, loose matches on Subject: below --
2012-11-19  4:46 Drew Reusser
2012-11-19 15:18 ` Eric Sandeen

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=20121119211537.5429.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=dreusser@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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).