One more, total volumes allocated - ([system.math]::round((get-naaggrspace | measure -sum sizevolumeallocated).sum/1gb,2)) I assume that adds up thin provisioned as well, i'm going to check that in the lab
... View more
Ok, so i either have a brainfreeze or there isn't an easier way to do this. basically, sum up all the aggregates total, available and sum up total raw capacity. Total size = ([system.math]::floor((get-naaggr | measure -sum Totalsize).sum/1gb)) Total Available = ([system.math]::floor((get-naaggr | measure -sum available).sum/1gb)) Raw Disk = ([system.math]::floor((get-nadisk | ? {$_.status -ne "partner"} | measure -sum usedspace).sum/1gb)) Is this the only way?
... View more
Joel - Slow down a little ... It's not working because it's an array of objects. That's why. I know your just getting started with PS, you need to read up on it a little. Can't all be trial by fire
... View more
Matt - Interesting... you can always created a custom object and redo it if you want, but why would we do that 🙂 What exactly do you need the system.datetime for in this cmdlet?
... View more
Joel - Your first example isn't going to work because you don't loop through the array. Also, you don't really need to create custom objects in this example b/c they are already created Why do you need a list of volumes in a row?
... View more
I still think it's easier to turnon and turnoff with a scheduled task. Thats just my opinion as for setting credentials, you can store your credentials in cache, or you can write a security object and pass it to the connection C:\PS>$password = ConvertTo-SecureString "p@ssword" -AsPlainText -Force $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "root",$password Connect-NaController benson -Credential $cred
... View more
Yeah - that's easy $global=@() [Int64]$Unit=1GB $vols = Get-navol $vols | % { $volume = $_ $size = ([System.Math]::Floor($_.totalsize/$unit)) $autosize = get-navolautosize $volume -ea "silentlycontinue" If ($autosize.isEnabled) { $customobject = new-object psobject add-member -inputobject $customobject -membertype noteproperty -name Volume -value $volume add-member -inputobject $customobject -membertype noteproperty -name size -value $size add-member -inputobject $customobject -membertype noteproperty -name Autosize -value "enabled" add-member -inputobject $customobject -membertype noteproperty -name Max -value ([System.Math]::Floor($autosize.maximumsize/$unit)) add-member -inputobject $customobject -membertype noteproperty -name increment -value ([System.Math]::Floor($autosize.incrementsize/$unit)) $global += $customobject } } $global | ft -autosize Ok - enjoy, I need to get back to work.. if you want total volsize, use that full cmdlet. As for objects, you need to read up on them, they are pretty powerful
... View more
Floor is just round down to next whole number.. You can play with the formatting, but you should be more interested in the custom objects. You can export and import them.. Much easier for scripting
... View more
You're looking for something like this $autosize = get-navolautosize $name -ea "silentlycontinue" $unit = 1gb If ($autosize.isEnabled) { [System.Math]::Floor($autosize.maximumsize/$unit) [System.Math]::Floor($autosize.incrementsize/$unit) } You can start with that in your loop, I use that for an excel output so it's a little different, but those are the properties you need So in your case $vols = Get-navol $vols | % { $volume = $_ $autosize = get-navolautosize $name -ea "silentlycontinue" $unit = 1gb If ($autosize.isEnabled) { $max = [System.Math]::Floor($autosize.maximumsize/$unit) $inc = [System.Math]::Floor($autosize.incrementsize/$unit) write-host "Autosize: enabled " & "maximum size: " $max & "increment size: " $inc } Give that a shot, I didn't test it
... View more
What version of Ontap are you running? You need to be at a certain level to use the -u function vfiler dr configure -l root:password -e vifname:10.10.1.1:255.255.255.0 -u srcvfiler@srcfiler
... View more
Added to the list as well.. Max Multiplex = 33, Max pBlk Exhaust = 53221316, Max pBlk Reserve Exhaust = 157 We can't determine if it's deswizzle of volumes causing cpu to spike to 100% or if it's vscan. We disabled vscan and we think we were still exhausting.. runnin 8.1.3p1 any ideas?
... View more
update rc / hosts / dns If you are serving cifs or it's part of a domain, drop it to workgroup mode, re-add as new name. takeover, giveback As for DFM, it will pick it up at the next polling cycle..
... View more