Start a Conversation

Unsolved

This post is more than 5 years old

D

5312

April 5th, 2013 13:00

Launch and mount VNX snaps with Snapcli

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.

Thanks!

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)

309 Posts

April 10th, 2013 12:00

Thanks Christopher,

I didn't catch this white paper at first.

15 Posts

August 2nd, 2013 07:00

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:

Tried just specifying the snapshot name:

# /usr/snapcli/snapcli detach -s phy-web31b-content-snap-copy

No devices were found that could detach this snapshot.

Added the -f option to force it similarly to what I needed to do to attach it:

# /usr/snapcli/snapcli detach -s phy-web31b-content-snap-copy -f

An error occurred while detaching snapshot "phy-web31b-content-snap-copy".

Error:  0x3E160034 (Attempting to perform a forced deactivate operation is not supported on this OS)

Tried to reference the base LUN that the snapshot is tied to:

# /usr/snapcli/snapcli detach -s phy-web31b-content-snap-copy -o /dev/mapper/mpath3

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?

15 Posts

August 2nd, 2013 08:00

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.

2 Intern

 • 

20.4K Posts

August 2nd, 2013 08:00

you should be able to detach in-band, here i am running detach on consistency group vnx_snapshot from target host (i am using PowerPath though)

[root@target ~]# /usr/snapcli/snapcli detach -s vnx_snapshot

Detaching snapshot vnx_snapshot on device /dev/emcpowerb.

Detaching snapshot vnx_snapshot on device /dev/emcpowera.

2 Intern

 • 

20.4K Posts

August 2nd, 2013 08:00

it would be great if you could share your dm-mpio procedure once you get consistent results.

No Events found!

Top