2008-03-07 12:43 AM
We have a script that automates the split flex clone operation.
Once the script calls NetApp::SplitFlexClone, it sleeps and checks the status of the split periodically.
It does this by checking the error message string returned upon starting or
fetching the status with:
$napapi->volume_clone_split( $vol, "start" )
$napapi->volume_clone_split( $vol, "status" )
Indicate split operation has completed:
$napapi-> =~ /volume is not a clone/ Indicate split operation is in progress: $napapi-> !~ /clone is in the process of being split/
Is there a way to find out the status of a split operation by checking some volume property rather than relying on the error message string?
2008-03-07 12:44 AM
You can check the field "clone-parent" of the 'volume-info' element got from the command "volume-list-info". If the filed "clone-parent" is not set it means the split is complete. BTW, what was the issue in checking the "error" string as you are doing now?
Thanks for the answer. It works fine checking the error string. However, if in the next ONTAP version you guys decide to reword the error message, the script will break. It is more reliable to check for a specific field/flag.