EMC – naviseccli getlun -capacity

I needed to run this command recently to get the blocksize of a pool LUN that I wanted to migrate to a traditional FLARE LUN. I’ll going into the reasons for the migration another time, but basically a pool LUN doesn’t show you the number of blocks consumed when viewed through Unisphere.

So I used naviseccli to report the block count accurately so I could create another LUN of exactly the same size.

I:\>naviseccli -address getlun 432 -capacity
LUN Capacity(Megabytes):    1048576
LUN Capacity(Blocks):       2147483648

It’s also important to note that you cannot migrate a LUN using the LUN Migration tool to a LUN that is larger than the source. Test it for yourself if you don’t believe me. If you want to migrate a LUN to a larger destination you need to use SAN Copy. This also became an issue recently when I needed to migrate some Pool LUNs to traditional MetaLUNs and used components that were a block or two too large. Fortunately when you create a MetaLUN you can specify the correct block count / MB / GB / size.

naviseccli – don’t hate it because it’s beautiful.

You know you’re in trouble when …

You find emc141773 to be a possible solution: “Can a metaLUN creation be undone without destroying its components?”. I was trawling through EMC’s powerlink looking for something to do with metaLUNs and came across this gem:

“Problem: A metaLUN was created (as a concatenated expansion) on the wrong LUN. It was not expanded from the operating system.

Change: Created a new LUN that is to be used to create a metaLUN by expanding an existing LUN. However, instead of selecting the newly created LUN, another LUN was selected by mistake during the expansion process.

Fix: A metaLUN expansion cannot be reversed. It is not possible to remove a LUN from an expanded LUN or
metaLUN without losing data. Instead, the metaLUN must be destroyed. Destroying a metaLUN unbinds all the LUNs in the metaLUN, and then destroys the metaLUN. The data on the unbound LUNs will be lost.”

I feel kind of sorry for whoever found that one out the hard way :)