Thursday, March 8, 2012

Inconsist of volume size between local and remote in HDS HUR or true copy

When I use HDS true copy or HUR (Universal Replicator) to create pair between HDS arrays, one of the common errors I once encountered is the volume size does not match between local and remote arrays.

Following is an example of the error messages in this scenario:

COMMAND ERROR : EUserId for HORC : root (0) Wed xxx xx 16:28:05 2011
CMDLINE : paircreate -g Testdc -vl -f never
16:28:05-39db4-11495- [paircreate] Inconsist of volume size between local and remote: devname:tdc01, localsize(0:2819280), remotesize(0:2814f00)
16:28:05-44091-11495- [paircreate][exit(212)]
[EX_ENQSIZ] Unmatched volume size for pairing
[Cause ]:Size of a volume is unsuitable between the remote and local volume.
[Action]:Please confirm volume size or number of LUSE volume using the 'raidscan -f' command,and change the SIZE of volumes identically.

As shown in above logs, the local volume size is 2819280 (Hex, or 42046080 blocks in Decimal ), the remote volume size is 2814f00 (or 42028800 blocks). There are around 9MB differences in size. I asked myself: How could this happen?

It turns out that before I try to create the pair, I get the local volume size from GUI (storage navigator or Device manager), however the size shown in GUI is depended on the "Capacity Unit" you selected in the GUI. By default, the capacity unit is usually in GB or MB. However 1MB = 2048 Blocks (512 bytes= 1 block), what if the volume is 2050 block? You bet it, the GUI will still show the volume as 1MB if the capacity unit is in MB.

Following is an example: LDEV 00:01 is shown as 206.34GB or 211300MB under "LUN Expansion" -- "LUN Expansion" tab, if you use either of the size to create the remote volume, it will fail.





Why? Because if you go to the VLL tab, and find the LDEV 00:01 in group 5-7, you will find that its size is 211300.312MB (Even this one is a round up number and can not be relied upon.) or to be more accurate : 432743040 Blocks if you choose the "Capacity Unit" to "block".

Actually, 211300.312MB= 432743038.976 blocks, obviously it could not be the size, it is merely a round up of the actual size in block.

So If you always choose "capacity unit" to block, and use that size to create remote volume , you will not encounter the "inconsist of volume size" problem. Please note, it is equally important to choose capacity unit in block when creating remote volume, because even if you choose for example 10.312MB, it may or may not end at the exact block boundary you think it should be, there could be rounding errors as long as you are not choosing block as the capacity unit.










Above examples are from a Sun 9990 array, this trick (choose capacity unit to block when get the size of local volume and create the remote volume using that size in block) applies similarly to
other HDS product line. You will find similar settings (capacity unit) in HDS's latest VSP device manager GUI.

Or as a Unix sysadmin, if you always love command line, then use raidscan /raidcom to get the size of local volume and create remote volume , the size (in hex) you get from the command line won't "cheat" you. Please see raidscan/raidcom man pages for more details.

1 comment: