Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a failed hardware RAID card. This card had two drives in a RAID-1 mirror. Plugging one of the drives into the motherboard shows no partition table. Using a program like testdisk, I can see the partition table starts 32 blocks into the drive. Apparently the hardware RAID card uses the first 32 blocks for storing its config.

I can display the starting offset of a drive like so:

root@nas1:~# hdparm -g /dev/sdc
/dev/sdc:
 geometry      = 974/255/63, sectors = 15649200, start = 0

...but I can't seem to find a way to tell it to start at 63 blocks instead of 0. If the OS starts reading at 63, it will see the partition table.

Is that even possible under Linux?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted
+50

You can use losetup for accessing the filesytems, using --offset and --sizelimit (optional) parameters. Just remember that you have to give it bytes. That means offset = 512 * sector.

Another idea is to copy the partition table to sector 0, but you will probably need to adjust the sector numbers.

share|improve this answer
    
Sorry for the delay in accepting this answer, it took Areca nearly 2 months to RMA the damn card so we could test with it. losetup with --offset works perfectly. –  Aaron C. de Bruyn Jun 23 '11 at 20:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.