Protect RDM’s with Odd Number of Blocks
Purpose
When protecting a VM with RDM LUNs in a Zerto Virtual Replication VPG, an administrator may see that the VPG unexpectedly drops into a “Needs Configuration” status with subtext similar to the following: The RDM {0} for the VM {1} in VPG {2} has an odd number of blocks, which can only be replicated to a target RDM and not to a VMDK. This behavior will also occur when attempting to protect a VM with such an RDM, resulting in an error similar to the following: protected RDM with odd blocks: vm = [VM {1}, server {2}, size in bytes = {3}, internal name = {4} This article outlines the cause for this behavior, as well as a means to work around it.
Affected Versions
ZVR 3.1 Update 6, 3.5 all updates, 4.0 and greater
Cause
The root cause of this behavior is that an RDM LUN with an odd number of blocks is attached to a VM that is already configured or is being configured to be protected with ZVR. A standard block is 512 bytes, meaning that it is not a multiple of KB, the units in which VMware provisions virtual disks. As a result, the following limitations apply to protecting RDM disks with ZVR:
- RDM disks with an even number of blocks can replicate to RDM disks of the same size with an even number of blocks and to VMDKs.
- RDM disks with an odd number of blocks can only replicate to RDM disks of the same size with an odd number of blocks and not to VMDKs.
If a VPG enters Needs Configuration status, or is unable to be created, for the reason above, the administrator will need to change the RDM LUN sizing to contain an even number of blocks.
Solution
ANS and a Zerto customer have provided 2 tools to help you identify RDM’s in your environment with odd numbers of blocks, and also how to calculate the new LUN size. This is an automated way of finding and adjusting the LUN size in VMware and Net-App environments.
This removes the need for guessing / manually trying to configure the offset. These tools apply to all the following existing KB articles which have been produced around Zerto and the protection of RDM’s.
Attached Tools
Step 1: Attached Script
This script was produced by Rob Cotrill at ANS group a partner of Zerto. The script connects to your vCenter and runs a check across all hosts to find any RDM LUN’s it then looks at their block numbers, if their block numbers are odd, the script outputs the list of RDM’s and their size in to a csv file. This csv file will provide you with a list of affected RDM’s in your environment. Proceed to step 2 below.
Step 2: RDM Disk Calculator
This is specific to Net-app in order to obtain the relevant disk geometry the customer used the below method:
- Login to net-app data on-tap,
- Change to diag mode & Run “LUN geometry” command on relevant LUN(s) obtained from the csv file in step 1
- This will output something similar to the below:
Bytes per Sector: 512
Sectors per Track: 63
Tracks per Cylinder: 255
Sectors per Cylinder: 16065
Number of Cylinders: 132
Max Resize Size: 502.0GB
Number of Sectors: 2120580
Cylinder Size: 7.84MB
Device Size: 1.01GB
- Enter this information in to the spreadsheet attached to this post and it will output the new disk size to re-size the LUN to.
- Once this LUN size is even the issues highlighted in the “Purpose” section above will be addressed and you can continue \ start to protect your RDM’s with Zerto.