Saturday, August 6, 2011

Desktop Drives in a RAID

I read a post today that reminded me of something I've seen far too often, and something that I was guilty of doing once or twice prior to investigating why it was causing me so much trouble. Why is it that when you chain together a few hard drives they fail so often, while by themselves, they are very reliable?

The answer lies in the drive selections themselves. Don't use "Desktop Edition" hard drives in any RAID, or you'll have nothing but trouble out of them.

"RAID Edition" drives are no more expensive than their desktop counterparts (matching spindle speed of course) and contain all the necessary features to keep your system up and running. "Enterprise Class" drives are more expensive, but have features that help increase reliability and performance and are designed to cope with the stress of being in server environment. For simplicity sake, we'll refer to Desktop Edition drives as DE, RAID Edition as RE, and Enterprise as EE.

Up until recently, there wasn't much selection in the market for any SATA based RAID rated hard drives -- that was generally the call-tag of implementing SCSI or SAS units. With the massive drop in pricing on storage media, more consumers are implementing desktop level RAID systems to protect (or enhance the speed of) their home computers. Hopefully no one is using SATA in the enterprise for their servers, but if they are, this will be of special interest to them.

Western Digital and Seagate (and I'm sure others as well) have specific lines of SATA hard drives designated to be used in RAID systems.
What makes them special, and why should you spring the extra $5 for them versus their off-the-shelf counterparts? In a server environment, why should you spend the extra $50 for an EE drive versus a RE drive?

Sector reallocation methods

DE hard drive manufacturers expect that the unit will be used as a single drive in the system and they know there is likely only one copy of the data available. Should something bad happen, there's probably not going to be a backup or failover to read from, so the manufacturer will implement features in the drive that go through a monumental amount of effort to recover and reallocate a detected bad sector.

This process in a desktop unit can take upwards of 2 minutes, and a RAID controller will only allow a drive to be in an offline state for upwards of 20 seconds before marking it as bad and alerting you (you remembered to setup alerting, right?).

An EE and RE drive disables this feature and will attempt to recover a bad sector by either reading a checksum of the data on the same drive to remap (see Enterprise ECC below), or it will query the RAID controller to pull the bad information from another drive in the RAID set, then write the good information to a remapped sector. This process only takes a few seconds to do, and will not cause the drive to be marked as offline.

Break-step methods and vibration control

The DE hard drive has some vibration compensation mechanisms built in, but they are purely physical in nature. There may be a rubber grommet here and there, but overall it's not expecting a heavy amount of vibration to occur inside your home chassis. By contrast, an EE or RE drive manufacturer expects that their drive will be placed right next to another drive of similar ilk, will be in a chassis that has several fans, and may also be sitting on top of or sandwiched between even more servers that have the same vibration creators.

Vibration, of course, is a bad thing to a precision instrument where an arm attached to a motor is trying to find a specific sector. Think of yourself next to a record player trying to position the needle on a specific Led Zeppelin track and your kids keep bumping in to you.

On a DE drive, the vibration compensation methods are not as advanced, and as such when data is written to the drive it's entirely probable that the data may be written off-track slightly and be misaligned. Try drawing a straight line on paper in a truck. That misalignment leads to eventual data corruption and failure of the drive.

EE and RE drives however have some pretty cool technologies in them that compensate for these harsh environments. They have sensors that detect exactly where the head position is, and exactly how much vibration the drive is receiving at that moment in time. If the drive receives a vibration and detects that the head is not exactly where it needs to be, it reacts by either increasing power to the actuator arm to push itself into position, or it will wait for the drive to spin around again before attempting to write the sector. Those detection sensors determine their location via "servo wedges" in the data track. EE drives have dedicated processors to determine their head positions by these servo wedges.

I've been told by a Seagate representative at a conference that their Enterprise class drives also introduce "break step" methods to reduce overall vibrations in a chassis. Think of an army crossing a bridge in lock formation. If they continue their lock formation, the vibration of their steps may cause the bridge to collapse, so they break step when crossing. Supposedly the EE drive from Seagate will detect the vibration of the neighboring drives. If it determines that it is starting to cause an exponential hum it will slightly alter the rotational speed of its platters to ensure that it breaks step from its neighbor, reducing overall vibration.

Vibrations are a bad thing to performance. Every time the RE and EE sensors determine that it needs to spin the platter around again because it's going to miss due to detected vibration, that's more of a delay in writing your data. According to Intel, performance loss of up to 90% has been observed in some tests. The data is safe, but performance suffers. If you place 15,000 RPM drives in a poorly designed chassis, it's possible to get less performance than using a 5,400 RPM drive. It's important that the chassis is designed to reduce as much vibration as possible, but at least you know that with an EE or RE drive they will compensate for it at the expense of performance.

Error correction and control

In a server environment, it's critical that error correction be implemented "bumper to bumper." ECC should be present in the memory you choose to implement all the way through to the storage medium. One major difference in EE drives versus desktop and most RE drives is the memory buffer that sits between the interface circuitry and the formatter. On the consumer class drives, if an error occurs within the memory buffers on a hard drive there is no way to detect that an error actually occurred, and the bad data will be written to the hard drive as-is. When it is read back, the system will treat it as normal data. This could mean the difference between an employee's evaluation report indicating that he was "fired" instead of "tired" or worse, a severe corruption of partition information. The corrupted data will transfer over to your other RAID drives as well because the computer thinks the data is perfect.

The EE drives include ECC architecture to perform checksums on the data in the buffer memory to ensure that if an error does occur, it's corrected through the magical power of math.

The error correction doesn't stop there though, and here's why it's critical to select SAS over SATA (at least for the time being). SCSI and SAS drives can vary the sector size, keeping that tidbit hidden from the operating system. Instead of your standard 512 byte sector, they can grow up to 528 bytes. EE drives utilize this extra space to store sector checksum information. If it detects that a sector is bad it can quickly rebuild that bad data on another sector by using the information in the checksum. SATA drives have a minuscule amount of space at the end of each sector to determine if the sector is bad, but not enough space that it can store information to rebuild the data. Because of this extra checksum overhead, that's why you'll typically see that SAS drives do not have the same storage capacity of their SATA brethren.

Conclusion

The more drives you add to a system, you exponentially increase the potential problems you will be dealing with. Proper selection of hardware for the intended purpose is critical in ensuring reliability of the overall solution.

For server environments, data integrity and reliability should always trump speed and capacity selections when it comes down to limited budgets, which is generally the opposite of the selection criteria for desktop environments.

The selection of hard drives is not a "one size fits all" deal. At the minimum, RE class drives should be selected in any environment where you will be using a RAID on a desktop, and EE class drives should be used in any environment where you will be using the drives in a server RAID. If SAS is available for the server RAID controller, use it instead of SATA (SAS also supports more than 65,000 connected drives versus however many SATA ports you have on your SATA RAID card, generally six at most).

Never use RE class drives in a single drive, non-RAID environment as they do not have the deep recovery methods that DE drives use.

Learn more about Virtual World Technologies® and our Virtual I.T.® managed services solutions at www.govwt.com.

No comments:

Post a Comment