All of lore.kernel.org
 help / color / mirror / Atom feed
* need help to repair XFS partition
@ 2009-01-06  9:11 Gergely Soos
  2009-01-06  9:27 ` Chris Wedgwood
  2009-01-06 16:06 ` Eric Sandeen
  0 siblings, 2 replies; 12+ messages in thread
From: Gergely Soos @ 2009-01-06  9:11 UTC (permalink / raw)
  To: xfs


[-- Attachment #1.1: Type: text/plain, Size: 2519 bytes --]

Greetings

I heard that people compliment XFS for being the fastest FS these days so I
thought I give it a try.
What I did was that I converted my old 107GB FAT32 partition to XFS (I
created an XFS over it) and I wanted to use it as /home
Everything went as it should, I moved the files from my old /home then I
restarted (cleanly!) under windows.
When I got back from windows I was no longer able to mount the XFS
partition.
xfs_repair only said that the superblock is invalid and attempts to find
secondary superblocks but all candidates fail.
So I created a file on another computer with the exact same size as the
partition on my computer and created an XFS on it.
Then I extracted the first 512 bytes and copied to my HDD using dd. But it
complained about the UUID so I corrected it using khexedit.
Then xfs_db complained that it cannot find the root inode so I wrote a
little perl script to search it.
You can find it in myxfs.tar.bz2. It seems that it found the root inode
because after I corrected the address using khexedit
xfs_db started complaining about the realtime bitmap inodes, so I corrected
those too (using inode numbers rootino+1 and rootino+2).
And this is where I'm stuck.
The mount still fails, dmesg says that it cannot find the root inode,
xfs_repair says the same old thing, xfs_check says a lot of things,
most of them are messages like this: can't seek in filesystem at bb <some
numbers> or: ag bad magick number.
That exceeds my knowledge.
Please help me restore the partition, It contains lots of programmes I wrote
over the years and some of them are not backed up,
some of them are, but only an older version. I also have personal stuff on
it like my bill records that I cannot recover from anywhere else.
myxfs.tar.bz2 contains the perl script I mentioned above and the inodes it
found. The one staring with ri is the root inode,
the files starting with sb are the suspected superblocks (I also took one of
those at random and corrected the three inode numbers
with khexedit but the result is the same) and the file backup_bootsect
contains the original superblock that was on the disk after I came back
from windows xp. It does not look like anything to me...
The numbers after ri and sb are the starting address in bytes of the inode
on the disk.
I would also attach the output of xfs_metadump which I created after I
corrected the three inode numbers in the superblock but even bzip-ed
it is more than 3MB and the administrator of this list does not accept it.

Please help,
Gergely

[-- Attachment #1.2: Type: text/html, Size: 2657 bytes --]

[-- Attachment #2: myxfs.tar.bz2 --]
[-- Type: application/x-bzip2, Size: 2075 bytes --]

[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06  9:11 need help to repair XFS partition Gergely Soos
@ 2009-01-06  9:27 ` Chris Wedgwood
  2009-01-06 16:06 ` Eric Sandeen
  1 sibling, 0 replies; 12+ messages in thread
From: Chris Wedgwood @ 2009-01-06  9:27 UTC (permalink / raw)
  To: Gergely Soos; +Cc: xfs

On Tue, Jan 06, 2009 at 11:11:07AM +0200, Gergely Soos wrote:

> Please help me restore the partition, It contains lots of programmes
> I wrote over the years and some of them are not backed up, some of
> them are, but only an older version. I also have personal stuff on
> it like my bill records that I cannot recover from anywhere else.

dd the entire image in it's current form to somewhere safe, that way
if all else fails you can grovel over the raw data looking for the
data you care about (xfs is fairly good and avoiding fragmentation for
files so there is a good change if you find a block of data you care
about the others will be there too)

> I would also attach the output of xfs_metadump which I created after
> I corrected the three inode numbers in the superblock but even
> bzip-ed it is more than 3MB and the administrator of this list does
> not accept it.

so xfs_repair found the secondary SBs?

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06  9:11 need help to repair XFS partition Gergely Soos
  2009-01-06  9:27 ` Chris Wedgwood
@ 2009-01-06 16:06 ` Eric Sandeen
  2009-01-06 18:04   ` Gergely Soos
  1 sibling, 1 reply; 12+ messages in thread
From: Eric Sandeen @ 2009-01-06 16:06 UTC (permalink / raw)
  To: Gergely Soos; +Cc: xfs

Gergely Soos wrote:
> Greetings
> 
> I heard that people compliment XFS for being the fastest FS these days
> so I thought I give it a try.
> What I did was that I converted my old 107GB FAT32 partition to XFS (I
> created an XFS over it) and I wanted to use it as /home
> Everything went as it should, I moved the files from my old /home then I
> restarted (cleanly!) under windows.
> When I got back from windows I was no longer able to mount the XFS
> partition.

Which partition was it?  I wonder if a gpt label got re-written over it
or something.

> xfs_repair only said that the superblock is invalid and attempts to find
> secondary superblocks but all candidates fail.
> So I created a file on another computer with the exact same size as the
> partition on my computer and created an XFS on it.

> Then I extracted the first 512 bytes and copied to my HDD using dd. But
> it complained about the UUID so I corrected it using khexedit.

Did you keep the original first 512 bytes?  It would be worth looking
at; try hexdump -C on it (the original) and send that if you have it.

> Then xfs_db complained that it cannot find the root inode so I wrote a
> little perl script to search it.
> You can find it in myxfs.tar.bz2. It seems that it found the root inode
> because after I corrected the address using khexedit
> xfs_db started complaining about the realtime bitmap inodes, so I
> corrected those too (using inode numbers rootino+1 and rootino+2).
> And this is where I'm stuck.
> The mount still fails, dmesg says that it cannot find the root inode,
> xfs_repair says the same old thing, xfs_check says a lot of things,
> most of them are messages like this: can't seek in filesystem at bb
> <some numbers> or: ag bad magick number.
> That exceeds my knowledge.
> Please help me restore the partition, It contains lots of programmes I
> wrote over the years and some of them are not backed up,
> some of them are, but only an older version. I also have personal stuff
> on it like my bill records that I cannot recover from anywhere else.
> myxfs.tar.bz2 contains the perl script I mentioned above and the inodes
> it found. The one staring with ri is the root inode,
> the files starting with sb are the suspected superblocks (I also took
> one of those at random and corrected the three inode numbers
> with khexedit but the result is the same) and the file backup_bootsect
> contains the original superblock that was on the disk after I came back
> from windows xp. It does not look like anything to me...
> The numbers after ri and sb are the starting address in bytes of the
> inode on the disk.
> I would also attach the output of xfs_metadump which I created after I
> corrected the three inode numbers in the superblock but even bzip-ed
> it is more than 3MB and the administrator of this list does not accept it.

As Chris suggested, I would find a spare 100G somewhere and make a dd
image now, so you have something to experiment with + a backup if things
go wrong.

It sounds like something under windows clobbered your filesystem, I
guess, unless it's the gpt thing I mentioned, it's very strange.

-Eric

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 16:06 ` Eric Sandeen
@ 2009-01-06 18:04   ` Gergely Soos
  2009-01-06 18:40     ` Eric Sandeen
  2009-01-06 18:46     ` Eric Sandeen
  0 siblings, 2 replies; 12+ messages in thread
From: Gergely Soos @ 2009-01-06 18:04 UTC (permalink / raw)
  To: xfs

[-- Attachment #1: Type: text/plain, Size: 6542 bytes --]

In my original email there was an attachment that contained the original
boot sector, but anyway, here comes the hexdump Eric asked for:

00000000  91 f0 1c 43 90 01 ba bf  f7 ee 29 9a 1e 6c d5 aa
|.ð.C..º¿÷î)..lÕª|
00000010  11 5a 12 cb 3b 29 cb ff  39 ce 4e d3 95 ec b9 39
|.Z.Ë;)Ëÿ9ÎNÓ.ì¹9|
00000020  4a 5f 11 92 0a b5 c8 c0  fd ef 36 11 d7 d4 0a 55
|J_...µÈÀýï6.×Ô.U|
00000030  f7 f7 54 5e 52 4e 1a 7a  32 72 ad c1 a7 10 2e 28
|÷÷T^RN.z2r­Á§..(|
00000040  cf 00 fb 5c 95 d3 ea 59  b6 72 51 4e cd 82 b7 7b
|Ï.û\.ÓêY¶rQNÍ.·{|
00000050  3a 13 dd e0 af 01 bd fd  2c 9d b3 a4 ee 59 c3 ea
|:.Ýà¯.½ý,.³¤îYÃê|
00000060  a7 a1 e5 e9 b0 aa 74 19  14 e4 26 cf 60 3f 4c c9
|§¡åé°ªt..ä&Ï`?LÉ|
00000070  51 1f fd 77 df 0e 26 76  43 6b 83 ba e4 f3 6f 56
|Q.ýwß.&vCk.ºäóoV|
00000080  7c b2 0a 70 1f 6b a0 a3  27 a6 c5 b2 f7 90 50 e1
||².p.k £'¦Å²÷.Pá|
00000090  e7 7a 2b ab 8a 31 6b 5e  07 b0 48 df e4 cd b0 31
|çz+«.1k^.°HßäÍ°1|
000000a0  73 39 7e dd b2 5e 20 15  48 b0 3a bb 40 f0 1b 8b  |s9~ݲ^
.H°:»@ð..|
000000b0  c9 2d a2 bb cf dd bc 91  ee fe fe a8 88 88 92 cc
|É-¢»Ïݼ.îþþ¨...Ì|
000000c0  99 24 88 08 e5 9c 8b 89  b0 1b df d5 0b d9 d2 79
|.$..å...°.ßÕ.ÙÒy|
000000d0  cb d9 2f 39 d3 b6 c8 74  04 ce 4f 86 d8 50 ea b7
|ËÙ/9Ó¶Èt.ÎO.ØPê·|
000000e0  2a c4 d8 8c 11 85 ef 5b  31 2f f2 fa 4e d7 e9 92
|*ÄØ...ï[1/òúN×é.|
000000f0  ea 06 d5 25 71 d4 22 05  5e dd c8 64 43 02 18 a4
|ê.Õ%qÔ".^ÝÈdC..¤|
00000100  76 01 01 0b fe fc ba d5  74 55 54 c8 bb cd 08 80
|v...þüºÕtUTÈ»Í..|
00000110  1a 0e 4f d7 17 51 da b5  5e 84 f4 5c 48 b8 63 66
|..O×.QÚµ^.ô\H¸cf|
00000120  05 19 9c 7b c4 70 3b 37  a7 8c 45 43 ef a8 05 0b
|...{Äp;7§.ECï¨..|
00000130  52 d3 cc a4 a7 1e 07 c1  2e 9e 62 0e d1 43 83 4c
|RÓ̤§..Á..b.ÑC.L|
00000140  ab bd e8 c0 e2 72 75 1f  21 b9 08 57 92 a2 e8 b8
|«½èÀâru.!¹.W.¢è¸|
00000150  ee 34 5c 0d 01 55 5e fc  7a a9 07 67 c4 20 48 07  |î4\..U^üz(c).gÄ
H.|
00000160  aa 9f 96 d2 49 fd c0 39  35 e1 03 2a ae 93 d8 75
|ª..ÒIýÀ95á.*(R).Øu|
00000170  28 0c 00 59 78 e1 28 10  dc c9 10 8c 03 00 24 4a
|(..Yxá(.ÜÉ....$J|
00000180  04 34 cf 1f 01 f4 cf 12  95 88 ee 39 f6 8c 05 30
|.4Ï..ôÏ...î9ö..0|
00000190  08 00 92 e0 3e e1 f0 21  83 12 70 93 90 9a 9c 3e
|...à>áð!..p....>|
000001a0  23 80 1c 7c 07 f4 c0 f8  10 e1 30 94 5f 8a 43 28
|#..|.ôÀø.á0._.C(|
000001b0  78 33 4e 00 52 ef 2b 53  c3 db c3 ae 12 3e 07 6a
|x3N.Rï+SÃÛÃ(R).>.j|
000001c0  87 2e c0 16 43 a2 52 ab  65 50 61 d5 f7 df 7d eb
|..À.C¢R«ePaÕ÷ß}ë|
000001d0  7b 57 74 78 0f e9 d2 47  fb 17 b0 33 7b 1a e0 2c
|{Wtx.éÒGû.°3{.à,|
000001e0  a0 24 b6 09 b1 4b 03 42  56 0f c9 15 2a f6 11 bc
| $¶.±K.BV.É.*ö.¼|
000001f0  06 c1 30 d4 0f 7f 05 2a  0e 34 08 85 2f 54 b4 dd
|.Á0Ô...*.4../T´Ý|
00000200

This looks like nothing to me...
xfs_repair rejects all superblock candidates and exits saying something
like: Sorry, cannot find valid secondary superblock.
I'm not sure what a GPT is, but this is an IDE harddisk, I'm using kernel
2.6.20 and my xfs partition is /dev/hdd1
Is there any way xfs_repair would accept the superblock as is and move on
with the repairs?

Gergely

On Tue, Jan 6, 2009 at 6:06 PM, Eric Sandeen <sandeen@sandeen.net> wrote:

> Gergely Soos wrote:
> > Greetings
> >
> > I heard that people compliment XFS for being the fastest FS these days
> > so I thought I give it a try.
> > What I did was that I converted my old 107GB FAT32 partition to XFS (I
> > created an XFS over it) and I wanted to use it as /home
> > Everything went as it should, I moved the files from my old /home then I
> > restarted (cleanly!) under windows.
> > When I got back from windows I was no longer able to mount the XFS
> > partition.
>
> Which partition was it?  I wonder if a gpt label got re-written over it
> or something.
>
> > xfs_repair only said that the superblock is invalid and attempts to find
> > secondary superblocks but all candidates fail.
> > So I created a file on another computer with the exact same size as the
> > partition on my computer and created an XFS on it.
>
> > Then I extracted the first 512 bytes and copied to my HDD using dd. But
> > it complained about the UUID so I corrected it using khexedit.
>
> Did you keep the original first 512 bytes?  It would be worth looking
> at; try hexdump -C on it (the original) and send that if you have it.
>
> > Then xfs_db complained that it cannot find the root inode so I wrote a
> > little perl script to search it.
> > You can find it in myxfs.tar.bz2. It seems that it found the root inode
> > because after I corrected the address using khexedit
> > xfs_db started complaining about the realtime bitmap inodes, so I
> > corrected those too (using inode numbers rootino+1 and rootino+2).
> > And this is where I'm stuck.
> > The mount still fails, dmesg says that it cannot find the root inode,
> > xfs_repair says the same old thing, xfs_check says a lot of things,
> > most of them are messages like this: can't seek in filesystem at bb
> > <some numbers> or: ag bad magick number.
> > That exceeds my knowledge.
> > Please help me restore the partition, It contains lots of programmes I
> > wrote over the years and some of them are not backed up,
> > some of them are, but only an older version. I also have personal stuff
> > on it like my bill records that I cannot recover from anywhere else.
> > myxfs.tar.bz2 contains the perl script I mentioned above and the inodes
> > it found. The one staring with ri is the root inode,
> > the files starting with sb are the suspected superblocks (I also took
> > one of those at random and corrected the three inode numbers
> > with khexedit but the result is the same) and the file backup_bootsect
> > contains the original superblock that was on the disk after I came back
> > from windows xp. It does not look like anything to me...
> > The numbers after ri and sb are the starting address in bytes of the
> > inode on the disk.
> > I would also attach the output of xfs_metadump which I created after I
> > corrected the three inode numbers in the superblock but even bzip-ed
> > it is more than 3MB and the administrator of this list does not accept
> it.
>
> As Chris suggested, I would find a spare 100G somewhere and make a dd
> image now, so you have something to experiment with + a backup if things
> go wrong.
>
> It sounds like something under windows clobbered your filesystem, I
> guess, unless it's the gpt thing I mentioned, it's very strange.
>
> -Eric
>


[[HTML alternate version deleted]]


[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 18:04   ` Gergely Soos
@ 2009-01-06 18:40     ` Eric Sandeen
  2009-01-06 18:46     ` Eric Sandeen
  1 sibling, 0 replies; 12+ messages in thread
From: Eric Sandeen @ 2009-01-06 18:40 UTC (permalink / raw)
  To: Gergely Soos; +Cc: xfs

Gergely Soos wrote:
> In my original email there was an attachment that contained the original
> boot sector, but anyway, here comes the hexdump Eric asked for:

Sorry, didn't open the tarfile :)

> 00000000  91 f0 1c 43 90 01 ba bf  f7 ee 29 9a 1e 6c d5 aa
> |.ð.C..º¿÷î)..lÕª|
> 00000010  11 5a 12 cb 3b 29 cb ff  39 ce 4e d3 95 ec b9 39
> |.Z.Ë;)Ëÿ9ÎNÓ.ì¹9|

...

> This looks like nothing to me...

I agree... something splattered on the disk it seems.  How far does this
junk go on, I wonder?

> xfs_repair rejects all superblock candidates and exits saying something
> like: Sorry, cannot find valid secondary superblock.
> I'm not sure what a GPT is, but this is an IDE harddisk, I'm using kernel
> 2.6.20 and my xfs partition is /dev/hdd1

GPT is a disk partitioning scheme, and it puts backups at the end of the
disk (IIRC), which sometimes automatically gets restored to the front.
But this does not look like your case.

> Is there any way xfs_repair would accept the superblock as is and move on
> with the repairs?

Well, you want to be sure it matches.  But - go looking through your
disk for "XFSB" and keep track of where the offsets are; you should find
your backup superblocks that way, and we can use xfs_db to get the
values out and perhaps restore your primary.

(you can probably do this on your own, but something like:
# dd if=/dev/hdd1 bs=4k | hexdump -C | grep XFSB
might do nicely)

xfs_repair should be better at using these by itself.  If you can put
your metadump somewhere that I can get to it, maybe I can look and see
why repair is not succeeding...

-Eric

> Gergely
> 

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 18:04   ` Gergely Soos
  2009-01-06 18:40     ` Eric Sandeen
@ 2009-01-06 18:46     ` Eric Sandeen
       [not found]       ` <b75ef8170901061351madb546flbc1631bc55cd4412@mail.gmail.com>
  1 sibling, 1 reply; 12+ messages in thread
From: Eric Sandeen @ 2009-01-06 18:46 UTC (permalink / raw)
  To: Gergely Soos; +Cc: xfs

Gergely Soos wrote:
> In my original email there was an attachment that contained the original
> boot sector, but anyway, here comes the hexdump Eric asked for:
> 
> 00000000  91 f0 1c 43 90 01 ba bf  f7 ee 29 9a 1e 6c d5 aa
> |.ð.C..º¿÷î)..lÕª|
> 00000010  11 5a 12 cb 3b 29 cb ff  39 ce 4e d3 95 ec b9 39
> |.Z.Ë;)Ëÿ9ÎNÓ.ì¹9|

... actually, you might look for occurences of "XFSB" *before*
/dev/hdd1; I'd suggest looking over /dev/hdd to see if maybe your
partition start point just got hosed.

-Eric

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
       [not found]       ` <b75ef8170901061351madb546flbc1631bc55cd4412@mail.gmail.com>
@ 2009-01-06 21:54         ` Eric Sandeen
  2009-01-06 22:31           ` Gergely Soos
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Sandeen @ 2009-01-06 21:54 UTC (permalink / raw)
  To: Gergely Soos; +Cc: xfs

Gergely Soos wrote:
> That is a good idea, I'm gonna search for the XFSB on the entire disk.
> I will also give PhotoRec a try if nothing else works.
> In the meantime, Eric, you can download the metadata from here:
> http://bluepantherit.net/metadump.bz2
> It would be real nice from you if you would take a closer look.
> 
> And one more thing, xfs_check -s /dev/hdd1 prints the following:
> can't seek in filesystem at bb 58701991023656163
> can't read agfl block for ag 4082146910
> can't seek in filesystem at bb 58702015871605112

... it's basically reading garbage as block numbers, but they are well
past the end of the device, so failing.

Very confused, it is.  :)

-Eric

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 21:54         ` Eric Sandeen
@ 2009-01-06 22:31           ` Gergely Soos
  2009-01-06 22:40             ` Eric Sandeen
  0 siblings, 1 reply; 12+ messages in thread
From: Gergely Soos @ 2009-01-06 22:31 UTC (permalink / raw)
  To: Eric Sandeen, xfs

Eric,
your intuition was absolutely correct. The starting point of my partition
was moved only not up but down 63 sectors (63*512 bytes)
It all makes sense, the whole partition grew 63*512 bytes = 0x7E (126)
inodes that is why I found the root inode on inode 0xFE instead of 0x80.
Now the question remains how the hell should I move it back??
And what kind of an idiot program moves the partition table without any
confirmation? That would kill any filesystem.

Gergely

On Tue, Jan 6, 2009 at 11:54 PM, Eric Sandeen <sandeen@sandeen.net> wrote:

> Gergely Soos wrote:
> > That is a good idea, I'm gonna search for the XFSB on the entire disk.
> > I will also give PhotoRec a try if nothing else works.
> > In the meantime, Eric, you can download the metadata from here:
> > http://bluepantherit.net/metadump.bz2
> > It would be real nice from you if you would take a closer look.
> >
> > And one more thing, xfs_check -s /dev/hdd1 prints the following:
> > can't seek in filesystem at bb 58701991023656163
> > can't read agfl block for ag 4082146910
> > can't seek in filesystem at bb 58702015871605112
>
> ... it's basically reading garbage as block numbers, but they are well
> past the end of the device, so failing.
>
> Very confused, it is.  :)
>
> -Eric
>


[[HTML alternate version deleted]]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 22:31           ` Gergely Soos
@ 2009-01-06 22:40             ` Eric Sandeen
  2009-01-06 22:54               ` Gergely Soos
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Sandeen @ 2009-01-06 22:40 UTC (permalink / raw)
  To: Gergely Soos; +Cc: xfs

Gergely Soos wrote:
> Eric,
> your intuition was absolutely correct. The starting point of my
> partition was moved only not up but down 63 sectors (63*512 bytes)
> It all makes sense, the whole partition grew 63*512 bytes = 0x7E (126)
> inodes that is why I found the root inode on inode 0xFE instead of 0x80.
> Now the question remains how the hell should I move it back??
> And what kind of an idiot program moves the partition table without any
> confirmation? That would kill any filesystem.

Strangely, I've seen this before.  No idea why, or what is doing it.

Hopefully you have saved copies of all the things you edited & dd'd?  So
I'd start by putting those back.

Then you can use a partition editor to move the start of the partition
back where it belongs, I guess.  (w/o seeing where you found the
superblocks, I'm not certain).

Or, if I'm reading you right, do you mean that the first "XFSB" is 63
sectors ahead of the start of hdd1?  If so, then maybe mounting /dev/hdd
(not /dev/hdd1) just works.

-Eric

> Gergely
> 
> On Tue, Jan 6, 2009 at 11:54 PM, Eric Sandeen <sandeen@sandeen.net
> <mailto:sandeen@sandeen.net>> wrote:
> 
>     Gergely Soos wrote:
>     > That is a good idea, I'm gonna search for the XFSB on the entire disk.
>     > I will also give PhotoRec a try if nothing else works.
>     > In the meantime, Eric, you can download the metadata from here:
>     > http://bluepantherit.net/metadump.bz2
>     > It would be real nice from you if you would take a closer look.
>     >
>     > And one more thing, xfs_check -s /dev/hdd1 prints the following:
>     > can't seek in filesystem at bb 58701991023656163
>     > can't read agfl block for ag 4082146910
>     > can't seek in filesystem at bb 58702015871605112
> 
>     ... it's basically reading garbage as block numbers, but they are well
>     past the end of the device, so failing.
> 
>     Very confused, it is.  :)
> 
>     -Eric
> 
> 

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 22:40             ` Eric Sandeen
@ 2009-01-06 22:54               ` Gergely Soos
  2009-01-06 23:09                 ` Christoph Hellwig
  0 siblings, 1 reply; 12+ messages in thread
From: Gergely Soos @ 2009-01-06 22:54 UTC (permalink / raw)
  To: Eric Sandeen, xfs

On Wed, Jan 7, 2009 at 12:40 AM, Eric Sandeen <sandeen@sandeen.net> wrote:

> Gergely Soos wrote:
> > Eric,
> > your intuition was absolutely correct. The starting point of my
> > partition was moved only not up but down 63 sectors (63*512 bytes)
> > It all makes sense, the whole partition grew 63*512 bytes = 0x7E (126)
> > inodes that is why I found the root inode on inode 0xFE instead of 0x80.
> > Now the question remains how the hell should I move it back??
> > And what kind of an idiot program moves the partition table without any
> > confirmation? That would kill any filesystem.
>
> Strangely, I've seen this before.  No idea why, or what is doing it.
>
> Hopefully you have saved copies of all the things you edited & dd'd?  So
> I'd start by putting those back.
>

Fortunately I did. And I copied them back.


>
> Then you can use a partition editor to move the start of the partition
> back where it belongs, I guess.  (w/o seeing where you found the
> superblocks, I'm not certain).
>
> Or, if I'm reading you right, do you mean that the first "XFSB" is 63
> sectors ahead of the start of hdd1?  If so, then maybe mounting /dev/hdd
> (not /dev/hdd1) just works.
>

Unfortunately it's not that simple. Actually that HDD has two partitions and
hdd2 is physically before hdd1 (they are reversed in the partition table),
so I absolutely need to move the start of the partition to the address which
is 63 sectors more than it is now.
Currently it starts at absolute byte position 5132575420 and it should start
at 5132606976.
Do you know what program is capable of doing this? I looked for MBR
documentation and in the partition table it is stored in CHS format
so it would be really hard (at least for me) to do it by hand.

Gergely


>
> -Eric
>
> > Gergely
> >
> > On Tue, Jan 6, 2009 at 11:54 PM, Eric Sandeen <sandeen@sandeen.net
> > <mailto:sandeen@sandeen.net>> wrote:
> >
> >     Gergely Soos wrote:
> >     > That is a good idea, I'm gonna search for the XFSB on the entire
> disk.
> >     > I will also give PhotoRec a try if nothing else works.
> >     > In the meantime, Eric, you can download the metadata from here:
> >     > http://bluepantherit.net/metadump.bz2
> >     > It would be real nice from you if you would take a closer look.
> >     >
> >     > And one more thing, xfs_check -s /dev/hdd1 prints the following:
> >     > can't seek in filesystem at bb 58701991023656163
> >     > can't read agfl block for ag 4082146910
> >     > can't seek in filesystem at bb 58702015871605112
> >
> >     ... it's basically reading garbage as block numbers, but they are
> well
> >     past the end of the device, so failing.
> >
> >     Very confused, it is.  :)
> >
> >     -Eric
> >
> >
>
>


[[HTML alternate version deleted]]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 22:54               ` Gergely Soos
@ 2009-01-06 23:09                 ` Christoph Hellwig
  2009-01-06 23:26                   ` Gergely Soos
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2009-01-06 23:09 UTC (permalink / raw)
  To: Gergely Soos; +Cc: Eric Sandeen, xfs

On Wed, Jan 07, 2009 at 12:54:52AM +0200, Gergely Soos wrote:
> Unfortunately it's not that simple. Actually that HDD has two partitions and
> hdd2 is physically before hdd1 (they are reversed in the partition table),
> so I absolutely need to move the start of the partition to the address which
> is 63 sectors more than it is now.
> Currently it starts at absolute byte position 5132575420 and it should start
> at 5132606976.
> Do you know what program is capable of doing this? I looked for MBR
> documentation and in the partition table it is stored in CHS format
> so it would be really hard (at least for me) to do it by hand.

If you want to mount the partitions once you can creat a loop device
ontop of you disk device and use the -o option, e.g.


losetup -o 5132606976 /dev/loop0 /dev/hdd1

and then mount /dev/loop0.  But that's not really something I'd want
to use for a longer time..

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: need help to repair XFS partition
  2009-01-06 23:09                 ` Christoph Hellwig
@ 2009-01-06 23:26                   ` Gergely Soos
  0 siblings, 0 replies; 12+ messages in thread
From: Gergely Soos @ 2009-01-06 23:26 UTC (permalink / raw)
  To: Christoph Hellwig, Eric Sandeen, xfs

I want to thank everybody for the help, especially for Eric.
The solution was:
fdisk /dev/hdd
then go to expert mode (x)
print the partition table (p)
move the beginning of the partition (b) - where I increased the start number
by 63
write to disk and exit (w)
Reboot and everything is fine.
I'm so happy :)

Gergely

PS: I made a typo in my previous letter. Instead of 5132575420 I should have
written 5132574720 in case anybody wonders...

On Wed, Jan 7, 2009 at 1:09 AM, Christoph Hellwig <hch@infradead.org> wrote:

> On Wed, Jan 07, 2009 at 12:54:52AM +0200, Gergely Soos wrote:
> > Unfortunately it's not that simple. Actually that HDD has two partitions
> and
> > hdd2 is physically before hdd1 (they are reversed in the partition
> table),
> > so I absolutely need to move the start of the partition to the address
> which
> > is 63 sectors more than it is now.
> > Currently it starts at absolute byte position 5132575420 and it should
> start
> > at 5132606976.
> > Do you know what program is capable of doing this? I looked for MBR
> > documentation and in the partition table it is stored in CHS format
> > so it would be really hard (at least for me) to do it by hand.
>
> If you want to mount the partitions once you can creat a loop device
> ontop of you disk device and use the -o option, e.g.
>
>
> losetup -o 5132606976 /dev/loop0 /dev/hdd1
>
> and then mount /dev/loop0.  But that's not really something I'd want
> to use for a longer time..
>


[[HTML alternate version deleted]]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-01-06 23:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-06  9:11 need help to repair XFS partition Gergely Soos
2009-01-06  9:27 ` Chris Wedgwood
2009-01-06 16:06 ` Eric Sandeen
2009-01-06 18:04   ` Gergely Soos
2009-01-06 18:40     ` Eric Sandeen
2009-01-06 18:46     ` Eric Sandeen
     [not found]       ` <b75ef8170901061351madb546flbc1631bc55cd4412@mail.gmail.com>
2009-01-06 21:54         ` Eric Sandeen
2009-01-06 22:31           ` Gergely Soos
2009-01-06 22:40             ` Eric Sandeen
2009-01-06 22:54               ` Gergely Soos
2009-01-06 23:09                 ` Christoph Hellwig
2009-01-06 23:26                   ` Gergely Soos

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.