Brian K. White wrote:
Am Donnerstag, 17. April 2008 16:06 schrieb Dave Howorth:
Is it possible to use dmraid with files rather than physical devices? I've made copies with dd of two RAID0 disks as files. Is there any way to access the contents of the RAID or do I need to copy them onto other physical disks first?
What you want is called a loop device in linux. (other os's call it a file-backed ram disk) losetup is your friend here.
Brian, thanks for this - and thanks also to Philipp who made the same suggestion. But you went above and beyond with your detailed reply! :)
<snip> Now, that assumed the disk images were actually partition images, which I'm guessing you didn't think to collect but instead collected images of the full raw disks,
You had me going there, but you're still thinking ahead of me. That is indeed what I did.
such that each file contains the boot block, partition table and multiple partitions all in one file. In that case it's a bit trickier.Then you have to collect the offsets of the different partitions and use them with the -o offset option to losetup, or extract the partitions into new fils with dd and the same offset numbers. Assuming all three disk images are exactly the same sizes and have exactly the same size partitions, collect the numbers 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. The source machine is dual boot. Vista (spit!) boots fine and works to a first approximation, though it reports a hard disk fault. Suse boots into single user mode, saying that it can't assemble the raid. I know next to nothing about this type of 'raid', except not to use it! But I guess that means the start of the first disk is lost. Thanks again for the very clear, comprehensive guide! Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org