public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Christian Kildau <lists@unixhosts.org>
Cc: xfs@oss.sgi.com
Subject: Re: How to fix bad superblock or xfs_repair: error - read only 0 of 512 bytes
Date: Mon, 23 Jan 2012 23:04:16 -0600	[thread overview]
Message-ID: <4F1E3BD0.7080604@sandeen.net> (raw)
In-Reply-To: <92CDAC52-1BA1-43A8-8470-0E2DCD916610@unixhosts.org>

On 1/23/12 3:23 AM, Christian Kildau wrote:
> On Jan 23, 2012, at 5:31 AM, Dave Chinner wrote:
> 
>> On Sat, Jan 21, 2012 at 11:29:15AM +0100, Christian Kildau wrote:
>>> Sorry if this message appears twice!
>>>

Argh.  ;)

>>>
>>> Hello,
>>>
>>> I'm having some very serious issues with XFS after upgrading from a
>>> Linux Distro running Ubuntu 2.6.32 to 3.2.
>>>
>>> It seems like my filesystems are damaged after attaching them to a
>>> Linux 3.2 server. I am also no longer able to mount the hdd on the old
>>> server that is still running 2.6.32!
>>
>> I take it that you are using external storage of some kind? Can you
>> describe it?
> 
> This hdd is connected via e-sata, but it doesn't make any difference if I directly connect it internally via sata.
> Also it doesn't make any difference if I connect it back to the 'old' server
> 
>>
>>> (I created the xfs filesystem on the entire hdd, not on a partition,
>>> so /dev/sdd is not a typo)

I wonder if your installer helpfully scribbled something on it since it
had no partitions (which should be safe, but there are dumb apps out there).

>>> $ sudo mount -t xfs /dev/sdd /media/
>>> mount: /dev/sdd: can't read superblock
>>> (dmesg)
>>> [236659.912663] attempt to access beyond end of device
>>> [236659.912667] sdd: rw=32, want=2930277168, limit=2930275055
>>> [236659.912670] XFS (sdd): last sector read failed
>>
>> So XFS has asked to read 2113 sectors beyond the size of the device
>> that the kernel is reporting. What is the output of
>> /proc/partitions?
> 
> $ grep sdd /proc/partitions 
>    8       64 1465137527 sdd

so 1465137527*1024 = 1500300827648 bytes

>From the strace repair is trying to read at:

pread(4, "", 512, 1500301909504)        = 0

which is about 1 meg past the end of the device.

>>
>>> $ sudo xfs_check /dev/sdd
>>> xfs_check: error - read only 0 of 512 bytes
>>>
>>> $ sudo xfs_repair /dev/sdd
>>> Phase 1 - find and verify superblock...
>>> xfs_repair: error - read only 0 of 512 bytes
>>
>> So both buffered and direct IO to the first block in the block
>> device are failing. I'd say your problems have nothing to do with
>> XFS. However, can you strace them and find out what the error that
>> is occuring actually is?
> 
> Strace is giving me:
> wait4(-1, xfs_check: /dev/sdd is not a valid XFS filesystem (unexpected SB magic number 0x00000000)

now that is something else...

> xfs_check: WARNING - filesystem uses v1 dirs,limited functionality provided.
> xfs_check: read failed: Invalid argument
> cache_node_purge: refcount was 1, not zero (node=0x21ecef0)
> xfs_check: cannot read root inode (22)
> bad superblock magic number 0, giving up

those are different failures than first reported....

xfs_db -c "sb 0" -c "p" /dev/sdd still might be interesting.

-Eric

> I attached the entire strace logs to this email.
> 
> 
> 
> 
> 
> Do you have any idea what has caused this or how to fix it?
> 
> Thanks in advance!
> Chris
> 
> 
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-01-24  5:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-21 10:29 How to fix bad superblock or xfs_repair: error - read only 0 of 512 bytes Christian Kildau
2012-01-23  4:31 ` Dave Chinner
2012-01-23  9:23   ` Christian Kildau
2012-01-24  5:04     ` Eric Sandeen [this message]
2012-01-24  7:08       ` Christian Kildau
2012-01-24 10:13       ` Christian Kildau
2012-01-24 14:12         ` Roger Willcocks
2012-01-24 15:46           ` Christian Kildau
2012-01-24 15:50             ` Eric Sandeen
2012-01-24 15:52               ` Christian Kildau
2012-01-24 15:57                 ` Eric Sandeen
2012-01-24 17:25                   ` Roger Willcocks
2012-01-24 18:10                     ` Christian Kildau
2012-01-23 10:43   ` Christian Kildau
  -- strict thread matches above, loose matches on Subject: below --
2019-12-28 11:11 Utpal Bora
2019-12-29  3:15 ` Chris Murphy
2019-12-29  5:58   ` Utpal Bora
2019-12-29  4:43 ` Eric Sandeen
2019-12-29  5:58   ` Utpal Bora
2012-01-21 10:03 Christian Kildau
2012-01-24  4:51 ` 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=4F1E3BD0.7080604@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=lists@unixhosts.org \
    --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