LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Use Fedora to recover data on hard drives from a WD ShareSpace 4TB NAS? (http://www.linuxquestions.org/questions/linux-software-2/use-fedora-to-recover-data-on-hard-drives-from-a-wd-sharespace-4tb-nas-854458/)

IslandTech 01-05-2011 04:58 PM

Use Fedora to recover data on hard drives from a WD ShareSpace 4TB NAS?
 
My sister-in-law (SIL) has a Western Digital ShareSpace 4TB network access storage that was setup in a RAID 5 configuration (four 1TB hard drives).

To make a long story short, a blinking red light on the device and a call to Tier 2 technical support, one of the guys mentioned using Fedora as a way to retrieve the data from the hard drives (seems like the hard drives are good but maybe the actual NAS device crapped out).

I will not have access to the hard drives till this weekend and of course Tier 2 technical support is closed on the weekends.

I have almost no Linux knowledge but can follow instructions pretty darn well.

I am looking to install Fedora 14 Desktop Edition 64 bit on my desktop sometime tonight or tomorrow.

Once I have Fedora installed, how would I mount the hard drives and have Fedora read the RAID 5 array?

Any help would be greatly appreciated!!!

unSpawn 01-06-2011 07:49 AM

Quote:

Originally Posted by IslandTech (Post 4214487)
Western Digital ShareSpace 4TB network access storage that was setup in a RAID 5 configuration (four 1TB hard drives) (..) (seems like the hard drives are good but maybe the actual NAS device crapped out) (..) I have almost no Linux knowledge

The WDA4NC40000 runs 4 1TB WD GreenPower drives (fear teh WD10EACS) in RAID 5 mode (not hot swappable) leaving you with 2.66TB usable. Speed as well as WD tech support quality seem questionable. Before you do anything it would be good to point out the value of 0) making backups the WD way or any way you're comfortable with, 1) familiarizing yourself with the device itself and 2) proper diagnostics. Since you're not experienced it would be good to read [url="http://unthought.net/Software-RAID.HOWTO/Software-RAID.HOWTO.html"]The Software-RAID HOWTO and Linux Raid in preparation. The WDS runs Linux software RAID 5 so if the device is accessible over the network you can access it (login:admin pass:admin IIGC), as shown here for example. Running 'df -mh; mount' should show the RAID device (look for "/dev/md*" lines) after which you can 'cat /proc/mdstat; grep md: /var/log/dmesg /var/log/messages; find /etc -type f -name mdadm.conf|xargs cat; mdadm --detail /dev/md0' (replace device name as necessary) to find out the status. 3) Also don't forget to check out your local LUG if you would like somebody close by with more Linux knowledge. It may save you time and even save your data ;-p 4) Finally if the device itself has broken down and still is under warranty it may be easier, more efficient to extract the disks (label each wrt position just in case) and RMA the device. Unless you never ever want to see a WDS again of course.


Quote:

Originally Posted by IslandTech (Post 4214487)
Once I have Fedora installed, how would I mount the hard drives and have Fedora read the RAID 5 array?

Software RAID means RAID superblocks get written to the beginning of each drive meaning on boot there is no mdadm.conf necessary for the kernel to find and reconstruct a RAID array. You don't even need to install Linux as running a Live CD could do. Powering down the WDS, extracting the drives, attaching them to your machine and running 'dmraid -ay' or 'mdadm --assemble /dev/md0' then should work. Else you could try to be more verbose: 'mdadm --assemble --scan --verbose', use one of the device UUID's: 'mdadm --assemble --verbose /dev/md0 --uuid=[UUID]' (UUID from prior diagnostics), be more specific (asserting no other /dev/sd* SCSI(-emulation) devices are there): 'mdadm --assemble --raid-devices=4 --level=5 --verbose /dev/md0 /dev/sd[a-d]' or try to recover the array by re-creating it: 'mdadm --create /dev/md0 --raid-devices=4 --level=5 --assume-clean --verbose /dev/sd[a-d]' without resync being triggered. YMMV(VM) as I'm no RAID guru and my preferred approach would be to access the device and perform diagnostics first. And whatever you choose to do please don't reply "doesn't work" but post exact error messages and output to support your reply. It's an efficiency thing.

GL, HTH

IslandTech 01-06-2011 10:59 AM

Quote:

Originally Posted by unSpawn (Post 4215189)
And whatever you choose to do please don't reply "doesn't work" but post exact error messages and output to support your reply. It's an efficiency thing.

I know exactly what you mean! I work at a help desk for a medical diagnostic company, very annoying when users have issues and all they tell you is "it's not working" or something along those lines.

Quote:

