I need to launch and mount VNX snaps (not snapview snaps) from command line. So far I'm able to do it from GUI but it seems easier said than done from the CLI. Does anyone now where I can get some example Snapcli scripts. I must use SnapCLI not only to handle launching the snaps in the VNX but also to contol which drive letter is used for the mount point.
Firstly, please consider moving this discussion to the proper community for maximum visibility. You can do so by selecting: "Move discussion" in the upper-right and choosing, in this case:
All Places > Support Community > VNX Family > VNX Support Forum
1) Have you seen the nice walk-through in the "White Paper: VNX Snapshots"?
Skip to the section: "SnapCLI" which is further broken down into:
a) Flush buffers
b) Create a Snapshot
c) Attach a Snapshot
d) Copy a Snap
e) Consistency Groups
f) Sample SnapCLI batch script
2) Also, consider complementing the above with the Latest "VNX Command Line Interface Reference for Block". Please search for it by name on support.emc.com. I'm not a fan of providing direct links to guides such as this as they will get superseded upon the next firmware release and the URL will quickly go stale:
You can then skip to the end of the guide: "SnapCLI commands for VNX Snapshots" which is further broken down:
a) snapcli create
b) snapcli destroy
c) snapcli copy
d) snapcli attach
e) snapcli detach
3) Lastly, always consider reviewing the latest release notes: "EMC SnapCLI for VNX Release Notes Version <firmware revision>". Again search for it by name on support.emc.com. It is a short read, but what you should spend some time reading are:
a) "Known problems and limitations"
b) "SnapCLI and Admsnap" (provides a nice matrix of examples)
The white paper is a bit light on coverage of the snapcli command. I have an issue with a Linux sever running multi path. I am able to use snapcli to create a snapshot, to copy a snapshot and to attach the snapshot to an existing mount point. After attaching it, multipath sees the new device, and I can use various LVM commands to remap and access data on the snapshot.
After unmounting the partition, deactivating the LVM VG and flushing the path for the snapshot from the multipath database, when I try to detach the snapshot using the snapcli command on the Linux server, none of the combinations are working:
An error occurred while detaching snapshot "phy-web31b-content-snap-copy" on device "/dev/mapper/mpath3".
Error: 0xE16D8013 (The target LUN is not a snapshot mount point)
Error. There were no devices detached for snapshot phy-web31b-content-snap-copy.
Should I be able to do this from the server using snapcli in-band or do I need to go use the Unisphere web interface to detach the snapshot prior to removing the snapshot mount point from the storage group?
Ok, I just tried a different combination of tasks and was able to detach this time. I reloaded the multipath maps so it recreated the mpath# device for the snapshot LUN. I ran "snapcli detach" again and it detached and then I flushed the multipath entry. Yesterday, I thought I had detached first, and then ran into issues with multipath hanging on the device as all 4 paths were failed. Must have done something else as well yesterday or not flushed the multipath device quick enough.
In any case, it worked this time. Will test a few more times to ensure consistent results.
christopher_ime
6 Operator
•
1962 Posts
886
1
Posted April 7th, 2013 00:00
Daniel,
Firstly, please consider moving this discussion to the proper community for maximum visibility. You can do so by selecting: "Move discussion" in the upper-right and choosing, in this case:
All Places > Support Community > VNX Family > VNX Support Forum
1) Have you seen the nice walk-through in the "White Paper: VNX Snapshots"?
https://support.emc.com/docu42148_White_Paper:_VNX_Snapshots.pdf
Skip to the section: "SnapCLI" which is further broken down into:
a) Flush buffers
b) Create a Snapshot
c) Attach a Snapshot
d) Copy a Snap
e) Consistency Groups
f) Sample SnapCLI batch script
2) Also, consider complementing the above with the Latest "VNX Command Line Interface Reference for Block". Please search for it by name on support.emc.com. I'm not a fan of providing direct links to guides such as this as they will get superseded upon the next firmware release and the URL will quickly go stale:
You can then skip to the end of the guide: "SnapCLI commands for VNX Snapshots" which is further broken down:
a) snapcli create
b) snapcli destroy
c) snapcli copy
d) snapcli attach
e) snapcli detach
3) Lastly, always consider reviewing the latest release notes: "EMC SnapCLI for VNX Release Notes Version <firmware revision>". Again search for it by name on support.emc.com. It is a short read, but what you should spend some time reading are:
a) "Known problems and limitations"
b) "SnapCLI and Admsnap" (provides a nice matrix of examples)