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 256.256.256.256 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.

