NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Microsoft Virtualization Discussions

Get-NaSnapMirror (7 mode) and Get-NcSnapMirror (cDOT Cluster Mode)

ernest_brant
6,686 Views

Hello

 

Can someone please help with the following question.

 

We have a number of script using the NetApp PowerShell toolkit cmdlets which we have been using against 7 mode filers.

 

We are now upgrading to cDOT filers and I notice there is a lot of difference betweent the properties return via the above two command for example

 

if I do a Get-NaSnapMirror against a 7 mode volume it returns (I have change the names below for security)

 

Source : bovErnie:ATOntdata
Destination : whyErnie:ATOntdata
BaseSnapshot : whyErnie(1918096640)_ATOntdata.875
Contents : -
CurrentTransferError :
CurrentTransferType :
DestinationLocation : whyErnie:ATOntdata
InodesReplicated :
LagTime : 49678
LagTimeTS : 13:47:58
LastTransferDuration : 65
LastTransferDurationTS : 00:01:05
LastTransferFrom : -
LastTransferSize : 21528576
LastTransferType : -
MirrorTimestamp : 1437609603
MirrorTimestampDT : 23/07/2015 01:00:03
ReplicationOps :
SourceLocation : bovErnie:ATOntdata
State : source
Status : idle
TransferProgress : 0
InodesReplicatedSpecified : False
ReplicationOpsSpecified : False

 

If I run the same command against a cDOT vServer I get

 

NewestSnapshot=snapmirror.14d7295f-e4f7-11e4-9872-00a0985e53ea_3_2147484673.2015-07-23_142500
NewestSnapshotTimestamp=1437657900
NewestSnapshotTimestampDT=23/07/2015 14:25:00
Policy=
PolicyType=
ProgressLastUpdated=
RelationshipControlPlane=v1
RelationshipGroupType=
RelationshipId=
RelationshipProgress=
RelationshipStatus=idle
RelationshipType=load_sharing
ResyncFailedCount=
ResyncSuccessfulCount=
Schedule=5min
SnapshotCheckpoint=
SnapshotProgress=
SourceCluster=MyStoragecluster02
SourceLocation=MyStoragecluster02://MyStoragevs01/MyStoragevs01_root
SourceVolume=MyStoragevs01_root
SourceVserver=MyStoragevs01
SourceVserverUuid=
TotalTransferBytes=
TotalTransferTimeSecs=
TransferSnapshot=
Tries=8
UnhealthyReason=
UpdateFailedCount=
UpdateSuccessfulCount=
Vserver=MyStoragevs01
BreakFailedCountSpecified=False
BreakSuccessfulCountSpecified=False
CurrentMaxTransferRateSpecified=False
ExportedSnapshotTimestampSpecified=True
FileRestoreFileCountSpecified=False
IdentityPreserveSpecified=False
IsConstituentSpecified=True
IsHealthySpecified=True
LagTimeSpecified=False
LastTransferDurationSpecified=False
LastTransferEndTimestampSpecified=False
LastTransferErrorCodesSpecified=False
LastTransferSizeSpecified=False
MaxTransferRateSpecified=True
NewestSnapshotTimestampSpecified=True
ProgressLastUpdatedSpecified=False
RelationshipProgressSpecified=False
ResyncFailedCountSpecified=False
ResyncSuccessfulCountSpecified=False
SnapshotCheckpointSpecified=False
SnapshotProgressSpecified=False
TotalTransferBytesSpecified=False
TotalTransferTimeSecsSpecified=False
TriesSpecified=True
UpdateFailedCountSpecified=False
UpdateSuccessfulCountSpecified=False

 

Now the thing is I want to take our 7 mode scripts and convert to work with cDOT with the minium of pain. 

 

for example a colleague wrote the following lines of code for a 7 mode script 

 

$Output = Get-NcSnapmirror -Controller $SourceController

 

foreach ($Vol in $OUTPUT)
{
$Source = $Vol.SourceLocation 
$Destination = $Vol.DestinationLocation; 
$BaseSnapshot = $Vol.BaseSnapshot;
$Contents = $Vol.Contents;
$CurrentTransferError = $Vol.CurrentTransferError;
$CurrentTransferType = $Vol.CurrentTransferType;
$DestinationLocation = $Vol.DestinationLocation;
$LagTime = $Vol.LagTime;
$LagTimeTS = $Vol.LagTimeTS;
$LastTransferDuration = $Vol.LastTransferDuration;
$LastTransferDurationTS = $Vol.LastTransferDurationTS;
$LastTransferFrom = $Vol.LastTransferFrom;
$LastTransferSize = $Vol.LastTransferSize;
$LastTransferType = $Vol.LastTransferType;
$MirrorTimestamp = $Vol.MirrorTimestamp;
$MirrorTimestampDT = $Vol.MirrorTimestampDT;
$SourceLocation = $Vol.SourceLocation;
$State = $Vol.State;
$Status = $Vol.Status;
$TransferProgress = $Vol.TransferProgress;
}

 

 

A lot of the above properties e.g. TransferProgress in the 7 mode output are not there by default on the cDOT output

 

Question.

 

Is there any easy way (e.g. using an alternative cmdlet) or has someone already written a function to give me the same out put I was getting in 7 mode so I do not have to adjust all my scripts?

 

Thanks

Ernie

 

2 REPLIES 2

JGPSHNTAP
6,440 Views

What version of cDOT are you using..

 

Pipe your get-ncsnapmirror | gm and paste the results.. You should be seeing more

 

But I do agree, it appears we need to make the some conversions of the date objects, there is no friendly field, it appears..

 

 

ernest_brant
6,374 Views

Thanks very much for the reply.

 

It looks like the TransferProgress property is now available on objects returned by Get-NcSnapMirrorDestination  therefore I will use this instead.

 

Thanks again

Ernie

Public