RAID Configuration on Windows
With Amazon EBS, you can use any of the standard RAID configurations that you can use with a traditional bare metal server, as long as that particular RAID configuration is supported by the operating system for your instance. This is because all RAID is accomplished at the software level. For greater I/O performance than you can achieve with a single volume, RAID 0 can stripe multiple volumes together; for on-instance redundancy, RAID 1 can mirror two volumes together.
Amazon EBS volume data is replicated across multiple servers in an Availability Zone to prevent the loss of data from the failure of any single component. This replication makes Amazon EBS volumes ten times more reliable than typical commodity disk drives. For more information, see Amazon EBS Availability and Durability in the Amazon EBS product detail pages.
You should avoid booting from a RAID volume. Grub is typically installed on only one device in a RAID array, and if one of the mirrored devices fails, you may be unable to boot the operating system.
If you need to create a RAID array on a Linux instance, see RAID Configuration on Linux in the Amazon EC2 User Guide for Linux Instances.
RAID Configuration Options
The following table compares the common RAID 0 and RAID 1 options.
When I/O performance is more important than fault tolerance; for example, as in a heavily used database (where data replication is already set up separately).
I/O is distributed across the volumes in a stripe. If you add a volume, you get the straight addition of throughput.
Performance of the stripe is limited to the worst performing volume in the set. Loss of a single volume results in a complete data loss for the array.
When fault tolerance is more important than I/O performance; for example, as in a critical application.
Safer from the standpoint of data durability.
Does not provide a write performance improvement; requires more Amazon EC2 to Amazon EBS bandwidth than non-RAID configurations because the data is written to multiple volumes simultaneously.
RAID 5 and RAID 6 are not recommended for Amazon EBS because the parity write operations of these RAID modes consume some of the IOPS available to your volumes. Depending on the configuration of your RAID array, these RAID modes provide 20-30% fewer usable IOPS than a RAID 0 configuration. Increased cost is a factor with these RAID modes as well; when using identical volume sizes and speeds, a 2-volume RAID 0 array can outperform a 4-volume RAID 6 array that costs twice as much.
Creating a RAID 0 array allows you to achieve a higher level of performance for a file system than you can provision on a single Amazon EBS volume. A RAID 1 array offers a "mirror" of your data for extra redundancy. Before you perform this procedure, you need to decide how large your RAID array should be and how many IOPS you want to provision.
The resulting size of a RAID 0 array is the sum of the sizes of the volumes within it, and the bandwidth is the sum of the available bandwidth of the volumes within it. The resulting size and bandwidth of a RAID 1 array is equal to the size and bandwidth of the volumes in the array. For example, two 500 GiB Amazon EBS volumes with 4,000 provisioned IOPS each will create a 1000 GiB RAID 0 array with an available bandwidth of 8,000 IOPS and 640 MB/s of throughput or a 500 GiB RAID 1 array with an available bandwidth of 4,000 IOPS and 320 MB/s of throughput.
This documentation provides basic RAID setup examples. For more information about RAID configuration, performance, and recovery, see the Linux RAID Wiki at https://raid.wiki.kernel.org/index.php/Linux_Raid.
Creating a RAID Array on Windows
Use the following procedure to create the RAID array. Note that you can get directions for Linux instances from Creating a RAID Array on Linux in the Amazon EC2 User Guide for Linux Instances.
To create a RAID array on Windows
Create the Amazon EBS volumes for your array. For more information, see Creating an Amazon EBS Volume.
Create volumes with identical size and IOPS performance values for your array. Make sure you do not create an array that exceeds the available bandwidth of your EC2 instance. For more information, see Amazon EC2 Instance Configuration.
Attach the Amazon EBS volumes to the instance that you want to host the array. For more information, see Attaching an Amazon EBS Volume to an Instance.
Connect to your Windows instance. For more information, see Connecting to Your Windows Instance.
Open a command prompt and type the diskpart command.
diskpartMicrosoft DiskPart version 6.1.7601 Copyright (C) 1999-2008 Microsoft Corporation. On computer: WIN-BM6QPPL51CO
DISKPARTprompt, list the available disks with the following command.
list diskDisk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 30 GB 0 B Disk 1 Online 8 GB 0 B Disk 2 Online 8 GB 0 B Disk 3 Online 8 GB 0 B Disk 4 Online 8 GB 0 B Disk 5 Online 419 GB 0 B Disk 6 Online 419 GB 0 B
Identify the disks you want to use in your array and take note of their disk numbers.
Each disk you want to use in your array must be an online dynamic disk that does not contain any existing volumes. Use the following steps to convert basic disks to dynamic disks and to delete any existing volumes.
Select a disk you want to use in your array with the following command, substituting
nwith your disk number.
nis now the selected disk.
If the selected disk is listed as
Offline, bring it online by running the online disk command.
If the selected disk does not have an asterisk in the
Dyncolumn in the previous list disk command output, you need to convert it to a dynamic disk.
If you receive an error that the disk is write protected, you can clear the read-only flag with the ATTRIBUTE DISK CLEAR READONLY command and then try the dynamic disk conversion again.
Use the detail disk command to check for existing volumes on the selected disk.
detail diskXENSRC PVDISK SCSI Disk Device Disk ID: 2D8BF659 Type : SCSI Status : Online Path : 0 Target : 1 LUN ID : 0 Location Path : PCIROOT(0)#PCI(0300)#SCSI(P00T01L00) Current Read-only State : No Read-only : No Boot Disk : No Pagefile Disk : No Hibernation File Disk : No Crashdump Disk : No Clustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 2 D NEW VOLUME FAT32 Simple 8189 MB Healthy
Note any volume numbers on the disk. In this example, the volume number is
2. If there are no volumes, you can skip the next step.
(Only required if volumes were identified in the previous step) Select and delete any existing volumes on the disk that you identified in the previous step.
This destroys any existing data on the volume.
Select the volume, substituting
nwith your volume number.
nis the selected volume.
Delete the volume.
delete volumeDiskPart successfully deleted the volume.
Repeat these substeps for each volume you need to delete on the selected disk.
Repeat Step 6 for each disk you want to use in your array.
Verify that the disks you want to use are now dynamic.
list diskDisk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 30 GB 0 B Disk 1 Online 8 GB 0 B * Disk 2 Online 8 GB 0 B * Disk 3 Online 8 GB 0 B * * Disk 4 Online 8 GB 0 B * Disk 5 Online 419 GB 0 B Disk 6 Online 419 GB 0 B
Create your raid array. On Windows, a RAID 0 volume is referred to as a striped volume and a RAID 1 volume is referred to as a mirrored volume.
(Striped volumes only) To create a striped volume array on disks 1 and 2, use the following command (note the
stripeoption to stripe the array):
create volume stripe disk=1,2DiskPart successfully created the volume.
(Mirrored volumes only) To create a mirrored volume array on disks 3 and 4, use the following command (note the
mirroroption to mirror the array):
create volume mirror disk=3,4DiskPart successfully created the volume.
Verify your new volume.
list volumeVolume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 C NTFS Partition 29 GB Healthy System * Volume 1 RAW Mirror 8190 MB Healthy Volume 2 RAW Stripe 15 GB Healthy Volume 5 Z Temporary S NTFS Partition 419 GB Healthy Volume 6 Y Temporary S NTFS Partition 419 GB Healthy
Note that for this example the
Typecolumn lists a
Mirrorvolume and a
Select and format your volume so that you can begin using it.
Select the volume you want to format, substituting
nwith your volume number.
nis the selected volume.
Format the volume.
To perform a full format, omit the
format quick recommended label="100 percent completed DiskPart successfully formatted the volume.
My new volume"
Assign an available drive letter to your volume.
assign letterDiskPart successfully assigned the drive letter or mount point.
Your new volume is now ready to use.