If you’re a VNX customer you’ve probably heard someone bang on about how easy to use VNX Snapshots are, particularly if they’ve used SnapView in the past. If you’re after the good word on VNX Snapshots, check out this whitepaper from EMC here. Tomek has a reasonable write-up here as well.
In any case I’ve been working with a customer on some migration scripts and they wanted to take VNX Snapshots as well as VM snapshots while they update their OS and apps. I wrote about creating SnapView Clones with naviseccli some time ago, but I find VNX Snapshots a shedload easier to work with. This is will, as always, be dictated by your own set of requirements, circumstances and religious beliefs.
So here’s what you need to do to get from start to finish. Note that I haven’t covered creating Snapshot Mount Points (SMPs) in this, nor do I talk about using host-based tools such as SnapCLI. I’ll follow up in the future with some words around this.
[Update] I forgot to mention @Dynamoxxx / Storage Monkey‘s excellent posts on this subject too – have a look here for Linux and here for Windows.
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Program Files (x86)\EMC\Navisphere CLI>NaviSECCli.exe Not enough arguments Usage: [-User <username>] [-Password <password>] [-Scope <0 - global; 1 - local; 2 - LDAP>] [-Address <IPAddress | NetworkName> | -h <IPAddress | NetworkName>] [-Port <portnumber>] [-Timeout <timeout> | -t <timeout>] [-AddUserSecurity | -RemoveUserSecurity | -DeleteSecurityEntry] [-Parse | -p] [-NoPoll | -np] [-cmdtime] [-Xml] [-f <filename>] [-Help] CMD <Optional Arguments> [security -certificate]
You’ll need to set yourself up if you’re using a fresh installation.
C:\Program Files (x86)\EMC\Navisphere CLI>NaviSECCli.exe -addusersecurity -scope 0 -user sysadmin
You can then create a snapshot of LUN 7 called “testsnap1” which is read/write and will be kept for 4 hours.
C:\Program Files (x86)\EMC\Navisphere CLI>NaviSECCli.exe -address 192.168.0.100 snap -create -res 7 -resType LUN -name "testsnap1" -descr "snap via CLI" -keepFor 4h -allowreadwrite yes Unable to validate the identity of the server. There are issues with the certificate presented. Only import this certificate if you have reason to believe it was sent by a trusted source. Certificate details: Subject: CN=192.168.0.100,CN=SPA,OU=CLARiiON Issuer: CN=192.168.0.100,CN=SPA,OU=CLARiiON Serial#: fcd99068 Valid From: 2015:01:15:02:55:01 Valid To: 2020:01:14:02:55:01 Would you like to Accept the certificate for this session,  Accept and store,  Reject the certificate? Please input your selection(The default selection is ): 2
Note that there’s no output from this command. If you want to check out the snapshots you have, you can list them.
C:\Program Files (x86)\EMC\Navisphere CLI>naviseccli -address 192.168.0.100 snap -list Name: testsnap1 Description: snap via CLI Creation time: 05/19/15 10:22:37 Source LUN(s): 7 Source CG: N/A State: Ready Allow Read/Write: Yes Modified: No Allow auto delete: No Expiration date: 05/19/15 14:22:37
Want to change the ID of the snapshot or change the autodelete setting?
C:\Program Files (x86)\EMC\Navisphere CLI>naviseccli -address 192.168.0.100 snap -modify -id "testsnap1" -name "testsnap2" -allowautodelete yes Setting auto-delete on this Snapshot will clear expiration date on it. Are you sure you want to perform this operation?(y/n): n C:\Program Files (x86)\EMC\Navisphere CLI>naviseccli -address 192.168.0.100 snap -modify -id "testsnap1" -name "testsnap2"
Great, now let’s get rid of it.
C:\Program Files (x86)\EMC\Navisphere CLI>naviseccli -address 192.168.0.100 snap -destroy -id "testsnap2" Are you sure you want to perform this operation?(y/n): y
And that’s about it.
good post, i did something similar for Windows/Linux https://storagemonkey.wordpress.com/category/vnx/
Thanks – I meant to link to your article as it meant I didn’t need to cover SnapCLI. Will update it now.