The ReadyNAS 1100 is one of Netgear’s small business ‘NAS’ solutions. Cheap NAS devices became popular a few years ago when people started realising you didn’t need a Windows NT or 2003 server plus CALs just to serve files. They’re usually a Linux or *BSD machine with a couple of extra Ethernet interfaces. This is made interesting because a failed automatic firmware update completely took down our office NAS device. Pulling out the drives, I discovered the following interesting information:
- The ReadyNAS 1100 uses a Sparc processor
- The drives in the unit I played have three partitions
- Root volume is mirrored across *all* drives
- The ‘Data’ volume was RAID5+hotspare in this case
- Netgear don’t really do Linux very well
The three partitions on the drives kind of make sense. The first one is the root partition, and has all the expected binaries. The second I’ve not yet identified, and the third one is the ‘Data’ partition (2TB in my case). If you attempt to mount these drives in a normal linux machine, they’ll be correctly identified as part of a RAID set, though with a few glitches
md: invalid superblock checksum on sdb2
This is caused by the ReadyNAS using a Sparc processor and Linux 2.2, and thus needs a special case switch to mdadm.
Running the following command allowed me to at least mount the root array, leading me to believe the drives themselves are not too damaged. The mdadm command has autodetected the array devices on install, so does not need the devices specified (’partitions’ option in /etc/mdadm.conf)
# mdadm -A -U sparc2.2 /dev/md0
The user data partitions, however, were RAID5, and needed slightly more work. I managed to recreate these by creating the linux MD raid set with one drive missing, so that the whole thing wouldn’t get overwritten. After that, I found that there was an LVM volume inside the RAID5 container. After extracting the LVM config file from the beginning of the volume like so:
# dd if=/dev/md2 bs=512 count=255 skip=1 of=md-config
I managed to activate this using the Debian LVM tools:
# vgcfgrestore -f VolGroup01 VolGroup01
After which, vgscan would show the volume, and the following command could be used to bring it online:
# vgchange VolGroup01 -a y
After this, it was a simple case of running fsck -y on the device (in this case, /dev/c/c). Mounting the filesystem, however, was something different due to the fact that the ReadyNAS has a SPARC processor, it uses 16k blocks in it’s ext2/3 filesystem. This cannot be mounted on an x86 architecture Linux, so you have to use the usermode ext2/3 filesystem driver, ext2FUSE. This command should help:
# ext2fuse /dev/c/c /mnt/foo
Of course, this assumes you’ve got everything else in the chain working nicely…
