How to recover data from 16kb blocksize partition (sparc based NAS drives)

Hi. Here is a quick guide hot to reocer 16kb blocksize partitions. The first part is just an intro scroll down lower to the tutuorial.

--- Whats 16kb blocksize mean??
Even though i knew about blocksizes in the days of using DOS 3.x - this came abit of a shock to me.
In those days we have FAT, FAT16, FAT32 and you could set how to format your hard dirve with block sizes varying from 64bytes to 4kilobytes. Whats the difference. In those days nothing because the biggest hard drive was 500MegaBytes. THe bigger the block size in essense the faster you can write/read data (so it reads/writes 4kb blocks)

So i came across a NETGEAr ReadyNAS DUO - The hard drive failed inside - did not power on. I did my recovery tricks and fixed the logic baord. Using recovery software (not easyrecovery or recoverymyfiles) Its a software/hardware bundles recvoery solution i accesed the drive and saw 1 partition. 256mb.. hmmm on a 500gb hard drive. There where only linux files on there.

I plugged it back into the NAS box- knowing it was a NETGEAR, which i hate and know it jsut does what it pleases. I was stressing that it doesnt decide to format the disk / or recreate an array or something stupid that netgear usually does.
It booted up and started its disc scan procedure - where the blue power led  pulsated like a progress indicator and the act light ever so ofter flashed with activity on the HDD (format OMFG!? luckily not)
This took 18 hours! once again i cant stress enough how effed up netgeat nas boxes are.

Fantastic- the next day the power led is solid blue - but no HDD is mounted- using their RAIDar tools i could not find any devies neither did my DHCP server indicate a leased IP to the box. It froze...

Stuff it.I went onto the readynas forums and started ranting about this piece of NASA equipment they made and how i cant recvoer the data.
Some cool dude replied to my threas with a link



Re: ReadyNAS Duo Crashed and cant get data :( Please help

Postby John Bean » Sat Jul 10, 2010 2:23 am


Great- I found out that the NAS formats the hard drives using 16kb blocks- thats 4times bigger than x86 based cpus and only iTanium amdX64 and sparc processors handle pagefiles this big. Well im sorry but i dont have £1000 processors lying around.


That link did take me to another solution though. Something called FUSE and ext2fuse for linux - this is some sort of emulator that mounts the partition and you can access it.

** How to recover 16kb blocksize parition **
You will need VMPLayer or VMMachine installed.
Download VMPLAyer from here
http://www.vmware.com/products/player/


Download a custom Linux machine built by dekkit from readyNAS forums
Unpack the debian zip file and run the VMWare machine by double clicking the configuration file.
Username: vmuser
Password: vmuser1
The linux distro will boot up and infomr you that a USB device that was plugged in is no longer available. In this distro you do not need to compile anything- its all ready compiled and isntalled you jsut need to call the termianl based cammand. There is no GUI featured program and its not integrated with linux's GPart.
I got stuck here for a while - annoying me really badly- for some reason the first time i used the VM and i plugged the HDD into my SATA - USB it did not register with Linux through VM player - even thoug i went to VM -> Removable Devices
I added and removed it severval times and no joy! :( i almost thought i would have to do a full distro install
To check if your SATA <> USB registered properly type
lusb in the console


and you should see the device name in there what VMPlayer informed you about that you need to connect it to host.

If its listed in there then all you need todo is (after reading 7 forum threads, 28 pages ... over and over and over.. ehhh)

open terminal

modprobe fuse
vgscan ; You should see (Found volume group 'c' using metadata type lvm2) !Success- it can scan your usb attached drive
vgchange -ay c ;' ( 1 logical volumes in volume group 'c' now active)
mkdir /mnt/lvm ;it should exist already but do it just incase it does not
ext2fuse /dev/c/c /mnt/lvm ; fuse-ext2 initialised for device xxx for block size 16384! Yaaaay
-- this terminal thread will be occupied by ext2fuse - and do NOT close it- it will report errors and other stuff in there

Open a new terminal windows

cd /mnt/lvm
ls
(You will see diefferent directories the one you are interested in is media)
cd media
cp -R -v * /media/(NAME OF YOUR OTHER HDD/PENDRIVE) - copies all files and folders from the media folder - seems abit slow (usb2usb i guess but it works!!)

eg. on the desktop after plugging in my samsung drive i got a shortcut called 'SAMSUNG' - case sensitive
cp -R -v * /media/SAMSUNG

Remember you dont need to compile anything with this VM- just open the terminal boxes and do those commands- it all compiled ready todo its thing.


---
Dekkit Release Acknowledgements
The original VMware image was found http://www.vmplanet.net/node/85 (before the various patches were applied - so feel free to drop them a donation), if you can improve this image by way of a script to make it even easier to use for us 'non-linux users' then please do so and share it back with the rest of us

Comments