I have an old RAID 5 array that was comprised of three 320 GB IDE Western Digital drives. Currently one of the old drives is completely toast, an another is questionable. I have a full image of the questionable drive (299 GiB) that I dd'd, and I have the third drive that is still working. My goal is to get mdadm to assemble the array in a degraded state, long enough for me to copy all the data that is still on there somewhere else.
I started with dd'ing an full image of the questionable drive to an image file:
Quote:
# dd if=/dev/sdp of=/home/drive.img
|
Then I mounted the image file via losetup:
Quote:
# losetup /dev/loop0 /home/drive.img
|
Attempting to now use /dev/loop0 in the assembly yeilds this:
Quote:
# mdadm -A /dev/md17 /dev/sdp1 /dev/loop0
mdadm: no RAID superblock on /dev/loop0
mdadm: /dev/loop0 has no superblock - assembly aborted
|
After that I realized that I dd'd the entire drive not just the main partition. So using fdisk to find out the partition table yeilds this:
Quote:
# fdisk -l /dev/loop0
Disk /dev/loop0: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/loop0p1 1 38913 312568641 fd Linux raid autodetect
|
Seemingly normal and all is working so far. So trying to assemble the array with the following also fails:
Quote:
# mdadm -A /dev/md17 /dev/sdp1 /dev/loop0p1
mdadm: cannot open device /dev/loop0p1: No such file or directory
mdadm: /dev/loop0p1 has no superblock - assembly aborted
|
Any suggestions? I know it would be a lot easier to hook both drives up and attempt to start the degraded array that way, but the server I'm working with has no IDE channels, and I only have one USB adapter.
Thanks in advance for any help