Originally Posted by unSpawn (Post 4215189)
The WDS runs Linux software RAID 5 so if the device is accessible over the network you can access it (login:admin pass:admin IIGC), as shown here for example. Running 'df -mh; mount' should show the RAID device (look for "/dev/md*" lines) after which you can 'cat /proc/mdstat; grep md: /var/log/dmesg /var/log/messages; find /etc -type f -name mdadm.conf|xargs cat; mdadm --detail /dev/md0' (replace device name as necessary) to find out the status. 3) Also don't forget to check out your local LUG if you would like somebody close by with more Linux knowledge. It may save you time and even save your data ;-p 4) Finally if the device itself has broken down and still is under warranty it may be easier, more efficient to extract the disks (label each wrt position just in case) and RMA the device. Unless you never ever want to see a WDS again of course.

Makes sense why the technician said it might be possible to recover the data by removing the drives and mounting them in a Fedora Linux environment (or maybe any of Linux flavor). The device is accessible by entering the IP address into a browser and you are able to get to the configuration/setup menus. I am NOT sure if the device shows up in 'My Computer'. From what my sister-in-law told me, the technician seems to think the data is still on the drives and maybe the controller board (or whatever runs the NAS) is at fault. Western Digitial is recommending RMA'ing the device but I think they need the hard drives too, of course we all know that they will not save the data but instead probably send a refurbished unit back with blank drives.


Quote:

Originally Posted by unSpawn (Post 4215189)
Software RAID means RAID superblocks get written to the beginning of each drive meaning on boot there is no mdadm.conf necessary for the kernel to find and reconstruct a RAID array. You don't even need to install Linux as running a Live CD could do. Powering down the WDS, extracting the drives, attaching them to your machine and running 'dmraid -ay' or 'mdadm --assemble /dev/md0' then should work. Else you could try to be more verbose: 'mdadm --assemble --scan --verbose', use one of the device UUID's: 'mdadm --assemble --verbose /dev/md0 --uuid=[UUID]' (UUID from prior diagnostics), be more specific (asserting no other /dev/sd* SCSI(-emulation) devices are there): 'mdadm --assemble --raid-devices=4 --level=5 --verbose /dev/md0 /dev/sd[a-d]' or try to recover the array by re-creating it: 'mdadm --create /dev/md0 --raid-devices=4 --level=5 --assume-clean --verbose /dev/sd[a-d]' without resync being triggered. YMMV(VM) as I'm no RAID guru and my preferred approach would be to access the device and perform diagnostics first.

You mention the possibility of using a Live CD in combination with hooking up the drives from the WD ShareSpace and attaching them to my machine. Is it as simple as booting to the Live CD and then running the command
Quote:

Originally Posted by unSpawn (Post 4215189)
running 'dmraid -ay' or 'mdadm --assemble /dev/md0'

and hopefully being able to access the data and dump it to an external hard drive?

unSpawn 01-06-2011 05:10 PM

Quote:

Originally Posted by IslandTech (Post 4215413)
You mention the possibility of using a Live CD in combination with hooking up the drives from the WD ShareSpace and attaching them to my machine. Is it as simple as booting to the Live CD and then running the command and hopefully being able to access the data and dump it to an external hard drive?

If you've got a free machine to work with that has enough spare connectors for the drives and if the drives are all OK and if you can re-assemble the RAID then yes, it could be that easy.

aramisster 05-11-2011 05:03 PM

Hi everybody,
I have a WD ShareSpace 4 TB NAS and one of the disks is out. The OS of the NAS was unable to synchronize the mirror with the message:

$ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5]
md1 : active raid1 sdd2[3] sdc2[2] sdb2[1] sda2[0]
1044160 blocks [4/4] [UUUU]
resync=DELAYED

md2 : active raid5 sdd4[4] sdc4[2] sdb4[1] sda4[0]
2925293760 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_]
[==>..................] recovery = 12.8% (125056128/975097920) finish=7622.8min speed=1857K/sec

md0 : active raid1 sdd1[4] sdc1[2] sdb1[1] sda1[0]
208768 blocks [4/3] [UUU_]
resync=DELAYED
unused devices: <none>

It tried several times and finally it marked that the 4 disks are out.

I have mounted the 4 SATA disks in a PC enclosure with a live UBUNTU and what I see about the mirror state is the following:

$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md125 : inactive sdb4[4](S) sdi4[1](S) sda4[2](S) sdh4[0](S)
3901192192 blocks


md126 : active raid1 sdb1[3] sdi1[2] sda1[1] sdh1[0]

208768 blocks [4/4] [UUUU]

md127 : active (auto-read-only) raid1 sdb2[3] sdi2[1] sda2[2] sdh2[0]

1044160 blocks [4/4] [UUUU]

unused devices: <none>

The md125 is inactive, and this is the mirror I want to restore.

~$ sudo mdadm -D /dev/md125
mdadm: md device /dev/md125 does not appear to be active.

What am I supposed to do for this md125 device?

Thanks


All times are GMT -5. The time now is 05:51 AM.