This is a DSC Resource Module to Create Storage Pools in Azure.

This module can create Virtual Disks, Volumes/MountPoints and Storage Pools, however it does not remove or update configurations.

I.e. it is useful for provisioning, however will not enable you to change configurations later on.

 

* Note we default the Column Count of the Storage Pool to 0 unless you provide a value.

You should always use a Column Count equal to the number of disks that you may want to add to the Storage Pool later on.

With a column count of 2 you have to add 2 disks when extending the pool

 

i.e. if you have 4 * 1TB disks with a column count of 2, then you can extend the pool to 6 * 1TB disks.

 

Here is a sample Configuration and ConfigurationData for configuring the Storage Pool

 

The latest version of this is on GitHub https://github.com/brwilkinson/StoragePoolDSC 

PowerShell
Edit|Remove
Configuration MyServerConfig 
{ 
    Import-DscResource -ModuleName StoragePoolcustom 
 
    Node localhost 
    { 
        # Storage Pool Drives 
        foreach ($Pool in $Node.StoragePools) 
        { 
            StoragePool $Pool.DriveLetter 
            { 
                FriendlyName = ($SQLInstanceName + '_' + $Pool.FriendlyName) 
                DriveLetter  = $Pool.DriveLetter 
                LUNS         = $Pool.LUNS 
                ColumnCount  = $(if ($Pool.ColumnCount) { $Pool.ColumnCount } else { 0 }) 
            } 
            $dependsonStoragePoolsPresent += @("[StoragePool]$($disk.DriveLetter)" 
        } 
        #------------------------------------------------------------------ 
 
        # Disk for the Mount Points 
        foreach ($disk in $Node.DisksPresent) 
        { 
            xDisk $disk.DriveLetter 
            { 
                DiskID      = $disk.DiskID 
                DriveLetter = $disk.DriveLetter 
            } 
            $dependsonDisksPresent += @("[xDisk]$($disk.DriveLetter)") 
        } 
        #------------------------------------------------------------------ 
 
        # Storage Pool Mount Points 
        foreach ($Pool in $Node.StoragePoolsMount) 
        { 
            StoragePoolMount $Pool.AccessPath 
            { 
                FriendlyName = $Pool.FriendlyName 
                AccessPath   = $Pool.AccessPath 
                LUNS         = $Pool.LUNS 
                ColumnCount  = $(if ($Pool.ColumnCount) {$Pool.ColumnCount} else {0}) 
                dependson    = $dependsonDisksPresent 
            } 
            $dependsonStoragePoolsPresent += @("[xDStoragePoolMountisk]$($disk.AccessPath)") 
        } 
        #------------------------------------------------------------------ 
    } 
} 
 
 
# 
# ConfigurationDataSQL1.psd1 
# 
$CD = @{ 
    AllNodes = @( 
        @{ 
            NodeName       = "localhost" 
 
            StoragePools        = @{ FriendlyName = 'DATA'   ; DriveLetter = 'F' ; LUNS = (0,1,2,3);ColumnCount = 2}, 
                                  @{ FriendlyName = 'LOGS'   ; DriveLetter = 'G' ; LUNS = (8)}, 
                                  @{ FriendlyName = 'TEMPDB' ; DriveLetter = 'H' ; LUNS = (12)}, 
                                  @{ FriendlyName = 'BACKUP' ; DriveLetter = 'I' ; LUNS = (15)} 
 
         } 
     ) 
} 
MyServerConfig -ConfigurationData $CD 
 
 
# 
# ConfigurationDataSQL2.psd1 
# 
$CD = @{ 
    AllNodes = @( 
        @{ 
            NodeName            = "localhost" 
 
            DisksPresent        = @{DriveLetter="F"; DiskID="2"} 
 
            StoragePoolsMount   = @{ FriendlyName = 'DATA'   ; LUNS = (1, 2, 3, 4) ; AccessPath = 'F:\DATA'; ColumnCount = 2}, 
                                  @{ FriendlyName = 'LOGS'   ; LUNS = (8)     ; AccessPath = 'F:\LOGS'}, 
                                  @{ FriendlyName = 'TEMPDB'   ; LUNS = (12) ; AccessPath = 'F:\TEMPDB'}, 
                                  @{ FriendlyName = 'BACKUP'   ; LUNS = (15) ; AccessPath = 'F:\BACKUP'} 
 
         } 
     ) 
} 
MyServerConfig -ConfigurationData $CD