Hi,
We are trying to extend the storage pool in a Windows Clustered Storage.
The "Always On availability groups" feature is enabled on two VMs.
This should be automated. The following commands are working on a single SQL Server (not in a cluster).
But it doesn't seem to work on SQL Server AlwaysOn instances. Why is that?
$physicalDisksToAdd = Get-PhysicalDisk -CanPool $True
$physicalDisksToAdd
Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage Size
7 Msft Virtual Disk Unspecified True OK Healthy Auto-Select 200 GB
$targetLUN = "3"
$targetLUN
3
$physicalDiskToAdd = $physicalDisksToAdd | Where-Object { $_.PhysicalLocation -match "LUN\s*$targetLUN" }
$physicalDiskToAdd
Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage Size
7 Msft Virtual Disk Unspecified True OK Healthy Auto-Select 200 GB
$storagePool = Get-StoragePool -FriendlyName "SQLVMStoragePool1" | Select-Object -first 1
$storagePool
FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly Size AllocatedSize
SQLVMStoragePool1 OK Healthy False False 255.48 GB 255.25 GB
Add-PhysicalDisk -StoragePoolFriendlyName $storagePool.FriendlyName -PhysicalDisks $physicalDiskToAdd
Add-PhysicalDisk : One or more parameter values passed to the method were invalid.
At line:1 char:1