Saturday, April 16, 2011

Turbocharge your ix2-200 with SSD

The iomega ix2-200 is a nice little device for home or small-business NAS use, but it really suffers in the performance department: it only has a pair of 5900 RPM SATA drives under the hood, not to mention a slow (200MHz) CPU a single-core 1GHz CPU and only 256MB RAM. It's key benefit is the small package, which in turn equates to nice portability for a shared-storage device. However, if you're willing to break your warranty and get your hands dirty with a screwdriver and SSH client, you can turn it into something of a speed demon with some aftermarket upgrades.

Disclaimer: I don't advocate doing this; it's a bad idea for several reasons: you will sacrifice a ton of capacity (and cash) to gain performance improvements in a device that is really too underpowered to truly take advantage of the upgrade.

That said: I am also a gadget and hardware guy. I love playing with this stuff—especially storage and networking—and this was too much of an opportunity to miss. I did this more as an experiment to prove that a) it could be done and b) to see what kind of improvements were the result.

The ix2-200 itself will set you back at least $200 to start with, and 128GB SSDs (as used in the example) will also set you back $200 each plus the $20 each for the drive converters. For most users, you could find a much better way to spend $650-700 on shared storage. But if you need really, really fast, shared storage in a small, portable package—and capacity isn't as important as speed—this little Frankenstein's monster may be just the ticket.

Here's what you need, and how to get it done...

Preparation...

  1. Get your hands on an iomega ix2-200. If you can find a used/broken model, so much the better; and because we're gutting the factory drives, pick up the lowest-capacity model (1TB raw in 2 x 500GB) you can get your hands on. It must be able to boot into the management console from at least one drive; I don't have an image that you can lay down on a new replacement drive, and I don't advocate going onto the Internet in the hope you can find one that is truly "clean".
  2. Get a pair of the biggest SSD that you can afford. Don't worry about getting a "peak performance" model: even the slowest MLC-type units will still out-perform spinning disk, and still have more throughput than the ix2's SATA bus can handle. A matched pair is best because you can then use RAID0 for maximum performance.
  3. Assuming that your SSDs will be the 2.5" form-factor, get a pair of Icy Dock 2.5"-to-3.5" HDD Converters from your favorite reseller; I bought mine from Newegg.
    Note: Icy Dock has recently released a Dual 2.5"-to-3.5" Converter with built-in RAID-aggregation capability that would potentially allow you to put four SSDs into the unit. Depending on the way the ix2 recognized the drives, you could do JBOD (so the ix2 would "see" all 4 drives and permit you to run RAID5 in the GUI software), RAID1 (and use manually-built RAID0 in the ix2) or RAID0 (and use GUI-built Mirroring). I haven't tried it, so your mileage may vary...
  4. Assemble your new drives: put the SSDs in their Icy Dock converters
  5. If you're using an ix2 that you already own, back up all your data currently on it. What you're doing is decidedly destructive, and you will end up with less capacity. You don't have to worry about the system partitions, just the user data.

