Thursday, December 23, 2010

Ready NAS Duo drive mounting

For home use I use ReadyNAS Duos - the Netgear entry level RAID capable NAS.

Overall they are pretty good, a little underpowered on processor/memory but for the price they sell you cannot really complain. Also with them taking up to 2TB commodity drives it makes for very cheap storage.

One thing though, what if the NAS hardware failed but you wanted to recover the drive. No point moving to another Ready NAS if you had one as it would probably just re-initialise the drives.

The same thing is of course true of enterprise level RAIDs you would probably have to worry about controller firmwares or recover from backup.

Except I do not have a backup, as the NAS kind of already is used for that purpose.

I was dismayed to read that although using an ext3 filesystem they use SPARC chips and a block size of > 4096 KBytes. The x86 linux kernel can only mount 4K block size ext3 filesystems.

So it was looking like all was lost until I read about Fuse that provides file system support in userspace (so no kernel restriction nonsense). These packages come with Linux distros and I needed to compile a ext2 plugin fuse-ext2.

I hooked up a spare drive from a previous NAS upgrade to a USB caddy and:

Scan the logical volumes to get the logical volume names, ReadyNAS uses "c" as its name"
vgscan

Activate c ready for mounting
vgchange -ay c

Make a mount point
mkdir /tmp/lvm

Run the userspace mount:
ext2fuse /dev/c/c /tmp/lvm    (note fuse-ext2 on debian)

And you can then see the ReadyNAS files. Very handy for recovery this technique, apparently the non standard block size was for performance which is understandable but it is also very useful to know you can do this to get your data back!

No comments: