Subscribe
Accepted Solution

Check if aggregate exists

Hi all,

is it possible to check if an aggregate exists? If yes, how to do it? If not how to catch and hide the error?

Thank you,

Lukas

Re: Check if aggregate exists

hello,

there is many way to list existing aggregat

aggr status,

aggr status -r ( to show raid detail)

df -Ag

aggr show_space -g

Re: Check if aggregate exists

Hi,

yes, i know, but can you provide me a sample script with options when a aggrete not exists?

thx

Re: Check if aggregate exists

Hi Lukas,

  I use this: 

if ( Get-NaAggr | ? { $_.Name -ieq "aggrname" } )

{

  ..  Aggr exists, do this

}

else

{

  .. Does not exist...

}

Re: Check if aggregate exists

Hi,

thank you very much! This is what I looking for!

Lukas