Search Amazon.com:
Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
  • Post
  • Reply
Laconicus
Sep 12, 2003


Background:

I have two 250GB IDE hard drives, which were originally contained within a failed LaCie external USB drive. The drives themselves seem fine, and are fully accessible, just the hardware that made them appear as one, and provided USB connectivity has failed.

From viewing the raw data on the disks, it'd appear that they were simply spanned by the drive hardware (nothing fancy like striping or anything), and I've succeeded in recovering a lot of files that were contained solely on the first drive which has the partition table, NTFS partition header etc. on it.

Question:

I'd really like to be able to recover data that's stored on either disk and have been looking at the software RAID options in Linux. It seems that if I were to create a "linear" RAID drive with mdadm, with no superblocks, this may just allow the system to read the whole drive, without making any changes to the data on disk (which I really want to avoid since I may at some point obtain a replacement for the original drive hardware that failed).

Does this seem a likely possibility, and will this configuration (especially the no-superblock setting) prevent any changes being made to the disks? If not, does anyone have any suggestions as to alternatives I could try?

Adbot
ADBOT LOVES YOU

Laconicus
Sep 12, 2003


marcan posted:

The best thing to do in these cases is a test with dummy data. I've created two random data files, set them up as loopback devices, RAIDed them (linear mode, no superblocks), and dumped the RAID device out to a file. The resulting file is identical to "cat data1 data2", so it should work for you.

Here's the mdadm command to set up the array (substitute your own device files):
code:
mdadm --build /dev/md0 -c 4 -l linear -n 2 /dev/loop0 /dev/loop1
This doesn't touch the hard drives. Mount the result read-only (you're probably doing that already, since it's NTFS). If anything goes wrong, you can simply tear apart the array and start over - no data should have changed.

EDIT: You mentioned the first drive has a partition table. You'll need to set up your RAID devices as partitionable then:
code:
mdadm --build /dev/mdp0 -a p -c 4 -l linear -n 2 /dev/loop0 /dev/loop1
You'll get your first partition in /dev/mdp0p1.

This was semi-successful - it created the /dev/md0 device fine but didn't seem to take any notice of the partition table, resulting in no /dev/md0pX devices being created, and hence I was unable to mount the drive.

Laconicus
Sep 12, 2003


marcan posted:

Try naming it /dev/mdp0, and make sure you use -a p when building the array with mdadm. Partitions will be named /dev/mdp0pX

Also, you need to have kernel 2.6 to get partitionable arrays.

I typed the command exactly as given first time around, and it rejected the "mdp0" (couldn't create device or words to that effect), removing the "p" and it worked. (I'm using SLAX 5.1.8).

I also tried all the other "-a XXX" partitionable variants (XXX = "p","mdp","part"), but none of them made the partition available. Even tried partprobe, but it complained that it was "unable to notify the kernel" that the new partition was available.

I think I may just buy a new external drive and byte-by-byte copy everything over.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply