SnapDrive Command Line Automate Cloning Operations
Snapdrive is an application which is used to manage Netapp storage disks from Windows and Linux operating systems. Using snapdrive application we can also do an automatic cloning of your production environment to Test/Development environment Or for reporting purpose also you can do that. Using Snapdrive Command Line utility.
But every time if you would like to mount snapshot using snapdrive that does not make sense or we may miss timings and activity some day.
Mounting snapshots can be done by few commands
SnapDrive Command Line Automate
Mount Snapshot from Live Server to current Server using Below Command
"c:\Program Files\NetApp\SnapDrive\SDCLI.exe" snap mount -m <Destination Server> -r <Source Server> -k f -s <Snapshot Name> -d f Initializing...ARKIT-SM-SQL : Checking input parameters hecking access control Checking policies Turning on space reservation Connecting to the LUN Mounting volume on the disk The operation completed successfully.
As shown above snapshot got mounted successfully. UN-mount snapshot using below command.
"c:\Program Files\NetApp\SnapDrive\SDCLI.exe" snap unmount -m <Server Name> -d f -f Initializing...ARKIT-SM-SQL : Checking policies ARKIT-SM-SQL : Checking access control Forcing the LUN to disconnect completed successfully.
List available snapshot from remote Netapp filer using command
> SDCLI.exe snap list -sdf <STORAGE IP/NAME> -sdv <VOLUME NAME>
List Mounted snapshot disks
Mounted disk details can be found from below command
C:\Program Files\NetApp\SnapDrive>SDCLI.exe disk list
Found out igroup details, which is present in Netapp Storage system
C:\Program Files\NetApp\SnapDrive>SDCLI.exe igroup list -f <Storage System Name>
Rename existing snapshot from snapdrive command line will work like charm
sdcli snap rename [-m <MachineName>] -d <MountPoint> -o <OldSnapshotName> -n <NewSnapshotName>
Not only mounting un-mounting and listing snapshots you can do a lot of this using Netapp snapdrive application
sysconfig disk snap snapvault iscsi_initiator iscsi_target license preferredIP spacemon igroup spacereclaimer transport_protocol vsconfig dfm_config oncommand_config hyperv_config smvi_config vsc_config dataset clone_split
See existing snapdrive license details
C:\Program Files\NetApp\SnapDrive>SDCLI.exe license list LUN Provisioning and Snapshot Copy Management Module Name: LPSM License Status: Not Licensed License Key: Required Version: 18.104.22.16840 Installed Version: 22.214.171.12440
All of the above operations can be done from Command line and command l interface must be open with administrator privileges other wise you get an error.