----- Original Message -----
From: "Dave Howorth"
Carlos E. R. wrote:
The Monday 2008-04-21 at 10:01 +0100, Dave Howorth wrote:
from any one disk, if the disks and/or partitions are different from each other, then do the following for each & every disk :
mybox:~ # fdisk -ul /dev/loop0
This is where it gets sad :( I have two identical disks and the images are wrapped up as loop1 and loop2:
# fdisk -ul /dev/loop1 # fdisk -ul /dev/loop2
Disk /dev/loop2: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes
Disk /dev/loop2 doesn't contain a valid partition table
So the first one produced no output. That may not be surprising because that's the one that is believed to be faulty, so we don't know how much data in the image is valid, if any.
Is this a linux software raid 1?
No, it's a fake raid 0 :( Specifically, isw : (+) Intel Software RAID
Ahhh, yeah, you have the worst of both worlds there. Sorry to hear that. As you say, "now you know" the hard way.
Software raid is fine, requires more foo to use, but you can do anything and you never care what kind of controller you happen to have today or used to have yesterday. As per this thread, you don't even need any controller as it can all be manipulated in ram or as files.
Hardware raid is fine, far less flexable in that the only way to access an array is with the same brand, family, and type of card that created it, but generally effortless to use and generally far more robust as well.
But with fake raid you get the worst of both worlds and the benefits of neither.
Well, one slight benefit from each. The low cost of software raid and the ability to boot from raid0.
It may actually still be possible to assembly your array, but may require more exotic surgery than the simple commands I showed.
Ultimately, most raids, hardware and software and fake, are all pretty much the same. If you happen to know the exact layout of the array, how large the stripes were, it should be possible to do this:
mdadm -B -l 0 -n 2 -c 64 --assume-clean /dev/md3 /dev/loop0 /dev/loop1
Where 64 is the stripe size in kbytes, and the loop devices are for the full disk images. (since you had fake raid, then the full disk image is the correct and only kind of image to collect after all. The partitions will only be visible from within the assembled array. That command assumes the array was a raid0 with 2 drives
If you don't remember what the stripe size was, maybe you can google up the default for that motherboard, bios, version, and maybe you never changed it?
If you are careful not to write to the array, then you can safely just try several common stripe sizes. 32K 64K 128K etc... try 64, then try to read the partition table within the array:
fdisk -ul /dev/md3
or
sfdisk -l /dev/md3
If it produces junk or nothing, then just stop the current array and rerun the mdadm -B with -c 128 and try sfdisk -l again.
mdadm -S /dev/md3
mdadm -B -l 0 -n 2 -c 128 --assume-clean /dev/md3 /dev/loop0 /dev/loop1
If you ever get a meaningful looking partition table listing, then you can try read-only mounting a filesystem:
Create a loop device to one of the partitions similar to what I described before,
losetup -o