Thursday, January 6, 2011

Windows 7: Setting Up RAID

The two potential advantages of setting up hard drives in a RAID array seemed to be performance and/or safety.  Among the many types of RAID arrays, some of the more frequently mentioned were RAID 0, RAID 1, and RAID 5.

RAID 0 used a "striping" approach where data was divided between hard drives.  This was intended to speed up data reading.  The drawback was that failure of either drive would mean loss of all data, since the data was stored on the drives in a puzzle-like form that could not be reconstructed without all of the pieces from both drives.  If someone had a RAID 0 array containing 100 drives, and if the whole array would fail as soon as any one drive failed, the safety of the whole array would be only as great as the safety of its weakest drive.  So the performance improvements of RAID 0 meant greater risk of data loss.

RAID 1 used a mirroring approach where everything was written onto disk 1, but simultaneously copied to disk 2.  This would not speed things up at all; if anything, it would slow things down a bit, as the system coped with twice as much data.  The purpose of RAID 1 was safety.  Either drive could fail, and yet no data would be lost.  If the computer was set up so as to let the user know that a drive had failed, then s/he could just replace the failed drive and let the RAID array fill in the new replacement with the current state of the data.

RAID 5 used a striping approach, for speed, combined with a distribution scheme for safety.   A RAID 5 array would have at least three drives.  Failure of one drive would reduce performance but would not result in data loss.

As of this writing, Microsoft was not providing clear information regarding which versions of Windows 7 offered which kinds of RAID.  Informal reports indicated that only RAID0 and RAID1 were available in user versions of Win7, and that RAID5 (and perhaps other kinds) were available in server versions of Win7.  Acronis said that RAID5 was available only in Windows Server 2000, 2003, and 2008.  The approach I planned to take, then, was to set up a RAID0 array with good backup.

To set up the array, I typed diskmgmt.msc in the Start button > Search programs and files box.  That opened up Disk Management.  The disks I wanted to put into my array were Disk 0 and Disk 1.  First, I wanted to set up a 50GB array called PROGRAMS to contain Windows program files.  I right-clicked on the gray part of the Disk Management window where it said "Disk 0" and chose "New striped volume."  This opened the New Striped Volume Wizard.  I added Disk 0 and Disk 1 to the Selected box, specified 25600MB space (on each drive, for a total of 50GB).  I looked into allocation unit size briefly and decided to stick with the default.  As I had gathered elsewhere, I didn't have to worry about the question of converting the disks from basic to dynamic because that was unavoidable with striping, and now I was at the point where the wizard was going to take care of it.

There were some other things I wanted to put into RAID0 arrays for speed.  Examples included virtual machines and files on which I would be doing video editing.  I set up arrays for those.  But there were also some things that I didn't want to put into a RAID0 array.  These were items that were big and bulky, and therefore would take a lot of time to back up, but were not performance-intensive.  General-purpose storage would fall into this category.  If I wanted performance in that area, I could move those items out of storage and into a RAID0 workspace.  For storage, I considered using a spanned volume that would put half of the data on each of the two hard drives, so as to reduce the amount of data that I would have to restore if either drive did fail.  But it sounded like restoring data from a spanned volume could be tricky, so I thought I might just divide the stored data into two separate partitions, one on each disk.  To do that, I used the "New simple volume" option in Disk Management.

There didn't seem to be any point in trying to set up a RAID volume for an Ubuntu dual-boot.  This was software RAID, governed by the Windows operating system.  Windows allowed the user to allocate only part of a drive to RAID, and as far as I knew Ubuntu set aside whole disks in a hardware RAID array.  I did set aside some space for Ubuntu program installation, however.

With the partitions set up, the next goal was to restore my Windows 7 installation to the PROGRAMS array.  That became a whole ordeal in itself, as described in a separate post.