Subscribe
Accepted Solution

Flexclone list?

Is there an OnTap powershell command (or something someone wrote) that can display Volume Flexclones?  I want to retrieve a list of flexclone volumes with their parent snapshot, similar to what is seem in filerview -> Volumes->flexclone volumes->manage.

Thanks,

Dan

Re: Flexclone list?

Get-NaVol | Where {$_.CloneParent -ne $null -and $_.CloneParent[0].ParentVolumeName -eq "<parent volume name>"}

Let say my <patent volume name> is Win2K8R2SP1_MASTER, Executing command:

Get-NaVol | Where {$_.CloneParent -ne $null -and $_.CloneParent[0].ParentVolumeName -eq "Win2K8R2SP1_MASTER"}

gives me list of all FlexClones created from Win2K8R2SP1_MASTER volume. Also using $_.CloneParent[0].ParentSnapshotName in Where statement can add additional filtering for specific snapshot used for FlexClone.

If you want to display list of Flex Clones with their Parent Volume and Snapshot:

$FlexClones = Get-NaVol | Where {$_.CloneParent -ne $null -and $_.CloneParent[0].ParentVolumeName -eq "<parent volume name>"}

ForEach  ($FlexClone in FlexClones)

{

  $FlexClone.Name

  $FlexClone.CloneParent[0].ParentVolumeName

  $FlexClone.CloneParent[0].ParentSnapshotName

}

Re: Flexclone list?

Awesome, that works, thanks!