Speed up your business NAS with iSCSI

A touchscreen display showing information in line graphs

When was the last time you really worried about storage? It’s one of the truisms of computing that price per megabyte of whichever media you choose will only ever head one way – down.

And yet, the value of what we store goes in precisely the opposite direction. Increased regulation means we need to be ever more careful of how we preserve our business records, and fines can – and will – be levied on those who don’t take sufficient care to preserve their accounts and comply with data-protection requirements. It’s not inconceivable that these fines will exceed the cost and inconvenience of taking the matter in hand earlier and setting up a robust and secure storage system, which you review at regular intervals.

The fact remains, though, that the task of shifting your data from one media to another is an onerous one, and keeping track of multiple libraries split across diverse repositories isn’t for the fainthearted. In this hands-on walkthrough, we’ll show you how to set up a system that will adapt and grow as your needs change. It should also help cut lag, which on a heavily used system should pay dividends of its own over time.

We’ll be using iSCSI, as we believe it to be the most compatible and most extensible option for anyone with a storage problem – but it isn’t quite plug and play.

The breadth of hardware over which iSCSI appears to work is almost part of its problem: it’s so wide. We’ll be using kit that’s one level up from the simplest possible configuration, which would be one PC, one iSCSI-capable NAS device and a single Gigabit Ethernet switch. Our sole addition to this list is a managed switch that can be set to support both jumbo frames and flow control. These are the two most important enablers of a smooth iSCSI experience and, without them, you’ll miss out on the speed benefits: you’ll just about break even with USB 2 performance on a good day.

To prove the concept first, start with a switch, a PC running Windows and your NAS box. Verify that everything can ping the other devices’ IP addresses and that their network cards – as well as the switch – both support and have selected flow control and jumbo frames. These attributes can be missed out either by the Microsoft driver, or by the machine vendor themselves. We were fortunate: the HP Z220 we used has a built-in card, configured as we needed it.

If the ping experiment was a success, you’re ready to get started. However, if you’re doing this experiment on a network that has live users, please take note: they may be temporarily disconnected. And remember, you can always prove the concept with the settings.

What’s a LUN?

You’ll see in step 2 of the walkthrough, “Make a Target”, that we mention LUNs. And you may well wonder what they are. In short, they’re a throwback. Logical unit numbers were IDs for volumes, drives or partitions in the SCSI era, and the name alone has rolled forward to the modern world of storage. Here, we’re connecting part of a disk to a set of flags and access controls and, in this scenario, each chunk of the disk is called a LUN.

Hands on: Setting up an iSCSI system

  1. Assuming you’ve connected everything up, and that the machines can ping each other, you have two configurations to do. On the NAS box, you need to reserve some of the disk and present that as an iSCSI target. On the PC, you must tell the iSCSI service where to look for the target. We’re using a Netgear ReadyNAS 104 here.
  2. Work out how much disk space you want the target to present, and whether you would prefer to format the whole volume now or when it’s needed. The latter is known as “thin provisioning”. Notice the naming of the parts: this is vital and can quickly get out of hand without a naming structure. Later, with 20 targets and 60 LUNs, you’ll regret a poor name.
  3. Now we must apply flags and access controls to a portion of the disk. In large storage deployments, you might need to secure certain volumes from nosey system admins, or prevent curious users from connecting directly, but in small-business storage setups, all of these features are best left turned off. CHAP is handled under the same heading – passwords can be entered at either end of the setup, meaning you know who’s connected to your disks. However, on the first try, they just add a further layer of uncertainty.
  4. Take care when setting up a storage group. You’re presented with this dialog, which appears to be asking you to supply a name and target details yourself. These long names are part of the iSNS service, and despite their intimidating length, it’s best not to dip a toe in those waters at this stage: both the entry-level NAS device we’re using, and Windows itself, will handle these names for you.
  5. The next step is as simple as you could ever hope for, as you can see from this grab. It’s what you’ll see when you type “iscsi” into the Start menu on Windows 7 or later. This is about as benign as additional setup of services will ever get. To proceed to the next stage, simply click Yes – a potentially complicated set of procedures have been preprogrammed to make your life easier.
  6. Get used to this dialog, as it’s where all the action happens in Windows iSCSI when it comes to connecting to the targets you’ve created. If all you want to do is prove the concept, and performance isn’t especially important to achieving this aim, then just crack straight on and enter the IP address of the NAS box on which you set your targets, then click Quick Connect. This should be a painless process, but in our tests we received an additional pop-up, which we’ll discuss in the next step.
  7. This appeared because there was more than one target group defined at the address we gave. We don’t want to connect to the original target (another PC has rights to that, and we don’t want to share storage at the iSCSI level), so we want only our second target to be involved on this machine. We’ll get back to those other behaviours later, but for the moment, we have a volume linked to this machine via the iSCSI initiator service, and all the other settings have been filled in by the Quick Connect button.
  8. This is the standard Windows 7 Disk Management console, where we can see our as-yet-unformatted new volume, listed below the existing disks on our machine. Right-clicking our new volume shows that it’s online (the “offline” on this menu will take it offline, rather than denoting that it already is). This means all of our settings have been stored and the machine will attempt to remount this storage every time it starts up, visible as a drive letter to both the desktop and background services.
  9. If Windows loses the connection, you will not only need to work through the initiator dialog to reconnect, but you’ll also have to come back to this dialog because rediscovered iSCSI connections are always left marked as “offline” until verified. The “online” menu is in the Management console and nowhere else.
  10. This is where you go, by clicking on the Discovery tab, if your LAN has somehow interfered with the Quick Connect option. This is a far from unusual occurrence. Some NAS service configurations don’t supply enough information to complete the connection, or you may want to use this tab to run multiple LAN cards, splitting up storage traffic from other data that commonly passes in and out of a PC’s LAN port.
  11. You can nominate an IP address or communications stack to handle the iSCSI interchange for you. Should you have a hardware-layer iSCSI Ethernet card, then this is where it comes into play. Notice (but then go on to ignore) all the stuff in the Advanced dialog box to handle authentication: you can’t have those secure features and also make use of the Quick Connect button that’s the heart of this demo, and sometimes at the heart of a lot of disappointment with performance and usability.
  12. Your volume is visible in the Disk Management console, but it’s unformatted. This isn’t just a matter of a few clicks in the usual Format dialog box, though: the default options need careful consideration, especially if you have made yourself a large contiguous store out of several SATA disks. Remember also that the combination of thin provisioning and Quick Format can leave all the parts of the system working surprisingly hard when you start filling up your disk. Even though our all-time record was three days for an iSCSI slow format, always consider taking as much pain upfront as you can when it comes to formatting.