Hi all, I'm having a bit of a problem adding a snapshot to a storage group from the CLI and was hoping someone could help. I'm using naviseccli and passing credentials at the time of issuing the command. Here's the command I'm trying to run: (names and IP have been changed to protect the innocent)
I'm running it from a PowerShell console on a secondary host and the command "appears" to be successful, at least it doesn't return any errors. However, it's not adding the snapshot to the storage group. I can add it manually from the GUI without any problems, but the CLI just doesn't seem to be working as I would expect it to.
Other commands I've issues using naviseccli are working fine (ie: creating snapshot and session), I just can't see to get it to show up in the storage group so I can active it.
Anybody see any errors in my command line syntax? I really need it to work from CLI because I'm writing a series of scripts for snapping, and unsnapping for Disaster recovery tests.
Another thing to note, I'm not snapping a LUN per se. Actually, I'm trying to snap a secondary image that is part of a MirrorView/A mirror. I've been told that this CAN be done.
Well, I resolved my own problem. Turns out it WAS a syntax error on the command. For anyone experiencing this issue, the correct syntax is the following:
IMPORTANT FYI: I see a lot of people on these forums making reference to the SnapView Snapshots and SnapSessions Knowledgebook. It was this exact same document that I got the incorrect syntax for this command. The typo is on page 10 of this document.
So, do I get 10 points for answering my own question? LOL
i believe the only restriction with security file is that you can not move it to another system, you have to generate a new one on that particular system.
Yes it is created in the local user profile of the logged on user. But you can create the security file and place it in a commonly accessible location. There is a switch in the cli where you specify the file to use.
So you can either create the file in the default location for each user logon, create a common file that is referenced in scripts, or (if automating scripts using a scheduler) use a service account for the scheduling of the scripts and create the file for the service account.
security file for the service account that runs the scripts
Nevermind, that just answered my question. I didn't catch the "service account" statement you mentioned. I guess if we all logged into the server as that service account, there wouldn't be a problem. Or if we fire them off from a scheduled task.
Hey, good catch. Glad you got it resolved. I have some automated scripts for snashot creation and deletion and I find that it is easier if I create a security file for the service account that runs the scripts. That way I don't have to specify the username and password in clear in the script file for anyone to find.
I find that it is easier if I create a security file for the service account that runs the scripts
Yeah, I was going to do that, but it was my understanding that the security file gets created within my windows profile. Is that correct?
My concern with this is that during our company DR testing, anyone on my team might be using these scripts. Wont each of us have to log on and create the security file on all of our DR servers prior to our DR test?
The White papers and Knowledgebooks are good reference, but for the last word on commands and syntax you should always check in the specific CLI manual. See page 104 in the "EMC SnapView Command Line Interface (CLI) Reference"
SYNTAX snapview-activatesnapshotsessionname-snapshotiduid or snapview-activatesnapshotsession name-snapshotnamename
OPTIONS -activatesnapshot sessionname
Specifies session name (that you assigned when the session was started with -startsession).
-snapshotid uid
Specifies the 32-byte unique ID of the snapshot (assigned by the system when the copy was created with -createsnapshot).
-snapshotname name
Specifies the name of the snapshot (that you optionally assigned when the copy was created with -createsnapshot).
Topher27981
1 Rookie
•
12 Posts
825
0
Posted October 27th, 2009 12:00
naviseccli.exe -user administrator -password -scope 0 -h storagegroup -addsnapshot -gname -snapshotname
IMPORTANT FYI: I see a lot of people on these forums making reference to the SnapView Snapshots and SnapSessions Knowledgebook. It was this exact same document that I got the incorrect syntax for this command. The typo is on page 10 of this document.
So, do I get 10 points for answering my own question? LOL