I had a pretty crappy week. I'm sure you can imagine with a title about how I had to recover important files from a failed LaCie 5Big NAS unit. It's a device that I inherited years ago and was made in 2008 so it's well out of support. Well, I noticed last week some time that one of the drives failed on it. Not thinking too much about it, I ordered a new hard drive from Amazon. By the time I got the new drive, the unit stopped responding altogether and said that two other drives had failed!
Luckily it turned out that only the original drive actually failed. The other four drives were fine, and it was the actual enclosure/RAID controller that failed. Still though, I couldn't access my files! So here is what I did, and if you need to do the same you will need a few things:
- A SATA to USB adapter
- A computer with a disk at least the size of your RAID array plus the amount of space your actual files consume. This can be an external drive too.
- VirtualBox (Free desktop hypervisor)
- WinImage (30 day free evaluation version)
- Ubuntu Linux Install ISO/Disk (At least Ubuntu 16.04)
Once you have your virtual drives, create an Ubuntu Linux virtual machine in VirtualBox. Power it up and install a couple of tools:
The first one is a nice to have to visually see the drive partitions. The second one is required because it is what will control your virtual RAID array.
Now, with those installed power down your Ubuntu VM and add the virtual disks in order.
Now power on your VM again, and when you login mdadm should automatically see your RAID 5 array! At least it did for me...
From here I was able to mount a folder to my VirtualBox on my physical computer and copy all of the files off the new virtual RAID 5 array to my computer. Thank the sweet baby Jesus too because I had about 11 years of family photos that I didn't want to lose!
After giving it some thought I don't really need a NAS unit at my house, so I think I'm going to replace this old LaCie with a USB/eSATA RAID controller instead. It's less expensive than a NAS, and should suit my needs. Besides, most of the NAS units I see come with drives, and after this fiasco I already have some!
One thing to note, if this doesn't work at first, you may have a bad disk image file. The first try at this I received errors when creating images in WinImage on disks 1, 2 and 3. I recreated 1 and 3 fine, but 2 gave me an error no matter what. If you can't automatically mount your RAID array, try recreating the virtual disk files.
Another thing, if you have more than one bad drives you won't be able to recover your RAID array, and you will need to use a forensic tool to try and recover files, but that is another article...