Recovering data from WDMyBook 1 of 2 spanned HDDs using SystemRescueCD
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Recovering data from WDMyBook 1 of 2 spanned HDDs using SystemRescueCD
I have a dead Western Digital MyBook World Edition (1TB) that contained two 500GB WD HDDs, arranged as a "large, spanned single volume" (from manual). I think that this is a different configuration than RAID0.
As far as I can tell, the MyBook was a linux NAS device running software RAID.
The set was only 10-20% full, and -- to make a long story short -- I formatted the second disk NTFS for use in another system. But before I did, I had a look at the drives and it looked a lot like all the data was on the first disk and none on the second.
I have plugged those two disks into two of my motherboard's SATA ports.
There are several partitions on the first disk (ext2, swap, etc.) which are small (and contain the MyBook linux OS) and the 4th one is large, and it's the one I want.
I've tried mounting it as ext2(?) and could see the root directory, but when I cd'd into a directory I made containing many of my files, I got I/O errors (but the only thing I have done is reformat the second disk, there never was any indication that the disks were failing). I think that RAID0 splits the data across the two disks and the failure of one disk would be fatal, but at least the root directory of the filesystem is ok, and before I formatted, it appeared as if all the data was on the first disk.
I think mdadm is the tool I need to use to mount this and get the data off of it, but I don't know how to do it. I'm running a very recent download of SystemRescueCD but mdadm complains that it is missing a config file. If I need to create one, is any part of the SystemRescueCD filesystem writable, and what is the format that mdadm expects?
I still have the second disk, but it is now formatted NTFS and has important data on it.
Can anyone tell me how to make mdraid (or any other tool, if someone has a better idea) mount that partition (without needing the other disk) so I can get the data off of it?
This is the mdadm conf that was on the first partition of the first disk (md1) in /etc/mdadm.conf:
DEVICE partitions
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=100744ac:8daed8d8:e33c8903:2a1dd289
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=3ba0da27:8c1dbe15:d50ede47:9da0719e
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=6033e7ea:335bedb8:a0355b94:c2da9ea1
ARRAY /dev/md4 level=linear num-devices=2 UUID=5111b311:ed5b8b90:fe2517fd:e0600c7b
I figured out enough to run:
mdadm -A /dev/md4 -v -v -s -R
and I got a log, with this at the end:
mdadm: /dev/sdb4 is identified as a member of /dev/md4, slot 0.
mdadm: no uptodate device for slot 1 of /dev/md4
mdadm: added /dev/sdb4 to /dev/md4 as 0
mdadm: failed to RUN_ARRAY /dev/md4: Invalid argument
mdadm: Not enough devices to start the array.
running again will produce:
mdadm: device /dev/md4 already active - cannot assemble it
trying to mount: mount /dev/md4 /mnt/data
mount: you must specify the filesystem type
trying to mount as ext2: mount /dev/md4 /mnt/data -t ext2
mount: wrong fs type, bad option, bad superblock on /dev/md4
file -s /dev/md4:
empty (or something like that)
so how do I convince mdadm to mount a linear array of 2 disks when the second disk is missing/has been overwritten?
I ran blkid and the output looked as expected, and copied to a file, but it seems I copied the blkid executable to my flashkey and not its output, so I can't post the output right now, will do so as soon as I can.
md3 : active raid1 sdb3[0]
987904 blocks [2/1] [U_]
md2 : active raid1 sdb2[0]
104320 blocks [2/1] [U_]
md1 : active raid1 sdb1[0]
2939776 blocks [2/1] [U_]
unused devices: <none>
Note that the [linear] personality is not loaded. So when I'm next on the PC with the disk in question, I will try:
modprobe linear
and see how far I get.
I've also tried LinuxRecovery, explore2fs, and RLinux with no success (it shows a lot of tiny files) -- but loading the linear personality for md seems to be the best bet.
Thankyou. I'll let you and posterity know how this goes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.