How to enable a replica-LUN on Unity

LUN-replication on Unity works slightly different than it previously did on VNX or even Clariion. In these older generations, when you deleted the mirrorview Mirror Group, both the primary and secondary LUNs became usable as separate entities.

In Unity the secondary LUN is a different beast. First of all: in Unity you can only set up replication from the primary Unity/LUN. The process on the source-Unity will create a LUN-replica and a replication session on both Unitys.

But what happens when you need hosts to access the secondary LUN? A failover works as designed and the previous secondary LUN becomes writable, but when you break the replication session, the replica-LUN has a flag that needs to be reset, but you’ll need the CLI to do that. This is how I did it:

  • In Unisphere I listed all LUNs and I made sure to include the “CLI ID” column
  • I noticed the ID of the LUN I need to grant access to is “res_56”
  • I started PUTTY and made sure logging to a file was configured so I could easily browse / search the possibly large amount of data some commands can produce, especially “-detail” commands tend to be very explicit
  • Log in as the “service” user to the Unity command line

=~=~=~=~=~=~=~=~=~=~= PuTTY log 2019.01.19 11:03:58 =~=~=~=~=~=~=~=~=~=~=
login as: service

Welcome to EMC Unity 450F 64GB – (none) – c4dev_PIE_2421R-4.3.1.1525703027.1525714924-GNOSIS_RETAIL

Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Last failed login: Tue Jan 19 10:04:08 UTC 2019 from 192.168.52.16 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Thu Jan 7 13:03:24 2019 from 192.168.52.23

10:04:24 service@(none) spa:~> uemcli /stor/prov/luns/lun show
Storage system address: 127.0.0.1
Storage system port: 443
HTTPS connection

Remote certificate:
Issuer: CN=UNITY-08
Subject: CN=UNITY-08
Valid from: 2017-11-05 12:24:00 Z
Valid to: 2020-11-04 12:24:00 Z
Serial: 00ac1e9fce5624ca21
Id: 1320091585
Would you like to:
[1] Accept the certificate for this session
[2] Reject the certificate
[3] Accept and store
Please input your selection (The default selection is [1]):3

In order to find out what the status of the LUN is, you should use

Block LUN:
uemcli /stor/prov/luns/lun show

or if you know the ID, you can specify it to reduce the output:

uemcli /stor/prov/luns/lun -id res_56 show

or for VMware datastores:

VMFS LUN:
uemcli /stor/prov/vmware/vmfs show

or if you know the ID, you can specify it to reduce the output:

uemcli /stor/prov/vmware/vmfs -id res_56 show

The output looks similar to this (I only displayed the LUN I was looking for):

76: ID = res_56
LUN = sv_132
Name = VMFS-113-DR
Description =
Type = Primary
Base storage resource = res_56
Source =
Health state = OK (5)
Storage pool ID = pool_1
Storage pool = FlashPool
Size = 4398046511104 (4.0T)
Protection size used = 0
Non-base size used = 0
SP owner = SPB
Trespassed = no

But there’s no details on the destination. We need to get more details on the LUNs, so we issue the following command:

uemcli /stor/prov/luns/lun -id res_56 show -detail

or for VMware datastores:

uemcli /stor/prov/vmware/vmfs -id res_56 show -detail

The output is much more detailed now and it contains validation (in red) that we need to change the status so we can start using it:

76: ID = res_56
LUN = sv_132
Name = VMFS-113-DR
Description =
Type = Primary
Base storage resource = res_56
Source =
Original parent =
Health state = OK (5)
Health details = “The component is operating normally. No action is required.”
Storage pool ID = pool_1
Storage pool = FlashPool
Size = 4398046511104 (4.0T)
Maximum size = 70368744177664 (64.0T)
Thin provisioning enabled = yes
Compression enabled = yes
Compression space saved = 565593505792 (526.7G)
Compression percent = 29%
Compression ratio = 1.4:1
Data Reduction enabled = yes
Data Reduction space saved = 565593505792 (526.7G)
Data Reduction percent = 29%
Data Reduction ratio = 1.4:1
Current allocation = 2216341823488 (2.0T)
Protection size used = 0
Non-base size used = 0
Family size used = 2345320579072 (2.1T)
Snapshot count = 1
Family snapshot count = 1
Family thin clone count = 1
Protection schedule =
Protection schedule paused =
SP owner = SPB
Trespassed = no
Version = 5
Block size = 1
Virtual disk access hosts = Host_13, Host_24, Host_26, Host_28, Host_27, Host_25
Snapshots access hosts =
WWN = 60:06:01:60:0B:28:38:00:C1:75:1E:4C:54:93:61:39
Replication destination = yes
Creation time = 2018-08-10 15:29:48
Last modified time = 2019-01-19 07:04:26
IO limit =
Effective maximum IOPS = N/A
Effective maximum KBPS = N/A

The red text shows that our LUN is indeed still recognized being a replication target. We now need to set that flag to “no”. The command we need to invoke is:

Block LUN:

uemcli -u admin -p [Password] /stor/prov/luns/lun -id res_56 set -replDest no

or

VMFS LUN:

uemcli -u admin -p [Password] /stor/prov/vmware/vmfs -id res_56 set -replDest no

Note that I included credentials for the “admin” user. So I’m logged in as user “service”, but the command uses the “admin” user.

Now verify if the flag was successfully reset by reissuing the “show -detail” command and you can present the LUN to the hosts and start using it.

And of course log out of the CLI:

10:31:50 service@(none) spa:~> uemcli -u admin -p [Password] /stor/prov/vmware/vmfs -id res_56 set -replDest no

Storage system address: 127.0.0.1
Storage system port: 443
HTTPS connection

ID = res_56
Operation completed successfully.
10:39:04 service@(none) spa:~>exit

Additional source: https://emcservice.force.com/CustomersPartners/kA5j00000008VrrCAE

Would you like to comment on this post?

This site uses Akismet to reduce spam. Learn how your comment data is processed.