public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Stephen Porter <stephenp@r-s.com.au>
Cc: xfs@oss.sgi.com
Subject: Re: Power loss causes bad magic number??
Date: Tue, 15 Jul 2008 21:40:00 -0500	[thread overview]
Message-ID: <487D5F80.1050909@sandeen.net> (raw)
In-Reply-To: <F46A887185FC6044A7FAC577E31118AE022316C0@rsbne01.RSBNE.LOCAL>

Stephen Porter wrote:
> Hello,
> 
> Hoping someone may be able to offer some advice/assistance.
> 
> I lost power twice (within a few hours) to my machine which had a ~2.2TB
> XFS volume on it.  The first time the machine (running Xubuntu 8.04)
> came back up ok, the second time the XFS volume will not mount.  Is
> there any chance of recovering the data? /dev/sdc is seen by xubuntu as
> one ~2.2TB disk, and I put the XFS file system straight onto the disk.
> It's 4x750GB drives on a hardware raid controller (rocketraid 2320).
> Driver/module for rocket raid (rr232x) is loaded ok.

hm, not an in-kernel driver, I guess?

> In the system log I see:
> 
> XFS: bad magic number
> 
> XFS: SB validate failed
> 
> I tried running xfs_check, the result of this was:
> 
> xfs_check /dev/sdc
> xfs_check: unexpected XFS SB magic number 0x33c08ed0
> xfs_check: size check failed
> xfs_check: read failed: Invalid argument
> xfs_check: data size check failed
> xfs_check: failed to alloc -225176656 bytes: Cannot allocate memory
> 
> I looked at running xfs_repair, but the man page states that this will
> only work on a volume that has been unmounted cleanly... as I lost power
> the volume has not been unmounted cleanly, but I cannot mount it again
> to unmount it cleanly.

If you have to, you can zero the log w/ xfs_repair as a last resort.

> Running xfs_repair gives the following:
> 
> xfs_repair -n /dev/sdc
> 
> Phase 1 - find and verify superblock...
> 
> bad primary superblock - bad magic number !!!
> 
> ...attempting to find secondary superblock...
> 
> ...found candidate secondary superblock... unable to verify superblock,
> continuing...

I always wished it said where, and why it did not verify....

> (the above appears a few times, until finally)
> 
> ...Sorry, could not find valid secondary superblock
> 
> Exiting now.
> 
> I've seen it mentioned in other posts to the xfs archive to check that
> there is an xfs volume there, so I've also included the output of "dd
> if=/dev/sdc bs=512 count=1 iflag=direct 2> /dev/null | od -Ax -x" below:
> 
> $ dd if=/dev/sdc bs=512 count=1 iflag=direct 2> /dev/null | od -Ax -x
> 
> 000000 c033 d08e 00bc fb7c 0750 1f50 befc 7c1b
> 000010 1bbf 5006 b957 01e5 a4f3 bdcb 07be 04b1


Can you try piping it through "hexdump -C" instead, I'm more used to
eyeballing that output :)

You might also try looking a bit further:

dd if=/dev/sdc bs=512 count=128 iflag=direct | hexdump -C | grep XFSB

to see if maybe the raid card does something else at the front of your
disk and the superblock is further in, and something got scrambled up?
Just a longshot....

-Eric

  reply	other threads:[~2008-07-16  2:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16  2:18 Power loss causes bad magic number?? Stephen Porter
2008-07-16  2:40 ` Eric Sandeen [this message]
2008-07-16  7:01   ` Stephen Porter
2008-07-16  7:35     ` Dave Chinner
2008-07-16  8:17       ` Stephen Porter
2008-07-16 16:00         ` Chris Wedgwood
2008-07-17 13:36         ` Russell Cattelan
2008-07-17 21:52           ` Stephen Porter
2008-07-18 11:17             ` Andi Kleen
2008-07-18 18:19         ` Peter Grandi
2009-02-07 20:46 ` kevin.dual
2009-02-07 21:10   ` Eric Sandeen
2009-02-07 21:54     ` Eric Sandeen
2009-02-08  6:10     ` Kevin Dual

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=487D5F80.1050909@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=stephenp@r-s.com.au \
    --cc=xfs@oss.sgi.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