Steve Lord schrieb:
>
> On Thu, 2001-11-08 at 09:38, Arkadiusz Miskiewicz wrote:
> > Hi,
> >
> > Recently I've crashed both partition tables (1 and 2 copy).
> > My setup was:
> > start end
> > hda1 0.031 10001.250 fat
> > 10001.404 29313.918 extended lba
> > hda5 10001.435 20002.807 xfs
> > hda6 20002.838 20198.913 swap
> > hda7 20198.944 20598.969 ext2
> > hda8 20599.000 23603.312 xfs
> > hda9 23603.344 29313.918 lvm
> > (values in MB as shown by parted)
> >
> > Now I'm trying to recover xfs partitions. Unfortunately
> > I can't create exactly same partition with same positions
> > as previously. Now fdisk, cfdisk, parted always create
> > partition like this:
> >
> > 2 10001.250 20002.992 primary
> > (rounding to cylinder?)
> >
> > So I'm trying to use xfs_repair (1.2.0) on such (not exacly
> > same as in original) partition but.
> >
> > xfs_repair -n /dev/hda2
> > Phase 1 - find and verify superblock...
> > bad primary superblock - bad magic number !!!
> > ......................................
> > ...
> > attempting to find secondary superblock...
> > nable to verify superblock, continuing...
> > ...
> >
> > It found more than 5 backup superblocks but it was
> > unable to verify all superblocks.
> >
> > Any hints how to recover data from these partitions?
> >
> > i686, 2.4.13, xfs-20011026
> > --
> > Arkadiusz MiÅ?kiewicz, AM2-6BONE [ PLD GNU/Linux IPv6 ]
> > http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/ [ enabled ]
>
> You really need to get the partition back to exactly the same blocks
> it used to be at - and that is your problem here, unless you have
> partition table output which is in sector format, getting the same
> ones back again is really hard. You could look at the raw disk for the
> xfs superblock, this is placed in sector zero of the partition,
> so it would be a good indication of the sector you need the partition
> to start at.
Try to find the start and end of every partition, use dd to dump each of
them in separate files and mount them as loop device. This way you don't
change anything on the disk until you have recovered all data.
-Simon
> The superblock starts with the string XFSB, so dumping the disk out
> you would see something like this:
>
> od -c /dev/hda | more
> 0000000 ú ë | l b a L I L O 001 \0 025 004 Z \0
> 0000020 \0 \0 001 ã S 024 S ; 030 002 200 y 001 031 002 200
> 0000040 y 001 027 002 200 y 001 001 \0 \0 \0 \0 \0 \0 \0 033
> 0000060 002 200 y 001 \a 001 200 G 001 \b 001 200 G 001 \t 001
> 0000100 200 G 001 \n 001 200 G 001 \v 001 200 G 001 \f 001 200
> 0000120 G 001 \r 001 200 G 001 016 001 200 G 001 017 001 200 G
> 0000140 001 020 001 200 G 001 021 001 200 G 001 \0 \0 \0 \0 \0
> 0000160 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 ¸
> 0000200 Ã? \a 216 Ã~ 214 006 z \0 211 6 x \0 211 036 | \0
> 0000220 210 026 ~ \0 ¸ \0 232 216 � ¹ \0 001 ) ö ) ÿ
> 0000240 ü ó Â¥ ê ¨ \0 \0 232 216 Ã~ ¸ \0 220 216 Ã?
> ¼
> 0000260 \0 ° û ° \r è i \0 ° \n è d \0 ° L
> è
> 0000300 _ \0 ¾ 4 \0 h \0 \v \a 1 �  221 ¬ ¨ `
> 0000320 u 017 N  211 Ã, \t Ã^ t 034 ¬ ´ 002 Ã? 023 ë
> 0000340 016 210 Ã,  ö Ã, u 002 0 ä 227 è ; \0 r
> 0000360 017 200 Ã? 002 ë Ã* ° I è & \0 ê \0 \0 \0 \v
> 0000400 ° è 034 \0 è 006 \0 1 � � 023 ë ´ �
> Ã?
> 0000420 004 è 003 \0 � � 004 $ 017 004 0 < : r 002 004
> 0000440 \a P 0 ÿ ´ 016 Ã? 020 X Ãf V Q S 210 Ã? 200
> 0000460 â 217 ö Ãf @ u 3 » ª U ¸ \0 A Ã? 023 r
> 0000500 ) 201 û U ª u # ö � 001 t 036 [ Y 036 1
> 0000520 ö V V W Q 006 S j 001 j 020 211 æ 026 037 ¸
> 0000540 \0 B � 023 215 d 020 037 ë D [ Y S R W Q
> 0000560 006 ´ \b � 023 \a r 8 Q � é 006 206 é 211 �
> 0000600 Y 210 ð þ � 200 á ? ö á 226 X Z 9 ò s
> 0000620 # ÷ ö 9 ø w 035 � ä 006 206 à 222 ö ñ
> þ
> 0000640 Ã? \0 â 211 Ã? Z [ 206 ð ¸ 001 002 Ã? 023 ^ Ãf
> 0000660 Y _ ë 002 ´ @ \0 \0 \0 \0 \0 \0 \0 \0 200 001
> 0000700 001 \0 203 þ ? A ? \0 \0 \0 203 - 020 \0 \0 \0
> 0000720 001 B 005 þ ÿ ÿ Ã, - 020 \0 Ã? 002 ! 001 \0 \0
> 0000740 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
> 0000760 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 U ª
> 0001000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
> *
> 0077000 X F S B \0 \0 020 \0 \0 \0 \0 \0 \0 002 005 °
> 0077020 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
> 0077040 ~ ì 034 024 z 004 021 Ã* 222 Ã? ú B 200 $ ì Ã?
> 0077060 \0 \0 \0 \0 \0 002 \0 004 \0 \0 \0 \0 \0 \0 \0 200
> 0077100 \0 \0 \0 \0 \0 \0 \0 201 \0 \0 \0 \0 \0 \0 \0 202
> 0077120 \0 \0 \0 020 \0 \0 @ ¶ \0 \0 \0 \b \0 \0 \0 \0
> 0077140 \0 \0 004 ° 204 002 \0 001 \0 \0 020 / b o o
> 0077160 t \0 \0 \0 \0 \0 \0 \0 \f \t \b 004 017 \0 \0 031
> 0077200 \0 \0 \0 \0 \0 \0 \0 200 \0 \0 \0 \0 \0 \0 \0 @
> 0077220 \0 \0 \0 \0 \0 001 Ã? Ã? \0 \0 \0 \0 \0 \0 \0 \0
> 0077240 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
> 0077260 \0 \0 \0 \0 \0 \0 \0 002 \0 \0 \0 \0 \0 \0 \0 \0
> 0077300 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
> *
> 0100000 X A G F \0 \0 \0 001 \0 \0 \0 \0 \0 \0 @ ¶
> 0100020 \0 \0 \0 001 \0 \0 \0 002 \0 \0 \0 \0 \0 \0 \0 001
> 0100040 \0 \0 \0 001 \0 \0 \0 \0 \0 \0 \0 \b \0 \0 \0 \v
> 0100060 \0 \0 \0 004 \0 \0 023 233 \0 \0 \v ï \0 \0 \0 \0
> 0100100 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
>
> Here you see the superblock, followed by the AGF structure.
>
> Best of luck
>
> Steve
>
> --
>
> Steve Lord voice: +1-651-683-3511
> Principal Engineer, Filesystem Software email: lord@xxxxxxx
|