3

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?

Aaron C. de Bruyn
  • 578
  • 10
  • 28

1 Answers1

8

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.

Turbo J
  • 503
  • 2
  • 8
  • 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