EMC – Manipulating the Write Intent Log LUNs with naviseccli

Last week Mat was wanting to migrate some WIL LUNs on one of our CX4s to a different RAID Group. Unfortunately, one does not simply migrate WIL LUNs. Firstly, once they’re allocated, they’re treated as Private LUNs by FLARE, so you can’t use Virtual LUN technology to migrate them. Secondly, if you have active MirrorView mirrors in place, you’ll get the following error when trying to de-allocate the WIL LUNs via Unisphere: “Unable to deallocate WIL since in use (0x71058199)[0x71058199]“. Note that fracturing the mirrors is not sufficient to avoid this error.

So there’s a few things you need to do to resolve this. Firstly, confirm the WIL LUNs in use on the array (there’s only 2).

naviseccli -user User_ID -scope 0 -password xxxxxxxx -h 1.1.1.1 mirror -sync -listlog
Storage Processor: SP A
Lun Number: 10000
Storage Processor: SP B
Lun Number: 10001

Now list all the mirrors that are using the WIL. Note that it lists the primary and secondary mirrors, so you’ll need to extraxt the primary mirrors from the list.

naviseccli -user User_ID -scope 0 -password xxxxxxxx -h 1.1.1.1 mirror -sync -list -usewriteintentlog
MirrorView Name: DC1_FC_R5_DATA_0002_SRM
Write Intent Log Used: YES
[snip]

Now the simplest thing to do is create a script that runs the command below for each of the mirrors in your list of primaries. This command disable the use of the WIL, and -o won’t prompt for confirmation.

naviseccli -user User_ID -scope 0 -password xxxxxxxx -h 1.1.1.1 mirror -sync -change -name DC1_FC_R5_DATA_0002_SRM -usewriteintentlog no -o

Now that you’ve done that, you can allocate the new WIL LUNs.

naviseccli -user User_ID -scope 0 -password xxxxxxxx -h 1.1.1.1 mirror -sync -allocatelog -spA lun_ID1 -spB lun_ID2

Now run your script again, changing -usewriteintentlog from no to yes.

naviseccli -user User_ID -scope 0 -password xxxxxxxx -h 1.1.1.1 mirror -sync -change -name DC1_FC_R5_DATA_0002_SRM -usewriteintentlog yes -o

And now you can get rid of those old WIL LUNs. Huzzah!