How to create striped disk on azure (AKA Raid 0)

Disk Striping use multiple disks and stripe them together to get a combined higher IOPS and Throughput limit. Note that the combined limit per VM should be higher than the combined limits of attached premium disks.

You can check the maximum number of disks you can add to a virtual machine from here: Sizes for Windows virtual machines in Azure

1. Create “new disk” from powershell:

clear

# RM stands for resource manager, and is the new way of managing things in Azure

# you need to login the first time using this command
# Login-AzureRmAccount

$vm = Get-AzureRmVM -ResourceGroupName "md-test-stripe" -Name "md-test-stripe"

# adds 16 disks
for($i=1; $i -le 16; $i++) {
    $name = "md-test-stripe-disk{0:00}" -f $i
    $lun = $i - 1
    $vhdUri = "https://mdteststripedisks447.blob.core.windows.net/vhds/md-test-stripe-disk{0:00}.vhd" -f $i

    Write-Host "Add-AzureRmVMDataDisk -VM $vm -Name $name -DiskSizeInGB 16 -Lun $lun -Caching None -VhdUri $vhdUri -CreateOption Empty"

    $vm = Add-AzureRmVMDataDisk -VM $vm -Name $name -DiskSizeInGB 16 -Lun $lun -Caching None -VhdUri $vhdUri -CreateOption Empty
}

$vm.DataDiskNames

# uncomment when you are ready, this updates the VM on azure!
# Update-AzureRmVM -ResourceGroupName "md-test-stripe" -VM $vm

2. Create “new storage pool” from server manager with all the new disks you added

3. Create “new virtual disk” from powershell:

New-VirtualDisk -FriendlyName "sql-stripe" -StoragePoolFriendlyName "sql-stripe" -Interleave 65536 -NumberOfColumns 16 -ProvisioningType Fixed -ResiliencySettingName "Simple" -UseMaximumSize

4. Create “new volume” from server manager formatting in NTFS with allocation unit size set to 64KB

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: