I managed to rebuild the raid 5 array using a computer and a Ubuntu LiveCD after the Sharespace unit was bricked after a firmware update. Even if you are not very computer savvy, this tutorial tries to be very straight forward. Probably the most difficult part is physically attaching the drives correctly in the right order on the temporary machine.
I need to give credit to this link: http://www.linuxjournal.com/article/8874?page=0,1 The info there was invaluable!
You can go to the Ubuntu website and download a Live CD image that can be burned either to a DVD or a usb jump drive. Go to Ubuntu Download Page. There are instructions and links on how to burn and create the bootable media.
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 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 root 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 (you will need to answer “Y” to some questions when asked)
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
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.
To get the volume name type:
The volume on yours should be the same. Mine was called “vg0”
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:
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
I hope this helps anyone else out that has as much precious data as I did that was feared lost!