In the last post (here)
we looked at integrating SnapMirror with the SMVI backups in NetApp’s Virtual
Storage Console for VMware. With SnapMirror, you have effectively a 1-1
relationship of volume and snapshots on primary storage to disaster recovery
storage (see image below.)
Useful tip: SnapVault uses the same engine as qtree snapmirror.
Image: SnapMirror-SMVI
snapshots on source and destination
Q: What if we want to extend our retention capability
without using more snapshot space on primary storage?
A: Use SnapVault scripts with SMVI.
And - fortunately - a very clever guy by the name of Matt
has created something we can use - SV-SMVI. At the time of writing, the latest
version of SnapVault for
SMVI (SV-SMVI) is version 3.0.3 (which we use here) and this is available
from:
SnapVault
Considerations
A few important considerations about SnapVault taken from
the:
Data ONTAP 8.1 Commands: Manual Page
Reference For 7-Mode, Volume 1
Part number:
210-05884_A0 (Updated for Data ONTAP 8.1.2 on 22 November 2012)
1) “SnapVault replicates data in primary system paths to qtrees on a SnapVault
secondary node.”
2) “When the primary system is a node, the path to be replicated can be a
qtree, non-qtree data on a volume, or a volume path … the snapvault
restore command on a primary node will always restore to a primary qtree regardless ….”
What does this mean?
When the VSC provisions an NFS datastore, it provisions as
a volume and not as a qtree in a volume. Also, VMs are contained in folders in
the NFS datastore and not in qtrees themselves. This means that with a
typically provisioned VMware environment, we can SnapVault the whole NFS
datastore but not do more granular backups. If more granular backups are
required say to backup individual VMs, these must exist in individual qtrees on
the NFS datastore. Also, the restore of a non-qtree datastore can only be done
back to a qtree.
Note: For the
remainder of this post we’ll assume we’re working with a typically provisioned
environment (that is - no qtrees on the primary.)
Part 1: SV-SMVI
Installation
Note: “SV-SMVI is
not supported through NetApp’s Technical Support Center (TSC). Support is only
provided through NetApp Professional Services on a services engagement basis.”
1.1 Download:
After downloading sv-smvi-3.0.3.zip from here and unpacking the
contents, we are presented with the following files:
- SV-SMVI User
Guide.pdf
- sv-smvi.cmd
- sv-smvi.exe (Windows
Executable)
- sv-smvi.pl
(Perl Script)
Here we will configure SV-SMVI using the executable (the
Perl Script is available as an alternative.)
1.2 Installation
of sv-smvi.cmd and sv-smvi.exe:
Note: Here we have a
Windows Server 2008 R2 box with VMware vCenter Server 5.1, and the NetApp
Virtual Storage Console 4.1 for VMware installed on the same box.
Side note: Check
out the SnapManager
2.0 for Virtual Infrastructure Best Practices - TR-3737 which has as best
practice to “Install SMVI on the vCenter server to reduce the impact of network
disruptions”.
i. Place sv-smvi.exe
in the folder:
C:\Program
Files\NetApp\Virtual Storage Console\smvi
ii. Place sv-smvi.cmd
in the folder:
C:\Program
Files\NetApp\Virtual Storage Console\smvi\server\scripts
Part 2:
SnapVault Configuration
2.1 License and
check licenses:
PRI> license add SVONTAPPRI
SEC> license add SVONTAPSEC
PRI> license
SEC> license
2.2 Create a
volume on the secondary to hold the backups (the volume will be a larger size than
the primaries if many SMVI backups will be held there) and verify size and
options:
SEC> vol create SVSECVOL -s none AGGREGATE SIZE
*(Optional) the -s
none creates a thin-provisioned volume
SEC> df -k SVSECVOL
SEC> vol status SVSECVOL
2.3 Allow SnapVault
access between primary and secondary, and ping to verify network connectivity:
PRI> options
snapvault.enable on
PRI> options
snapvault.access host=SEC
PRI> ping SEC
SEC> options
snapvault.enable on
SEC> options
snapvault.acess host=PRI
SEC> ping PRI
2.4 Create
SnapVault primary to secondary relationship and baseline, and monitor the
status:
SEC> snapvault start
-S PRI:/vol/SVPRIVOL/- SEC:/vol/SVSECVOL/nonQtreeDataInSVPRIVOL
SEC> snapvault
status
Note i: The SnapVault
volume is ready for future updates when the state is Snapvaulted.
Note ii: If you SnapVault a volume with Qtrees inside, only the non Qtree data comes across!
Note ii: If you SnapVault a volume with Qtrees inside, only the non Qtree data comes across!
2.5 Create a
SnapVault schedule which only applies a retention policy (SV-SMVI triggers
taking the SnapVault snapshot):
SEC> snapvault snap
sched SVSECVOL SNAPNAME 21@-
Note i: Later on, we
can use the snap list -n SVSECVOL to see the snapshots.
Note ii: Remove any default scheduled snapshots (in case this has not be done already) as below -
Note ii: Remove any default scheduled snapshots (in case this has not be done already) as below -
PRI> snap sched
SVPRIVOL 0 0 0
SEC> snap sched
SVSECVOL 0 0 0
Part 3: SV-SMVI.CMD
3.1 Encrypt
Password:
From the DOS Command Prompt, run -
sv-smvi.exe -cryptpasswd
- as in the example below.
Example: Encrypting
password
C:\Program Files\NetApp\Virtual Storage
Console\smvi>sv-smvi.exe
-cryptpasswd
Enter password text to encrypt:
Encrypted password string to use is:
53616c7465645f5f5326c31daa2ea805ad3047ac665ce15049f431daacf69a56
3.2 Edit
sv-smvi.cmd as required:
Unedited, the
contents of sv-smvi.cmd are:
c:\Temp\sv-smvi.exe
-svuser root -svpasswd netapp
The below lists an example working sv-smvi.cmd content -
here we’re using the encrypted password from 3.1 and outputting a report:
cd "C:\Program Files\NetApp\Virtual Storage
Console\smvi"
sv-smvi.exe -svuser root -svcryptpasswd 536… -report
Note: Check out the ‘SV-SMVI User
Guide’ for Command Line Arguments.
Part 4: VSC - Create/Edit Backup Job
4.1 Create/Edit Job using the
sv-smvi.cmd script
vSphere
Client > Home > Solutions and Applications > NetApp
Backup
and Recovery > Backup
Create/edit
a backup job, and where prompted select the sv-smvi.cmd script.
Image: Selecting the sv-smvi.cmd
script in the VSC Backup Wizard
4.2 Choose a schedule for the
SnapVaulting
The
SnapVault schedule is dictated via the Backup Wizard in the VSC (only the
retention is dictated by the schedule created in 2.5.)
4.3 Run the Job
Check
the report to see if SV-SMVI completed successfully:
Example: End of SV-SMVI log and “Command
completed successfully”
[15:17:50] SnapVault secondary
snapshot created successfully.
[15:17:50] A total of 1 SnapVault
relationship update(s) and 1 SnapVault snapshot creation(s) successful.
[15:17:50] Command completed
successfully.
Note i: The default location for the
SV-SMVI log is C:\NetApp\SV-SMVI\Report (which gets auto-created)
Note ii: If seeing an “ERROR: ZAPI
connection” check ‘options httpd.admin.enable’
is set to on (httpd.enable can be off).
Image: SnapVault-SMVI snapshots on
source and destination
Useful tip: SnapVault uses the same engine as qtree snapmirror.
APPENDIX: SMVI Command Line
Arguments
-svip
STR
-svuser
STR
-svpasswd
STR
-verbose
-debug
-help
-report
-reportdir
STR
-noping
-config
FILE
-cryptpasswd
-svcryptpasswd
STR
-dnslist
STR:IP, STR:IP, …
-svschednames
STR, STR
-nosvsnap
-https
Thank you for a nice guide.
ReplyDeleteI can see that you snapvault snapshot on the primary is named as the rest of the snapshots how did you manage to do that? Hen i create the snapvault relationship from the secondary i get netapp standard naming for the baseline snapshot? In the guide it seems if the baseline is created when you run the script for the first time? Can you please clarify?
Kind Regards,
Kristian
Solved my own problem. I used the vault ip address with -svip instead of the primary one so the script was looking for snapshot on a volume that didn't existed on the secondary filer.
ReplyDeleteIs this script SnapVault for SMVI compatible with Clustered ONTAP 8.2?
ReplyDeleteApologies for the late reply. No, it won't work (this version at least) with Clustered ONTAP 8.2.
DeleteHow about a follow up with how to recover from the vault back to primary or from vault for DR?
ReplyDeleteHi,
ReplyDeleteIs it possible to first have SMVI initiate a snapmirror to a secondary filer, and then create a snapvault copy from that snapmirror filer to a third filer?
Hi Thierry, yes absolutely. There's a tick box in SMVI to initiate SnapMirror updates. SMVI won't be able to manage/integrate with the SnapVault of the SnapMirror destination, just set it up manually though and all's good. Cheers!
Delete