For PowerShell lovers
Now everything the same but with no GUI.
- Creating a new space.
- Select physical disks and add to the pool:
$phydisk = Get-PhysicalDisk –CanPool $true | Where BusType -eq "SAS"
- Getting a disk subsystem for a pool:
$stsubsys = Get-StorageSubsystem
- Create a new pool:
$pool = New-StoragePool -FriendlyName TestPool -StorageSubsystemFriendlyName $stsubsys**.**FriendlyName -PhysicalDisks $phydisk -ProvisioningTypeDefault Fixed
- Adding a hot spare drive:
$hotSpareDisk = Get-PhysicalDisk –CanPool $true |Out-GridView -PassThru
Add-PhysicalDisk -StoragePoolFriendlyName TestPool -PhysicalDisks $hotSpareDisk -Usage HotSpare
- Creating a data space on top of a previously created pool:
$newSpace = New-VirtualDisk –StoragePoolFriendlyName TestPool –FriendlyName space1 -Size (1GB) -ResiliencySettingName Mirror
- Initialization, markup and formatting of a previously created data space:
$spaceDisk = $newSpace | Get-Disk
Initialize-Disk -Number $spaceDisk.Number -PartitionStyle GPT
$partition = New-Partition -DiskNumber $spaceDisk.Number -DriveLetter $driveletter -size $spaceDisk.LargestFreeExtent
Format-Volume -Partition $partition -FileSystem NTFS
- Adding data space to the cluster:
$space = Get-VirtualDisk -FriendlyName space1
Add-ClusterDisk $space