Well… I am hesitant to say, but it appears that I have sucessfully rebuilt the raid 5 array using a computer and a Ubuntu LiveCD. I am currently transferring the files off of the drives onto my new storage and will take some time as it is around 2.3 TB worth. Once the transfer is done, I will spend the time to retrace my steps and prepare a more complete and informative tutorial.
I know that I am not the only one with this issue. I can’t understand why WD hasn’t addressed this. It had been many weeks since this firmware came out and started bricking units. I, unfortunately, did not look at this forum prior to my applying the firmware update. This had to have been a known issue for WD by the time my unit downloaded the firmware and ruined my device. Why would they not take it down?
I need to give credit to this link: http://www.linuxjournal.com/article/8874?page=0,1 The info there was invaluable!
You will need a computer with a CD rom drive or usb port to use an Ubuntu bootable jump drive and a hard drive controller capable of handling the number of drives you have. It doesn’t have to be anything fancy and can even be a system you already have sitting around. I had to go and buy a four port serial ATA card for $25 at compusa to plug into an old system I had. No biggy, I guess. You need to remove the drives from the Sharespace and label them in order from top to bottom. Attach them to your temporary computer disk controller making sure that you attach them in the same order by adding one at a time, booting and checking the system or controller bios, which ever is applicable. I recommend you disconnect any other drives from the controller if you are using a functioning system with other existing drives. You should really be able to do this without effecting the existing system as you should be able to just plug the existing drives back in when you are done. I am using my network to transfer the files off of the drive onto my new system. Perhaps you could use an external usb drive and would be faster, but may muck up the drive numbering in Ubuntu. If you use an external USB drive, I recommend waiting and plugging it in after you have the raid rebuilt. Note that booting to the LiveCD creates a temporary session of linux and anything you do in that session in terms of configuration is lost on reboot. If you need to reboot for any reason, you will effectively have to restart.
Once you have the drives from your worthless WD box attached to the temporary computer properly, boot up using the LiveCD and click on the “Try Ubuntu…” to load the operating system. Once the system is loaded, you will need to load a terminal shell by clicking on Applications->Accessories->Terminal.
To set yourself as the roof user and not have to type “sudo” 1000 tims, once in terminal, type:
sudo su -
You will need to install the raid softward and LVM2 to access the drive partitions. Type:
apt-get install mdadm lvm2
If the drives are connected properly, they should be the devices as follows:
Drive 1: /dev/sda
Drive 2: /dev/sdb
Drive 3: /dev/sdc
Drive 4: /dev/sdd
You can check this by typing fdisk -l and it will list the drives and associated partition information. Each of my drives had four partitions on them and are labeled sda1. sda2, sda3, sda4 for drive 1 and sdb1, sdb2, etc. for the subsequent drives.
Only the fourth partitoin sdx4 is the one with the data and you need to recreate that raid array. You do this by typing:
mdadm --assemble /dev/md0 /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sdd4
You should get a message that the raid is functioning. You can check the status by typing:
mdadm --detail /dev/md0
and
cat /proc/mdstat
Your raid is now reassembled, but the WD uses lvm2. If you try to use the standard mounting with autodetect you will get an error of unknown fs type LVM2 something or other. This is where it gets tricky and I need to go back and recreate to know the exact steps. You need to use the utilities from LVM2.
To get the volume name type:
vgscan
The volume on yours should be the same. Mine was called “vg0”
Then type:
vgchange vg0 -a y
You should get a message telling you that your logical volume is active. From here you only need to mount the drive to the file system. My logical volume was called “lvo”
First create a directory to mount to by typing:
mkdir /mnt/raid
I am not sure if this is necessary, but I went ahead and completely opened up the permissions to the folder by typing:
chmod 777 /mnt/raid
Then mount the drive to that folder by typing:
mount -t auto /dev/vg0/lv0 /mnt/raid
Your files should now be accessible through the file browser. Go to Places->Computer, then click on “File System” on the left. Then, navigate to the mnt/raid folder in the main window. I found that there were strange permissions on my files so I went ahead and removed all restrictions using the chmod on the raid drive by typing the following into the terrminal window:
chmod 777 -R /mnt/raid
As I said, I am currently dumping the files onto my new system as I type. I wil go back and clean this tutorial up when I get done and possibly add some images, etc.
Hope this helps someone else out! What a nightmare WD provided me. :smileyvery-happy: