•  
Reply
Frequent Advisor
dudemanbubba
Posts: 49
Registered: 01-04-2010

HOWTO: Sharespace RAID 5 Data Recovery

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

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. 

 

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

 

I hope this helps anyone else out that has as much precious data as I did that was feared lost!

 

Good luck!

Respected Contributor
cuernudo
Posts: 725
Registered: 11-03-2011
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

WOW, nice tutorial, saving this just in case and thank you for sharing...

Frequent Advisor
matt_klein
Posts: 44
Registered: 01-13-2011
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

Wow, thank you VERY much for this tutorial! It will save the community thousands of dollars to data recovery services (which is the standard "solution" of the WD support to this problem).

This community has asked WD countless times to provide this kind of tutorial - to no avail.

 

Now you did what WD could not do.

 

I can' thank you enough! :smileyhappy:

 

Occasional Visitor
stnicolas
Posts: 1
Registered: 03-01-2012
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

Thanks a lot

I followed your instructions and it worked perfectly!

My WD ShareSpace was inaccessible after a firmware update and was getting very worried about my data!

Frequent Advisor
dudemanbubba
Posts: 49
Registered: 01-04-2010
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

Awesome!  Glad I could help! 

Advisor
Cyberblitz
Posts: 19
Registered: 03-02-2012
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

[ Edited ]
Hey, I'm Little confused about the LVM2 structure on WD ShareSpace?! I have a working system at the moment to explore the file system LIVE to aid with my recovery but three is no LVM structure to be found.. Every LVM scan command to scan the drives reveals there isn't one.. This should not matter whether the system is LIVE or not.. I think this is why I couldn' t recover my data following your method.. Whats your thoughts??
Frequent Advisor
dudemanbubba
Posts: 49
Registered: 01-04-2010
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

I unfortunately and not a wiz kid on LVM... you can see from my tutorial that my info on it is limited.  I believe I referred to it as "LVM or something...".  Regardless, I don't have a system here to tinker with anymore.  For others who may know, are you getting anything from the vgscan output?

 

You may want to look through the links that I included credits for near the beginning of my initial post.  There is a lot more detailed information about the partition tables and structure in that link that may be of help to you.  I simply parsed out a step by step method that worked for me.

 

Also, did you attempt it more than once?  My system froze up during the file copy when I was transferring the data off the drives.  It had been copying for a couple days if memory serves and got hung up at some point.  My luck was good that day since the copy crapped out after all of my necessary data had been copied over.  When I rebooted and tried the same sequence, it no longer worked.  I am not sure if it did something to the drive formatting but I got to the same point and was getting no result from the vgscan.  I gave up and considered myself lucky for getting the data I needed off the drives.

 

Keep us posted.  Good luck!

Advisor
Cyberblitz
Posts: 19
Registered: 03-02-2012
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

Well, I've been instructing myself on how LVM can be implemented on systems, if you so wish.. And from my understanding, it makes absolutely no sense having an LVM file structure on the ShareSpace.. If you had more than one RAID structures you could combine them both to form one drive, or if you had a RAID structure and several spare HDDs, you could also combine them to form one drive and change the amount of space you require on the fly (except changing the RAID structure of course). You can create one directory using LVM over several drives too, it's very dynamic.. And, you don't even need a RAID structure either to do the same thing... These types of file structures seem useless in the ShareSpace, particularly when the RAID 5 has already combined the drives to create a file structure; it seem useless applying LVM on top of this to perform exactly the same thing...
Visitor
gadgetgirl63
Posts: 3
Registered: 03-17-2012
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

Hi

would it work using a USB to USB from the WD sharespace? I can see each HD through a single dock that i have connected to my pc. the only system i have come by is 4 Bay eSATA USB 2.0 to SATA Hard Drive Docking Station for 2.5/3.5-Inch HDD witch is quite expencive / this migth work.

is there a command where i can copy my /dev/sda4 (eg) to the local drive om my laptop one at a time and then assemble them after?

hope you can help

regards Gadgetgirl63

Frequent Advisor
dudemanbubba
Posts: 49
Registered: 01-04-2010
0

Re: HOWTO: Sharespace RAID 5 Data Recovery

It would be my recommendation to try and leave the drives as they are.  Trying to copy partitions may work but my tutorial is strictly to rebuild the array as it stood in the ShareSpace.  You only need to connect three of the drives if you had a four drive raid 5 in order to get the files off.  The nature of the raid 5 is that you have one drive redundancy so one of them can be omitted for the purpose.  I recommend trying to find a way to connect all drives simultaneously either with three separate docks or the one four bay you listed.

 

You just need to get the drives connected to a PC where they will come up as devices in the dev folder.  I have not seen anyone successfully copy partitions over to another drive and then reassemble the raid from a copied partition.

 

Most people have at least one PC connected to their network and Sharespace.  In this day, most should have a sata controller.  If you have one, I highly recommend you just disconnect the existing drives and temporarily connect the SS drives to it.

Forums | Ideas | News and Announcements | Register | Sign in | Help | Forum Guidelines
Copyright © 2001 - 2010 Western Digital Corporation, All rights reserved. | Trademarks | Privacy | Terms of Service | Terms of Use | Copyright | Contact WD