hi luc,
i am in process of implementing datastorecluster .
i found that it should be enabled at datacenter level only and we cant mix nfs and vmfs datastores.is that correct?
can yu please check the orange lines as
1:its not prompting me to enter datastorecluster name .i think we can define second prameter in same param block .
2:what should be the correct suntax if we want to use datastores to start rebalincing once they utilize 90 percent of free space.
set-datastorecluster
function set-storagecluster_utilities
{
[cmdletbinding()]
param (
[parameter(mandatory = $true,
valuefrompipeline = $true,
valuefrompipelinebypropertyname = $true)]
[string]$datacenter,
[string]$datastoreclustername
)
$dc=get-datacenter -name $datacenter
$sum0f_datastores=get-datastore -RelatedObject $dc|Measure-Object -Property capacityGB -sum|select -ExpandProperty sum
$sumof_provisionedspace_vms= get-vm -Location $dc|Measure-Object -Property provisionedspaceGb -sum|select -ExpandProperty sum
$res=Read-Host "do yu wnt to create datastore cluster y/n"
if($res -eq 'y')
{
$output = New-Object -TypeName PSObject
$output|Add-Member -MemberType NoteProperty -Name 'sumof_datastoresGB' -Value ([math]::Round($sum0f_datastores))
$output|Add-Member -MemberType NoteProperty -Name 'sumofvmsprovisionedspaceGB' -Value ([math]::Round($sumof_provisionedspace_vms))
$output
New-DatastoreCluster -name $datastoreclustername -Location $datacenter -WhatIf
Set-DatastoreCluster -DatastoreCluster $datastoreclustername -whatif
}
function set-storagecluster_utilities
{
[cmdletbinding()]
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
[string]$datacenter,
[Parameter(Mandatory=$true)]
[string]$datastoreclustername
)
$dc = Get-Datacenter -Name $datacenter
$sum0f_datastores = Get-Datastore -RelatedObject $dc | Measure-Object -Property capacityGB -Sum | select -ExpandProperty sum
$sumof_provisionedspace_vms = Get-VM -Location $dc | Measure-Object -Property provisionedspaceGb -Sum | select -ExpandProperty sum
$res = Read-Host "do yu wnt to create datastore cluster y/n"
if($res -eq 'y')
{
$output = New-Object -TypeName PSObject
$output | Add-Member -MemberType NoteProperty -Name 'sumof_datastoresGB' -Value ([math]::Round($sum0f_datastores))
$output | Add-Member -MemberType NoteProperty -Name 'sumofvmsprovisionedspaceGB' -Value ([math]::Round($sumof_provisionedspace_vms))
$output
New-DatastoreCluster -Name $datastoreclustername -Location $datacenter -WhatIf
Set-DatastoreCluster -DatastoreCluster $datastoreclustername -whatif
}
}
Get-DatastoreCluster -Name MyDSC |
Set-DatastoreCluster -SpaceUtilizationThresholdPercent 90 -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
function set-storagecluster_utilities
{
[cmdletbinding()]
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
[string]$datacenter,
[Parameter(Mandatory=$true)]
[string]$datastoreclustername
)
$dc = Get-Datacenter -Name $datacenter
$sum0f_datastores = Get-Datastore -RelatedObject $dc | Measure-Object -Property capacityGB -Sum | select -ExpandProperty sum
$sumof_provisionedspace_vms = Get-VM -Location $dc | Measure-Object -Property provisionedspaceGb -Sum | select -ExpandProperty sum
$res = Read-Host "do yu wnt to create datastore cluster y/n"
if($res -eq 'y')
{
$output = New-Object -TypeName PSObject
$output | Add-Member -MemberType NoteProperty -Name 'sumof_datastoresGB' -Value ([math]::Round($sum0f_datastores))
$output | Add-Member -MemberType NoteProperty -Name 'sumofvmsprovisionedspaceGB' -Value ([math]::Round($sumof_provisionedspace_vms))
$output
New-DatastoreCluster -Name $datastoreclustername -Location $datacenter -WhatIf
Set-DatastoreCluster -DatastoreCluster $datastoreclustername -whatif
}
}
Get-DatastoreCluster -Name MyDSC |
Set-DatastoreCluster -SpaceUtilizationThresholdPercent 90 -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc.
i see few more options to be configured
i am putting sdrsautomationlevel to fullyautomatic.
could you suggest something about first two
i/olatencythresholdmillisecond and ioloadbalanceenabled.
First you need to decide if the IOLatency settings should be enabled yes or no.
I would advise to consult with your storage supplier, since this varies from vendor to vendor and from unittype to unittype.
For the IO latency, when I use it, I mostly left it to the default 15 ms.
But again it's better to consult with your storage vendor, or check in that storage Best Practices guide.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc.