Thursday, 16 April 2015

Research Links & Info - 16th April 2015

Just a place to put some links and notes collected in my inbox since the last one on the 13th December 2014… Wow, it is over a third of a year since I last did one of these. In a break from tradition (and start a new tradition), I’ll put the latest received stuff at the top and work down backwards in time.

PS Apologies if I’ve failed to reply to any emails/comments this year, it’s been a hectic 2015 so far...

13th April 2015

## NetApp Clustered Data ONTAP ##

- SnapVault volumes automatically get the Volume Autosize mode of grow_shrink.
- SnapVault volumes have Autosize settings independent of the source, whereas SnapMirror volumes inherit the Autosize setting on the source.

## Microsoft ##

Image: Hyper-V Containers
 
“Nano Server is a deeply refactored version of Windows Server with a small footprint and remotely managed installation, optimized for the cloud and a DevOps workflow.  It is designed for fewer patch and update events, faster restarts, better resource utilization and tighter security.”

## Amazon ##

 “Today we are introducing Amazon Elastic File System, our newest storage service. It provides multiple EC2 (Amazon Elastic Compute Cloud) instances with low-latency, shared access to a fully-managed file system via the popular NFSv4 protocol, and is designed to perform well for a wide variety of workloads, with the ability to scale to thousands of concurrent connections.”

6th April 2015

## VMware ##

“FT support upto 4 vCPUs and 64 GB RAM

“This issue occurs when you expand a virtual disk .vmdk file which has Change Block Tracking (CBT) enabled past any 128 GB boundary. When the disk is extended the change tracking data becomes unreliable.” - still exists in ESXi 6.0.x!

30th March 2015

## VMware ##


19th March 2015

## NetApp ##

From Tech OnTap:

Image 1-1: The journey from 7-Mode to NetApp clustered Data ONTAP
 
Image 1-2: High-Level view of the transition fundamentals framework
 
Image 2-1: The NetApp product portfolio has solutions for both shared and dedicated storage requirements
 
16th March 2015

## Intel ##

Intelligent: Xeon performance and features - RAS, Intel Virtualization Tech, Platform Storage Extensions, Intel AES-NI
Dense: Integrated Intel Ethernet & I/Os ~25-45 W

## Google ##

“Google is also partnering with a number of backup and storage providers to help enterprises move to Nearline – partnerships announced thus far include Veritas, NetApp, Iron Mountain and Geminare. These vendors cover backup, de-duplication, encryption, compression, ingestion and disaster-recovery.”

5th March 2015

## NetApp ##

Secure Data to and from the Cloud with New Solutions for Amazon Web Services‏
Cut Down Data Backup, Recovery, and Archive Times
Hybrid Cloud - “Choose Your Cloud, Control Your Data ...”

## Veeam ##

yum install -y perl-Data-Dumper

## VMware ##

“First and foremost: there is no performance impact of setting it one way or another...” but...

23rd  February 2015

## VMware ##

“Transparent Page Sharing (TPS) no longer allows inter-VM TPS by default”
“Prompted by security concern...”

10th February 2015

## NetApp ##

Note: Especially check out Table 1 “New Features in 8.3”


Image: Cloud ONTAP is able to run as an EC2 instance within the AWS cloud. It uses EBS GP2 for underlying storage while delivering the enterprise features of clustered Data ONTAP.
 
Image: OnCommand Cloud Manager provides a simple, wizard-based interface for deploying and monitoring Storage Virtual Machines in Cloud ONTAP and NetApp Private Storage.
 
26th January 2015

## Microsoft ##

“The era of holographic computing is here.”

20th January 2015

## PowerShell ##

More PowerShell Excel operations:

$Excel.workbooks.OpenText($file,437,1,1,1,$True,$True,$False,$False,$True,$False)
$Excel.Application.ActiveWindow.SplitRow = 1
$Excel.application.activewindow.freezepanes = $true
$Excel.Rows.Item(1).Font.Bold = $true           # Bold text
$Excel.Rows.Item(1).VerticalAlignment = -4108   # Centre (vertically)
$Excel.Rows.Item(1).HorizontalAlignment = -4108 # Centre (horizontally)
$Excel.Columns.Item(1).columnWidth = 10
$Excel.Cells.Item(1,5) = "Path"
$Excel.range("F3:F3").cells.formula = "=b2-b3"

15th January 2015

## NetApp KB ##


12th January 2015

## IT Miscellany ##


## VMware ##

Important for anyone considering VMware VSAN or EVO:RAIL!
“VSAN also uses L2 multicast to communicate between nodes. Back in the dark ages when I was a network guy multicast was an iffy thing.”

## PowerShell ##

“It can be difficult to monitor and assess resources in large Hyper-V environments. This Powershell based script helps you to understand virtualization inventory, capacity and general resource availability in your Standalone or Clustered Hyper-V Environment.”

Image: Hyper-V Reporting Script HTML Report
 
## Veeam ##

“Free monitoring and reporting for VMware and Hyper-V”

## Intel ##


Image: The NH1
 
15th December 2015

## Veeam ##


## IT Miscellany ##

“Vendors tout hyperconverged systems like EVO:RAIL as less expensive than more conventional storage systems. After pricing my own EVO:RAIL-like system, I found otherwise.”

Tuesday, 14 April 2015

Multiple Pings Testing Tool

Introduction

This tool is designed so you can test ping response to multiple addresses, in a clear and compact display. An example of the output is below, in which the tool is being run against 7 IP addresses (of which 3 are down). The tool simply refreshes the display after every test.

Image: PingTestingTool.ps1
Note: The asterisk indicates which address is currently being tested. When addresses are up, this asterisk moves very quickly. If all IP addresses are up, sometimes the asterisk moves so quickly that it stays still!

The Script

Save the below as say PingTestingTool.ps1, and right-click the file and select “Run with PowerShell” to run, or run from PowerShell as .\PingTestingTool.ps1. Alternatively you can provide a PingTestingTool.ini file with the list of addresses to be pinged.

#######################
# PingTestingTool.ps1 #
#######################

Function ProcessArray {
  Param([System.Array]$ArrayToProcess)
  [System.Array]$ProcessedArray = @()
  Foreach ($ArrayLine in $ArrayToProcess){
    If( ($ArrayLine -ne "") -and ($ArrayLine.substring(0,1) -ne "#") ){ $ProcessedArray += $ArrayLine }
  }
  , $ProcessedArray
}

[Int16]$i = 1
[System.Array]$targets = @()
If( !(Test-Path PingTestingTool.ini) ){
  "Enter IP Addresses/Hostnames of Targets (press enter to terminate entry)"     
  [String]$answer = $True 
  While ($answer -ne ""){
    $answer = Read-Host "$i"
    If(  $answer -ne "" ){ $targets += $answer}
    If( ($answer -eq "") -and ($i -eq 1) ){ "No input - exiting!"; Sleep 5; EXIT }
    $i++
  }
} else {
  $targets = Get-Content PingTestingTool.ini
  $targets = ProcessArray $targets
  If(!$targets){ "Empty file - exiting!"; Sleep 5; EXIT }
}

[System.Array]$status = @()
$targets | Foreach { $status += "Unitialized" }

Function PrintStatus{
  Param([Int16]$pointer)
  If ($pointer -eq ($targets.Count - 1) ){ $pointer = 0}
  else {                                   $pointer ++ }     
  cls
  $i = 0
  $targets | Foreach {
    If ($pointer -eq $i){ $Display = " * $_ " }
    else {                $Display = "   $_ " }
    If ($status[$i] -eq "UP"      ){ Write-Host ($Display.PadRight(50)) -BackgroundColor Green -ForegroundColor Black }
    elseif ($status[$i] -eq "DOWN"){ Write-Host ($Display.PadRight(50)) -BackgroundColor Red   -ForegroundColor White }
    else                           { Write-Host ($Display.PadRight(50)) -BackgroundColor Gray  -ForegroundColor Black }
    $i ++
  }
}

Function GetResult{
  [Int16]$j = 0
  $targets | Foreach{
    [Boolean]$Result = Test-Connection -ComputerName $_ -Count 1 -Quiet
    If ($Result){ $status[$j] = "UP" }
    If(!$Result){ $status[$j] = "DOWN" }
    PrintStatus $j
    $j++
  }
}

While ($true){ GetResult }

Monday, 13 April 2015

FAS8040A 6 Node Cluster Cabling Diagram with 4 Cluster Connects Per Node to CN1610

Almost a year to the day since I published FAS8040A Cluster Cabling Diagram with 4 Cluster Interconnects, here’s the 6 Node Cluster version! 6 nodes of FAS8040 with 4 Cluster connects per node, fully populates the two NetApp CN1610 Cluster Switches.

Image:  FAS8040A 6 Node Cluster Cabling Diagram with 4 Cluster Interconnects Per Node
Apologies if the image comes out very small on blogger, hopefully it appears a bit bigger when you click on it. To make more sense of the diagram above, there’s also this table:

Table: CN1610 Cluster Switch Connections for FAS8040A 6 Node Cluster

Sunday, 12 April 2015

How to Report on CDOT Shares, Shares ACLs, and NTFS Security

Introduction

The following script is a little something I cooked up to do an audit of all the shares on a Clustered Data ONTAP Cluster (or Clusters). It creates an Excel report with CIFS shares, share ACLs, and NTFS Security information on the folder at the root of the share (includes owner, DACLs, and SACLs). It has a bonus feature in that it detects shares which have had their root folder deleted.

The framework of the script can easily be manipulated to generate Excel reports on other things.

Notes

1) The standard readonly role is not quite sufficient for running Get-NcFileDirectorySecurity. To make/modify your readonly role so that it can be used to run this script, apply the below via the Clustershell ::>

security login role create CORP_readonly -cmddirname DEFAULT -Access readonly
security login role create CORP_readonly -cmddirname security  -Access none
security login role create CORP_readonly -cmddirname "security login password"  -Access all
security login role create CORP_readonly -cmddirname set  -Access all
security login role create CORP_readonly -cmddirname "vserver security file-directory show"  -Access all
security login create -username readonly -application ontapi -role CORP_readonly -authmethod password

2) To enable running the script from a network share, you need to enable the below (if your permissions allow) as detailed here:


 To enable client-side SSP for winrm, run the following line:

PS> Enable-WSManCredSSP -Role client -DelegateComputer *

If your corporate laptop has folder re-direction, placing the Data ONTAP PowerShell Toolkit folder (DataONTAP) in your downloads folder should work since this is rarely re-directed.

The Script

Formatted for blogger!

Copy and paste the following into a text editor, and save as say “CDOT_Share_ACL_NTFS_Reporter.PS1” (the name doesn’t matter), then either right-click the file and “Run with PowerShell”, or run in PowerShell as:

PS> .\ CDOT_Share_ACL_NTFS_Reporter.PS1

##########################################################
## CDOT Share, Share ACL, and NTFS Permissions Reporter ##
##########################################################

Param(
  [String]$PSTKpath,     # If DataONTAP is not in the default location or ...\Downloads\DataONTAP, this overrides the prompt
  [String]$ClusterName,  # If not Clusters.TXT file, this overrides the prompt for a Cluster Name
  [String]$UserName,     # Used to override prompt for User Name for Cluster connect
  [Switch]$NoCachedCreds # Used to override looking for Cached Credentials
);""

## GENERIC DISPLAY FUNCTIONS ##

[System.Object]$Color = @{}; "W=White","G=Green","Y=Yellow","R=Red","C=Cyan","M=Magenta" | Foreach { [String]$Color.($_.Split("=")[0]) = $_.Split("=")[1] }
Function Wr { Param ([Switch]$N); $i = 0; While ($i -lt $Args.Count){ Write-Host $Args[$i+1] -ForegroundColor $Color.($Args[$i]) -NoNewLine; $i+=2 }; If(!$N){ Write-Host } }
Function Countdown { Param ([Int]$Count); while ($Count -gt 0){ Wr R "$Count " -N; sleep 1; $Count-- } }

## STEP 1: LOAD THE DATA ONTAP POWERSHELL TOOLKIT ##
## ============================================== ##

Wr G "1) Loading the Data ONTAP PowerShell Toolkit ..."; ""
[Void](Import-Module DataONTAP -ErrorAction SilentlyContinue)
If(!(Get-Module DataONTAP)){
  [Void](Import-Module ([Environment]::GetFolderPath("UserProfile") + "\Downloads\DataONTAP") -ErrorAction SilentlyContinue)
}
If(!(Get-Module DataONTAP)){
  Wr C "Enter path to the DataONTAP folder: " -N
  If($PSTKpath){ Wr W $PSTKpath } else { $PSTKpath = Read-Host }
  [Void](Import-Module $PSTKpath -ErrorAction SilentlyContinue); ""
}
If(!(Get-Module DataONTAP)){
  Wr R "Unable to load the DataONTAP PowerShell Toolkit. Exiting after 10 seconds!"; "";
  Countdown 10; ""; ""; Exit
}
Wr G "Loaded the Data ONTAP PowerShell Toolkit!"; ""

## STEP 2: GET THE CLUSTERS ##
## ======================== ##

Wr G "2) Get the Cluster(s) ..."; ""
[System.Array]$Clusters = @()
If(Test-Path Clusters.txt){
  [System.Array]$ClustersTXT = Get-Content Clusters.txt
  $ClustersTXT | foreach {
    #> Record Clusters ignoring blank and comments (#) lines <#
    If ( !($_ -eq "") -and !($_.StartsWith("#")) ){ $Clusters += $_ }
  }   
} else {
  Wr C "Enter the cluster to connect to: " -N
  If ($ClusterName){ Wr W $ClusterName } else { $ClusterName = Read-Host }
  $Clusters += $ClusterName; ""
}

## STEP 3: CREDENTIALS TO CONNECT ##
## ============================== ##

Wr G "3) Credentials to connect ..."; ""

#> 3.1: Generate FileName for saved credentials file <#
$whoAmI   = (whoAmI).ToUpper()
$SplitMe  = $whoAmI.Split("\")
If($SplitMe.Count -eq 2){ $User = $SplitMe[0] + $SplitMe[1] }
else {                    $User = $whoAmI }
$filePath = $User + ".cred"
$test     = Test-Path $filePath
If($NoCachedCreds){$test = $null}

#> 3.2: Acquire credentials <#
[System.Array]$CredsFile = @()
If(!$test){ # ... if no credentials file, prompt and save one
  Wr C "Enter username for account to log into the Clusters [$whoAmI]: " -N
  If($UserName){ Wr W $UserName } else { $Username = Read-Host }
  If($UserName -eq ""){$UserName = $whoAmI}
  Wr C "Password: " -N
  $Password     = Read-Host -AsSecureString
  $SecureString = $Password | ConvertFrom-SecureString
  $CredsFile   += $Username
  $CredsFile   += $SecureString
  $CredsFile | Out-File -FilePath $filePath
} else { # ... otherwise get credentials from the file
  Wr G "Obtaining credentials from file $filePath ..."
  $CredsFile    = Get-Content $filePath
  $Username     = $CredsFile[0]
  $Password     = $CredsFile[1] | ConvertTo-SecureString
};""
$Credential = New-Object System.Management.Automation.PsCredential($Username,$Password)

## STEP 4: TEST THE CREDENTIALS WORK ##
## ================================= ##

Wr G "4) Checking connection to Cluster(s) ..."; ""
$Clusters | foreach {
  Wr C "Checking connection to " Y "$_" C " ..."; ""
  $Connect = Connect-NcController -Name $_ -Credential $Credential -ErrorAction SilentlyContinue      
  If (!$Connect){
    Wr R "Unable to connect to " Y "$_" R " with provided credentials. Removing credentials file. Exiting after 10 seconds!"; ""
    Remove-Item -Path $filePath
    Countdown 10; ""; ""; exit
  } else {
    Wr G "Successfully connected to $_ "; ""
  }
}

## STEP 5: GET THE REQUIRED INFORMATION - CIFS SHARES, ACLS, NTFS PERMISSIONS ##
## ========================================================================== ##

Wr G "5) Acquiring Shares, ACLs and NTFS Permissions ..."; ""
[System.Object]$Data = @{} # Data Hashtable
[Int]$Index          = 1
$Clusters | foreach {
  [Void](Connect-NcController -Name $_ -Credential $Credential -ErrorAction SilentlyContinue)
 
  #> Get Data SVMs <#
  $vsQuery             = Get-NcVserver -Template
  $vsQuery.VserverType = "data"
  $SVMs                = (Get-NcVserver -Query $vsQuery).Vserver
 
  #> Cycle through Data SVMs <#
  Foreach ($SVM in $SVMs){
    Wr G "Processing CIFS Shares for Cluster $_ and SVM $SVM ..."; ""
    $Attrs           = Get-NcCifsShare -Template
    $Attrs.ShareName = ""
    $Attrs.Path      = ""
    $Attrs.Acl       = ""
    $CifsShares      = Get-NcCifsShare -Attributes $Attrs -VserverContext $SVM
    $CifsSharesCount = $CifsShares.Count
   
    #> Cycle through the CIFS Shares on the SVM <#
    Foreach ($Share in $CifsShares){
      Wr C "$CifsSharesCount " -N
      [System.Object]$Data.$Index    = @{}                # Data.Index Hashtable
      [String]$Data.$Index.Cluster   = $_                 # + Cluster Name
      [String]$Data.$Index.Vserver   = $SVM               # + SVM
      [String]$Data.$Index.ShareName = $Share.ShareName   # + Share Name
      [String]$Data.$Index.Path      = $Share.Path        # + Share Path
      [System.Array]$Data.$Index.Acl = $Share.Acl         # + Share ACL(s)
      [Int]$Data.$Index.ACLs         = ($Share.Acl).Count # + Share ACL(s) count
     
      #> Processing NTFS Security Descriptor <#
      [System.Array]$NTFSsec = @()
      If ($Share.Path -ne "/"){
        [System.Array]$NTFSsec = (Get-NcFileDirectorySecurity -Path ($Share.Path) -LookupNames -VserverContext $SVM -ErrorAction SilentlyContinue).acls
        If($NTFSsec){
          [System.Array]$DACLs = @()
          [Int]$DACL_rows = 0
          Foreach ($line in $NTFSsec){
            If     ($line.StartsWith("NTFS Security Descriptor")){}
            elseif ($line.StartsWith("Control:")){ $Data.$Index.Control = $line.substring(8) }
            elseif ($line.StartsWith("Owner:"))  { $Data.$Index.Owner   = $line.substring(6) }
            elseif ($line.StartsWith("Group:"))  { $Data.$Index.Group   = $line.substring(6) }
            else {
              $DACLs += $line
              $DACL_rows ++                           
            }
          }
          [System.Array]$Data.$Index.DACLs = $DACLs
          [Int]$Data.$Index.DACL_rows      = $DACL_rows
        } else {
          ""; Wr Y "Unable to Get-NcFileDirectorySecurity for share " R $Share.ShareName Y " path " R $Share.Path W " "
        }
      } elseif ( ($Share.Path -eq "/") -or !$NTFSsec ) {
        [String]$Data.$Index.Control     = ""
        [String]$Data.$Index.Owner       = ""
        [String]$Data.$Index.Group       = ""
        [System.Array]$Data.$Index.DACLs = @()
        [Int]$Data.$Index.DACL_rows      = 1
      }
     
      $CifsSharesCount --
      $Index ++
    }
    ""; ""
  }
}

## STEP 6: CONSTRUCT EXCEL WORKBOOK ##
## ================================ ##

Wr G "6) Constructing Excel Workbook ..."; ""

#> Excel Workbook - Initialize <#
Add-Type -AssemblyName Microsoft.Office.Interop.Excel
$xlFixedFormat = [Microsoft.Office.Interop.Excel.XlFileFormat]::xlWorkbookDefault
$xl            = New-Object -ComObject "Excel.Application"
$wb            = $xl.Workbooks.Add()
$xl.Worksheets.Item("Sheet2").Delete()
$xl.Worksheets.Item("Sheet3").Delete()
$ws            = $wb.ActiveSheet
$worksheets    = 1
$row           = 3
$cells         = $ws.Cells
$ws.name       = "Shares, ACLs, NTFS ..."

#> Excel Workbook - Column Headers <#
$col = 1
$cells.item($row,1).EntireRow.Interior.ColorIndex = 15
"Cluster","SVM","Share:Name","Share:Path","Share:ACL(s)","NTFS:Control","NTFS:Owner","NTFS:Group","NTFS:DACL(s)" | foreach {
  $cells.item($row,$col)           = $_
  $cells.item($row,$col).font.bold = $True
  $col++
}
$row += 2

#> Excel Workbook - Data <#
$i = 1
while ($i -lt $Index){
  Wr C ($Index - $i) C " " -N
  $cells.item($row,1) = $Data.$i.Cluster
  $cells.item($row,2) = $Data.$i.Vserver 
  $cells.item($row,3) = $Data.$i.ShareName
  $cells.item($row,4) = $Data.$i.Path
 
  #> Process Share ACLs into column <#
  If($Data.$i.ACLs -gt 0){
    $h = 0
    while($h -lt $Data.$i.ACLs){
      $cells.item($row + $h,5) = $Data.$i.Acl[$h]
      $h++
    }
  }
 
  $cells.item($row,6) = $Data.$i.Control
  $cells.item($row,7) = $Data.$i.Owner
  $cells.item($row,8) = $Data.$i.Group
 
  #> Process DACLs into column <#
  If($Data.$i.DACL_rows -gt 0){
    $j = 0
    While ($j -lt $Data.$i.DACL_rows){
      $cells.item($row + $j,9) = $Data.$i.DACLs[$j]
      $j++
    }
  }
 
  #> Accumulate row count <#
  If($Data.$i.ACLs -eq 0){ $Data.$i.ACLs = 1 } 
  If($Data.$i.ACLs -gt $Data.$i.DACL_rows){ $row += $Data.$i.ACLs } else { $row += $Data.$i.DACL_rows }
 
  $row++
  $i++
};"";""

#> Excel Workbook - Autofit Excel Columns <#
$range = $ws.UsedRange
$range.EntireColumn.Autofit() | out-null

#> Excel Workbook - Main Heading (after the Autofit) <#
$dateString      = Get-Date -uformat "%Y%m%d"
$cells.item(1,1) = "$dateString - NetApp CDOT Share, ACL, and NTFS Security Report"
$cells.item(1,1).EntireRow.font.bold           = $true
$cells.item(1,1).EntireRow.font.size           = 16
$cells.item(1,1).EntireRow.Interior.ColorIndex = 37

#> Display and Save the Excel Workbook <#
$SavePath = $Pwd.Path + "\" + $dateString + "_CDOT_Share_ACL_NTFS_Report.xlsx"
$Test     = Test-Path $SavePath
If($Test){ Remove-Item -Path $SavePath -Force }
$xl.ActiveWorkbook.SaveAs($SavePath,$xlFixedFormat)
$xl.Visible = $True
Wr G "Excel Workbook displayed and saved at " Y "$SavePath"; ""

#> Cleanup EXCEL processes <#
while ([System.Runtime.Interopservices.Marshal]::ReleaseComObject($xl)) {'cleanup Excel'}

[gc]::collect() | Out-Null;[gc]::WaitForPendingFinalizers() | Out-Null

Friday, 3 April 2015

How to NDMPCOPY from 7-Mode to Clustered Data ONTAP

In the following post we cover copying some data using NDMP, from Data ONTAP 7-Mode 8.1.4P6, to Clustered Data ONTAP 8.2.2P1. It’s pretty easy to do and the use case is restoring old SnapVault data from 7-Mode to CDOT.

1) 7-Mode Lab Setup

7-Mode System      = FAS01 (on 192.168.168.70)
7-Mode CIFS Server = FAS01.lab.priv

Test volume = vol001
Test share  = vol001$
Test folder = /vol/vol001/RESTORETHIS

vol create vol001 -l en -s none aggr1 2g

qtree security /vol/vol001 ntfs

cifs shares -add vol001$ /vol/vol001


2) CDOT Lab Setup

CDOT Cluster     = CLU01 (Cluster Mgmt on 192.168.168.100)
CDOT Node        = CLU01N1 (Node Mgmt on 192.168.168.101)
CDOT SVM         = CLU01V1 (Data LIF on 192.168.168.102)
CDOT CIFS Server = CLU01V1.lab.priv

Test volume = cvol001 (mounted /cvol001)
Test share  = cvol001$

vol create cvol001 -aggregate aggr1 -size 2g -junction-path /cvol001 -space-guarantee none -security-style ntfs -language en

cifs share create cvol001$ /cvol001


3) 7-Mode Enabling NDMP

Enable ndmpd on the 7-Mode system.
Create a user “ndmp” in the “Backup Operators” builtin group >

ndmpd on

useradmin user add ndmp -g "Backup Operators"


Display the ndmpd password for the user ndmp, and record this password string >

ndmpd password ndmp
password kYGBBPqXk68pde04


Set NDMP to accept both plaintext and md5 authentication requests:

options ndmpd.authtype plaintext,challenge


4) CDOT Enabling NDMP

Create a Cluster user “ndmp”, with ssh access, and the backup role ::>

security login create -username ndmp -application ssh -authmethod password -role backup -vserver CLU01


Generate/display the ndmp password for the user “ndmp”, and record this password string ::>

vserver services ndmp generate-password -vserver CLU01 -user ndmp

 Vserver: CLU01
    User: ndmp
Password: q6VW6w4yMChQwWUg


Enable ndmp on the Cluster ::>

vserver services ndmp on -vserver CLU01


5) Using NDMPCOPY to restore from 7-Mode to Clustered Data ONTAP

From our 7-Mode System (FAS01), we run the restore with the command below >

ndmpcopy -d -sa ndmp:kYGBBPqXk68pde04 -st md5 -da ndmp:q6VW6w4yMChQwWUg -dt md5 192.168.168.70:/vol/vol001/RESTORETHIS 192.168.168.101:/CLU01V1/cvol001/RESTORETHIS


Note 1: The folder RESTORETHIS does not need to exist on CDOT.
Note 2: The ndmpcopy command syntax is >
ndmpcopy -d -sa {source_user}:{source_pass} -st {auth_type} -da {dest_user}:{dest_pass} -dt {auth_type} {hostname_or_IP}:{source_path} {hostname_or_IP}:{dest_path}


APPENDIX: ndmpcopy example output

FAS01> ndmpcopy -d -sa ndmp:kYGBBPqXk68pde04 -st md5 -da ndmp:q6VW6w4yMChQwWUg -dt md5 192.168.168.70:/vol/vol001/RESTORETHIS 192.168.168.101:/CLU01V1/cvol001/RESTORETHIS
Ndmpcopy: Starting copy [ 4 ] ...
Ndmpcopy: 192.168.168.70: Notify: Connection established
Ndmpcopy: 192.168.168.101: Notify: Connection established
Ndmpcopy: 192.168.168.70: Connect: Authentication successful
Ndmpcopy: 192.168.168.101: Connect: Authentication successful
Ndmpcopy: 192.168.168.70: Log: DUMP: creating "/vol/vol001/../snapshot_for_backup.2" snapshot.
Ndmpcopy: 192.168.168.70: Log: DUMP: Using subtree dump
Ndmpcopy: 192.168.168.70: Log: DUMP: Date of this level 0 dump: Fri Apr  3 14:25:43 2015.
Ndmpcopy: 192.168.168.70: Log: DUMP: Date of last level 0 dump: the epoch.
Ndmpcopy: 192.168.168.70: Log: DUMP: Dumping /vol/vol001/RESTORETHIS to NDMP connection
Ndmpcopy: 192.168.168.70: Log: DUMP: mapping (Pass I)[regular files]
Ndmpcopy: 192.168.168.70: Log: DUMP: mapping (Pass II)[directories]
Ndmpcopy: 192.168.168.70: Log: DUMP: estimated 17 KB.
Ndmpcopy: 192.168.168.70: Log: DUMP: dumping (Pass III) [directories]
Ndmpcopy: 192.168.168.70: Log: DUMP: dumping (Pass IV) [regular files]
Ndmpcopy: 192.168.168.70: Log: ACL_START is '32768'
Ndmpcopy: 192.168.168.70: Log: DUMP: dumping (Pass V) [ACLs]
Ndmpcopy: 192.168.168.70: Log: DUMP: 39 KB
Ndmpcopy: 192.168.168.70: Log: DUMP: DUMP IS DONE
Ndmpcopy: 192.168.168.70: Log: DUMP: Deleting "/vol/vol001/../snapshot_for_backup.2" snapshot.
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:52 2015: Begin level 0 restore
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:52 2015: Reading directories from the backup
Ndmpcopy: 192.168.168.70: Log: DUMP_DATE is '5723038439'
Ndmpcopy: 192.168.168.70: Notify: dump successful
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:53 2015: Creating files and directories.
Ndmpcopy: 192.168.168.101: Log: RESTORE: Fri Apr  3 14:25:53 2015: Writing data to files.
Ndmpcopy: 192.168.168.101: Log: RESTORE: RESTORE IS DONE
Ndmpcopy: 192.168.168.101: Notify: restore successful
Ndmpcopy: Transfer successful [ 0 hours, 0 minutes, 25 seconds ]
Ndmpcopy: Done
FAS01>

FURTHER READING: