Hi all,
I want to execute a snapmirror update before shrinking a snapmirror destination. The workflow resizes (primary)volumes with or without snapmirror relationships.
So, the commands executed are:
- Search & define all needed objects
- Vol resize on the primary volume
- IF the volume has a snapmirror relationship AND the new primary volume size is smaller than the current primary volume size: do a snapmirror update
- IF the volume has a snapmirror relationship : vol resize on the secondary volume
The expression I'm using for the conditional execution of the 3rd step is:
SNAPMIRROR ? (VOLUME_SIZE_IN_MB < vol_pri.size_mb) : false
Where:
- SNAPMIRROR is a Boolean constant indicating the existence of a snapmirror relationship. This constant is also used for conditional execution of the 4th step and is working correctly
- VOLUME_SIZE_IN_MB is an integer specifying the new (primary) volume size
- vol_pri.size_mb is the size in MB property of the primary volume object
So, when both SNAPMIRROR is true and the new size is smaller than the current size, the command is still not executed. My guess is that vol_pri.size_mb is already reduced (due to reservation?) before the comparison happened, but I'm not sure where to check this.
Questions:
- Where can I see the value of the variables used in the expression? Can't find them in the logging, is there a way to show their values at the moment of doing the comparison in the expression?
- If vol_pri.size_mb is indeed set to the new value prior to the comparison, how should I do this instead? I've tried using the snapmirror destination volume object, but that's not available when there's no snapmirror relationship, so the expression fails.
Kind regards,
Marco