02 September 2014

Restore data from broken NAS

(Versione italiana in fondo)

One morning the colleague on my LHS arrived quite sleepy and worried: his home Network Attached Storage stopped working. He was up late trying to have it acquire an IP address from the router, without success. That WD My Book World Edition had no USB port, only network, so there is no way to access the disk.

After a couple of days I convinced him to bring over his disk so that we would have a look together. He was convinced to be using a unit with twin disks in RAID (Redundant Array of Inexpensive Disks), but we found only one inside when we opened it up (no pictures)!! We plugged the one and only bare disk into a SATA-to-USB adapter. The disk spin up just right, but MS Windows couldn't see the data in it. A quick tour with default Windows system tools revealed four partitions: a Linux-like system was in the disk in front of us.

Since we had no Linux desktop, I fired up an Ubuntu Linux virtual machine and let it see the disk. Disk partitions were all in raid format (but remember, no other disk could possibly fit into the case!), and the array was "busy". Few web searches ahead and in three shell commands I was into the right disk partition and could see all his precious data.

Then it was just a matter of plugging another USB disk and copy data out of the NAS disk.

**** ITALIANO ****

Una mattina il collega alla mia sinistra è arrivato molto più assonnato e preoccupato del solito: il suo disco di rete NAS di casa aveva smesso di funzionare. Aveva fatto le ore piccole cercando in tutti i modi di convincere il NAS ad essere di nuovo in rete, ma senza successo. Siccome il WD My Book World Edition non ha altri accessi se non la rete, non c'era modo di accedere ai dati.

Dopo un paio di giorni l'ho convinto a guardare assieme l'oggetto e lo abbiamo aperto. E' stata una sorpresa trovare un solo disco dentro il box, mentre avrebbe dovuto essere un array ridondato (tecnicamente "dischi in RAID"). Quando abbiamo inserito il disco in un adattatore SATA-USB ovviamente non ci sono stati rumori strani o fumate nere: funzionava tutto a dovere, ma Windows non vedeva nessun disco utilizzabile. Con gli strumenti di gestione del sistema abbiamo visto che il disco conteneva le quattro partizioni tipiche di un sistema Linux.

Siccome non avevamo a disposizione un computer desktop con Linux in cui impiantare il disco, ho acceso una virtual machine Ubuntu Linux sul portatile e le ho "mappato" il disco USB. Tutte le partizioni erano in formato raid e l'array era in stato "busy". Dopo alcune ricerche in rete (con annesse letture approfondite) e tre comandi shell ho avuto accesso alle partizioni e individuato i dati.

Dipodichè è stata semplicemente una questione di collegare un secondo disco USB alla virtual machine e trasferire i dati.

A quanto pare questi NAS casalinghi sono soggetti a fallimenti nell'elettronica, mentre i dischi rimangono sani. Se doveste ritrovarvi con un Western Digital My Book World Edition irraggiungibile, provate a contattarmi.