Replace the original drives with your SSDs...

  1. Change the protection method to "none". The only way the ix2 will allow you to do this is to remove all your shares and/or iSCSI volumes, and the only way to do that is to delete all your data (aren't you glad you backed everything up?).
  2. Shut down the ix2. The device infrastructure wasn't meant to support hot-swap.
  3. Remove one drive from the device (I always start with HDD2, but the system is designed so you could replace either one). Replace it with an SSD (in its converter, if needed).
  4. Restart the ix2. When it finishes booting and you can see the management dashboard, the unit will have replicated the system partition (/dev/md0) to the new drive, and should notify you that it recognizes the drive substitution. By removing the protection in Step 1, there's no wait while the system replicates the data partition, and the available data (as shown in the dashboard) should be roughly equivalent to the sum of the two drive sizes.
  5. Navigate to Disk Management in the control panel and verify that both disks are recognized by the system. If the new drive isn't recognized—the system displays no drive for the disk position you replaced, or the size is incorrect—you should stop and verify that the new drive is "good" in a regular PC. Even if the drive works, it is possible that the SATA implementation used by the SSD is not compatible with the ix2 hardware.
  6. Shut down the ix2. Replace the other drive.
  7. Restart the ix2. When it finishes booting, the appliance will have again replicated the system partition for reliability, and the remaining space on the drive will have been added to the pool of available storage.
  8. Navigate to Disk Management and verify that both disks are recognized and that you have the full storage capacity you were expecting.
Assuming everything went correctly for you, your ix2 will show the storage capacity as a single, unprotected pool of space. What it doesn't tell you is that the drives are assembled into a "linear" array: only after the first drive gets full will the other drive be used. You now have three choices:
  1. Live with it.
    You gain lots of speed by having the SSDs in there, but until you "fill up" the first disk's user data partition, that second one is doing nothing for you (although it is protecting the boot partition). If this is your choice, you're done. Enjoy using your device.
  2. Switch the protection mode to "Mirrored".
    You use both drives equally, and if one "dies", the other one carries on because it has an exact copy of the data on the failed drive. There is a write penalty for this when compared to "no protection"—but it's definitely worth it if your only backup is tedious and annoying to restore—and reads should be slightly faster than a single drive, as the appliance can perform simultaneous I/O on the drives. The major downside, of course, is that the second expensive disk you put in the ix2 isn't "doing" anything but keeping your data safe. Personally, I only worry about this sort of thing for the boot/system/app partitions on these sort of appliance systems, and that's covered automatically for the ix2. If you choose this option, you can make the change through the device GUI, and when it's finished applying protection, you're done and can start using your device.
  3. Convert the storage type to RAID0.
    On the negative side, RAID0 doesn't give any data protection, but then neither does linear: in either case, if one of the elements dies, so does all your data. On the positive side, however, all I/O will be distributed—in parallel—between both drives; there's no write penalty; you still get 100% of the available space for storage (no loss for protection). Too many people trust RAID "data protection" features to safeguard their data without having good backups. When you intentionally use RAID0, you know you have to keep good backups, so you force yourself to do so before trusting your data to the device. If you decide to choose this path, continue on...

Convert the "no protection" volume to RAID0 for better performance

  1. Enable "Support Access" (SSH) using the hidden "support.html" page. Access it by entering the page in the address line on your browser; the GUI doesn't have any links directly to the page.
  2. Logon using SSH. The username is root; if you have security disabled, the password is simply "soho" (no quotes). If security is enabled, the password you entered for the main administrative user (during security setup) is appended to "soho". For example, if your admin password was "theStig" , your SSH password is "sohotheStig".
    If you attached the ix2 to a Windows Domain, the root password is still the created using the original pre-domain administrator, not an administrative user from the Domain. If you didn't keep that old password, you'll need to reset your security and re-establish it.
  3. Dismount the user storage volume, /dev/mapper/md1_vg-md1vol1, which is mounted on /mnt/soho_storage. This is kind of tricky; among other things, the Samba service (smbd) keeps it open so a simple umount /mnt/soho_storage won't work. Instead, you first need to kill all the services using the volume before it will dismount. fuser is a command that will show which processes are holding a lock on the volume, and it does have a "kill" option that can effectively cast off most of the daemons that have a lock on the volume. Unfortunately, however, smbd gets restarted immediately, so you can't use it. Worse, the restart occurs so quickly that you can't even concatenate the commands:
    fuser -k /mnt/soho_storage; umount /mnt/soho_storage
    I admit it: I'm more of a "script kiddie" when it comes to Linux, so I couldn't figure out how to stop the restarts. As luck would have it, however, I was able to use the kill command in conjunction with a dismount to get it to work; however, you'll need to get the process ID of the first Samba daemon (two will show up) before you can make it work:
    ps -ef | grep smbd
    Once you have that, use a compound command to get the volume dismounted faster than the restart can happen:
    kill X; umount /mnt/soho_storage {where the process id you found above is X}
    If you don't get any errors, you can use the mount command to verify that the volume is dismounted, and use fuser -u -m /dev/mapper/md1_vg-md1vol1 to verify that there are no locks on the volume.
  4. Take the volume group offline
    vgchange -a n
  5. Stop the RAID array for the user storage partition that you will modify
    mdadm -S /dev/md1
  6. Recreate the RAID array into a 2-drive RAID0 array
    mdadm -C /dev/md1 -l0 -n2 --assume-clean /dev/sda2 /dev/sdb2
    Answer "y" when asked to continue.
  7. Bring the volume group back online
    vgchange -a y
  8. Reboot the ix2
    telinit 6
When you reboot this time, your Disks control panel will look a little different...
In the screen-grab above, you see that the device indicates a mirror of 235GB from a pair of 120GB drives. That's mathematically impossible, of course. The display algorithm is confused: the partitions are not "linear", so they must be a mirror, the only other option you can attain from within the GUI.
UPDATE: I've learned that the CPU in the ix2 (and ix4) is not a pokey 200MHz ARM, but instead a 1GHz (or 1.2GHz, in the case of the ix4) Marvell system-on-chip that emulates a 200MHz ARM.

1 comment:

  1. You've confirmed what I though was true in being able to simply replace one drive in the array with one of a different size and have it successfully replicate the boot partition. Disk one has failed in my IX2-200 and I would like to easily upgrade it to 2TB disks in the process of replacing the failed one. Since one disk is still operational it seems like it would work exactly as you've stated here.

    ReplyDelete