Recovering a GEOM RAID0 array
Juan Miscaro
jmiscaro at gmail.com
Tue Mar 31 08:21:49 PDT 2009
2009/3/31 Ivan Voras <ivoras at freebsd.org>:
> Juan Miscaro wrote:
>
>>> It looks like you created a both a fdisk partition table and a bsdlabel
>>> partition table on the ad3 drive. If so, your data is probably already
>>> corrupted.
>>
>> What is a generic configuration? Or can you explain how you come to
>> that conclusion?
>
> RAID 0 means striping data across N drives (2 in your case), with a
> fixed stripe size. From the information in kern.geom.confxml (which is
> why gstripe list should work), your stripe size is 4 kB, which is good
> for this purpose. This kind of setup is usually done with raw drives,
> i.e. with GEOM_STRIPE: "gstripe label st0 ad1 ad3". After this, your
> array is called stripe/st0 - this is where you create the file system,
> etc. "Striping" means that each drive contains only a part of the data.
> E.g. if you write 8 kB to the start of your array, the first 4 kB will
> be written to ad1, the next 4 kB to ad3. Both smaller and larger
> requests are handled logically. This means that the first sector on ad1
> contains the partition table of your array, if you partitioned it (and
> it looks like you did). The first sector of ad3 contains whatever data
> is at position 4096 in your array - probably nothing important because
> your partitions start at 32 kB - 512.
>
> If you wrote only the partition table to ad3 then it's not a big deal -
> it's useless but it may not corrupt anything important. If you proceeded
> to to something else on ad3, then there could be problems.
>
>>> ad1 is also strangely partitioned but since it's your first drive in a
>>> stripe this can be acceptable (it will contain the first sectors of the
>>> array, including its partition tables).
>>>
>>>> # gstripe dump ad3
>>>> Can't read metadata from ad3: Invalid argument.
>>>> Not fully done.
>>> This can happen if the metadata on ad3 is corrupted. You'll need to dump
>>> the last sector and inspect it to verify.
>>
>> I've never done that before. Can you be explicit?
>
> Using information from your previous posts, you should do this:
>
> # dd if=/dev/ad3 of=ad3last count=1 skip=625142447
> # hd ad3last
>
>
Thanks for that great explanation.
The file ad3last.txt is attached.
--
jm
-------------- next part --------------
00000000 24 47 41 46 52 10 41 08 00 00 00 00 00 00 00 00 |$GAFR.A.........|
00000010 00 00 00 00 00 00 00 00 00 00 6f e2 42 25 00 00 |..........o�B%..|
00000020 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 26 30 36 2f 32 37 2f 32 30 30 36 2d 50 34 4d 38 |&06/27/2006-P4M8|
00000110 30 30 50 72 6f 2d 38 32 33 2d 36 41 37 4c 36 47 |00Pro-823-6A7L6G|
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
More information about the freebsd-questions
mailing list