Re: How to fix bad superblock or xfs_repair: error - read only 0 of 512 bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 24, 2012, at 6:04 AM, Eric Sandeen wrote:

> 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).

This is a new system. I connected the hdd waaay after the installation. So the installer has never seen it. ;)

> 
>>>> $ 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.

That's weird! Any chance left I can fix this?


> 
>>> 
>>>> $ 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…

Yes, sorry. that was my fault. Wrong hdd. see my other message for the correct straces.

> 
>> 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.
> 

xfs_db: error - read only 0 of 512 bytes
magicnum = 0x58465342
blocksize = 4096
dblocks = 366284646
rblocks = 0
rextents = 0
uuid = 65b7d940-6577-4384-b7ba-f051300f2d56
logstart = 268435460
rootino = 128
rbmino = 129
rsumino = 130
rextsize = 1
agblocks = 91571162
agcount = 4
rbmblocks = 0
logblocks = 32768
versionnum = 0xb4a4
sectsize = 512
inodesize = 256
inopblock = 16
fname = "\000\000\000\000\000\000\000\000\000\000\000\000"
blocklog = 12
sectlog = 9
inodelog = 8
inopblog = 4
agblklog = 27
rextslog = 0
inprogress = 0
imax_pct = 5
icount = 5184
ifree = 16
fdblocks = 54646459
frextents = 0
uquotino = 0
gquotino = 0
qflags = 0
flags = 0
shared_vn = 0
inoalignmt = 2
unit = 0
width = 0
dirblklog = 0
logsectlog = 0
logsectsize = 0
logsunit = 1
features2 = 0x8
bad_features2 = 0x8

I don't get anything useful from that information ;)


Thanks in advance!
Chris
_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux