Advanced disk recovery (2015 edition)

Something that has been plaguing me for the past week or so was transitioning to a Network Attached Storage (NAS) configuration. This is the concept of a small device you plug into your network, where you put hard drives into them – and configure it from a web interface. The point is that you can use this as a common place for file storage and for backups for all the machines in your home or office. These NAS devices include fault-tolerant “RAID”, redundant network cards, and powerful features.


This would’ve been straight-forward, but I was trying to do as much as I could without having to buy additional drives. I got a Netgear ReadyNAS RN104 by the way – which is really VERY impressive!

Not only can you consolidate all your storage, it supports RAID (even RAID5), two network cards which you can “bond” (and treat like one card for really good throughput). Even better, it has built-in functionality for file sharing over a wide variety of protocols and technologies (like SMB, DLNA, NFS, etc). Lastly though, it also has “apps” you can install. For example, you can install OwnCloud on it just by clicking a button. It also runs pretty cheaply – using about 50watts of power.

What went wrong:
Well, for how great the NAS is – it’s VERY particular about disks. It won’t let you use any previously-formatted disk. To use a disk, you have to remove the partitions (through the NAS admin website, it’s simple), and then let the NAS format the drive.

It only uses drives that it formatted, personally!

So, I had drives in the NAS set up as JBOD (Just a Bunch Of Disks), or as standalone drives. I then copied all of my data over the network onto the NAS disk. I went to then take the old drive and add it to the NAS (knowing that I’d have to destroy the data partition). When I did that, the NAS freaked out and made the existing file system unreadable.

The new JBOD disk lost it’s configuration (in the NAS), and I just formatted the old disk – which I just put into the NAS.

I went from having TWO copies of the data to losing both of them in the same moment in time!

The UI is very limited. So, if it doesn’t like the drive, the ONLY option you have is to remove the partitions and re-format it. That means I was stuck with a NAS that had two unrecognizable disks in it – the disks which were my two copies of this data!

The Hope:
My thought has been that either of these drives should still have the data on it.

If you are not familiar, a disk is sort of like an empty warehouse. When you create a partition and “format” it – that is more like a library: you have a card catalog, or index in the front (File Allocation Table, or FAT). Then, you have the actual books, stored very orderly out on the shelves (the actual folder and file contents).

Typically, when you “quick format” a drive, or even when you destroy the partition layout – this really just smashes the card catalog. It doesn’t actually touch the aisles and aisles of books – that would take a LONG time.

If you do want to do that, that is called doing a “secure wipe”, by the way.

Where to begin?
With this sort of problem, this isn’t going to be solved by opening Windows Explorer. It was time to call in the big guns. So, I called my eldest brother John – the computer whiz, and we tried a whole bunch of things. I learned a lot in the process, so I thought I would write some of it down.

I have two unreadable drives – one should have an old Windows-based file system on it, which was repartitioned, and the other is a Linux partition. So, I hooked those up to an existing Windows system to see if I could recover any of the data.

Windows Disk Management:
OK, so let’s start with Windows. When I see these drives in there, it reports that they are “healthy” partitions, but if I right-click all I can do is delete the volume. So, this is a dead-end.


I also can’t right-click on the drive and “Convert to dynamic disk” (the only option), I’d get errors like this:


Command-line “diskpart”:
Next, I looked at “diskpart”. They retired “fdisk”, if you’ve ever used that – and diskpart is the replacement. You can look at disks, partitions, and do many of the same things, but from the command-line:


again though, this ended up not really helping because this isn’t anything for recovering lost data. All you can do with this is create and delete partitions, really.

Piriform Recuva:
Per John’s recommendation, I tried this. If you have a Windows-based file system, it seems like this would let you recover it. However, in my case, since Linux touched both drives, I *think* they are now Linux-based? In fact, when I looked that up – it looks like the ReadyNAS uses “ext3” file system, and then apparently uses software RAID on top of that. So, the “file system” isn’t exactly straightforward – and I still am not positive what it is.

So, this didn’t help in this case, but here’s what that looks like:


and when I chose one of the unrecognizable partitions, I’d get:


Paragon Rescue Kit:
Next up was another freeware app called Rescue Kit.

In that installation you can find bootcorrect.exe. That looked to be promising too. If you ever just have MBR corruption or problems like that, this would probably serve you well.


Also, if you are super-crazy-hardcore, you can also edit the bytes on your hard drive directly!


Installable File System for EXT2:
Next, we thought – if we are trying to get access to (presumably) an ext3 or ext4 file system, can we do that from Windows? Well it turns out you can install an additional file system. I used this:

That’s pretty cool to know that you an read Linux file systems on Windows, but that still didn’t work. Despite the UI being straight out of the year 1998, it does seem to work:


I was going to bring up an actual physical instance of Linux, to see if I can get to the partitions – but everyone I read, everyone said that as far as “seeing” the file system, this installable file system gives me everything that Linux would. So, if I couldn’t see it here, you wouldn’t be able to see it in Linux either.

CGSecurity TestDisk:
OK, NOW we’re getting somewhere. This is a command-line tool which specifically detects lost partitions, let’s you manually change the partition table, etc. I got that from here:

Here are some screens from it. You basically “Analyse” [sic] the drive, and then it detects lost partitions. You can recover them and “write” the changes to the disk:


This is good, but I still have the fundamental problem of not being able to ready this file system, which according to TestDisk is “Linux md 1.x RAID”:


I tried this with both the former-ReadyNAS disk and with the former-Windows disk. With the Windows disk – this is so close, but it can’t recover it for some reason. It sees that there used to be a MS-based file system there, but it can’t recover it:


Bottom Line:
If you accidentally repartition a drive, or do a “quick format” accidentally – I think most of these tools above should be able to save you! In my particular case, despite how careful I was – I’m coming close to realizing that these drives can’t be saved. It’s not a huge deal, plus I really learned a lot in the past week.

So the next step is just to set up my RAID5, install OwnCloud and going forward I should have a pretty reliable, fault-tolerant setup.

Future Robert,

Hopefully you aren’t reading this blog post. If you are, that means you’ve had another catastrophic disk outage at some point in the future and have come here to re-remember what you did last time!

Maybe some of the links on this page will help, because I know you won’t remember the names of these products! Good luck

-Present-day Robert

Posted in Computers and Internet, General, Infrastructure, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

%d bloggers like this: