How long to do 100 Vserver Creates / 100 CIFS Server Creates / 100 CIFS Server Renames?

Note: This is done with the DataONTAP PowerShell Toolkit Version 4.3, and the NetApp ONTAP 9.1 simulator.

I wanted to know how long the titular tasks would take, so here’s how I did it and the timings. We start with the timings and then present the method.

Timings

16 minutes 32 seconds: Creating 100 data SVMs
00 minutes 03 seconds: Configuring DNS for 100 data SVMs
00 minutes 18 seconds: Creating one data LIF per SVM for 100 data SVMs
09 minutes 39 seconds: Creating 100 CIFS servers
00 minutes 16 seconds: Downing 100 CIFS servers
09 minutes 48 seconds: Renaming 100 CIFS servers

The Method

The following PowerShell commands were used to automate the 100 vserver creates, 100 CIFS server creates ...; but this is not a PowerShell script - these are all one liners entered directly into PowerShell (see below outputs). No reason why you couldn’t turn this into a script though.


Import-Module DataONTAP

## CONNECTING TO CLUSTER ##

$CLUSTER      = "10.9.1.0"
$CLUSTER_USER = "admin"
$CLUSTER_PASS = Read-Host "Cluster Password" -AsSecureString

$clu_creds = New-Object System.Management.Automation.PsCredential($CLUSTER_USER,$CLUSTER_PASS)
[Void](Add-NcCredential -Name $CLUSTER -Credential $clu_creds)
Connect-NcController $CLUSTER

## CREATING DATA SVMS ##

$VSERVER_PRFX = "test-svm"
$AGGREGATE    = "aggr1"
$PROVISION    = 100
$DNS_DOMAIN   = "lab.priv"
$DNS_SERVER   = "10.0.1.10"
$LIF_NODE     = "C910-01"
$LIF_PORT     = "e0d"
$NETWORK      = "10.9.3."
$NETMASK      = "255.0.0.0"

date;For($i=1;$i -le $PROVISION;$i++){[Void](New-NcVserver -VserverName ("$VSERVER_PRFX" + "$i") -RootVolume rootvol -Aggregate $AGGREGATE -RootVolumeSecurityStyle unix)};date
date;For($i=1;$i -le $PROVISION;$i++){[Void](New-NcNetDns -Domains $DNS_DOMAIN -NameServer $DNS_SERVER -VserverContext ("$VSERVER_PRFX" + "$i"))};date
date;For($i=1;$i -le $PROVISION;$i++){[Void](New-NcNetInterface -Name ("$VSERVER_PRFX" + "$i" + "_lif1") -vserver ("$VSERVER_PRFX" + "$i") -Role data -Node $LIF_NODE -Port $LIF_PORT -DataProtocols cifs,nfs -Address ("$NETWORK" + "$i") -NetMask $NETMASK)};date

## CREATING CIFS SERVERS ##

$AD_DOMAIN = "lab.priv"
$AD_USER   = "administrator"
$AD_PASS   = Read-Host "AD User Password" -AsSecureString
$OU        = "CN=computers"

$ad_creds = New-Object System.Management.Automation.PsCredential(("$AD_USER"+"@"+"$Domain"),$DomainPass)
date;For($i=1;$i -le $PROVISION;$i++){[Void](Add-NcCifsServer -VserverContext ("$VSERVER_PRFX" + "$i") -Name ("$VSERVER_PRFX" + "$i" + "-new") -Domain $AD_DOMAIN -AdminCredential $ad_creds -OrganizationalUnit $OU -Force)};date

## RENAMING CIFS SERVER (CIFS REJOIN) ##

date;For($i=1;$i -le $PROVISION;$i++){[Void](Set-NcCifsserver -VserverContext ("$VSERVER_PRFX" + "$i") -AdministrativeStatus down -Domain $AD_DOMAIN -AdminCredential $ad_creds)};date
date;For($i=1;$i -le $PROVISION;$i++){[Void](Set-NcCifsserver -VserverContext ("$VSERVER_PRFX" + "$i") -CifsServer ("$VSERVER_PRFX" + "$i") -Domain $AD_DOMAIN -AdminCredential $ad_creds -Force)};date


The PowerShell Screen Outputs with Timings

Image: Creating 100 Vservers
Image: Creating 100 CIFS Servers
Image: Renaming 100 CIFS Servers

Comments