Microsoft Virtualization Discussions

Flexclone list?

DJBAKER123

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

1 ACCEPTED SOLUTION

lobanov

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

}

View solution in original post

2 REPLIES 2

lobanov

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

}

View solution in original post

DJBAKER123

Awesome, that works, thanks!

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public