You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Management-Utilities/auto_create_sm_relationships/README.md
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,7 @@ This script is used to ensure that all your volumes, in all your FSxN file syste
10
10
- If it is set to false, then it checks from the AWS side to see if there is a "protect_volume" tag set to "skip".
11
11
- If there isn't one, then it uses the ONTAP SnapMirror API to create the SnapMirror relationship. This API will create a destination volume if it does not already exist.
12
12
13
-
While there is some logic in the script to attempt to handle FlexGroup volumes, there are issues with it, so that part of the script has been disabled. The issues I encountered trying to support FlexGroups:
14
-
**NOTE:** All of the below is based on ONTAP version 9.13.1.
15
-
- The SnapMirror API does not work with FlexGroups (even though the documentation implies that it does). Because of this I attempted to use the CLI "pass-through" API to create the SnapMirror relationship the "old fashioned way" by:
16
-
- Create the destination volume if it doesn't already exist.
17
-
- Create the SnapMirror relationship.
18
-
- Initialize the SnapMirror relationship.
19
-
- When creating the destination volume, it just creates with the default parameters, so it might not match the configuration of the source volume. Specially, the number of constituents could be different.
20
-
- The "snapmirror.destinations.is_ontap" field is not maintained by ONTAP for FlexGroup volumes. So, the script will attempt to create a SM relationship every time it is run. It will fail, and probably not harm anything, but it isn't clean. A "To Do" is the leverage the SnapMirror API to obtain the list of SnapMirror relationships and figure out if the volume already has a relationship reviewing that list. Note that "snapmirror list-destinations" also doesn't work for FlexGroup volumes.
13
+
**NOTE:** This script only creates SnapMirror relationships for FlexVol volumes. It does not create SnapMirror relationships for FlexGroup volumes.
21
14
22
15
## Set Up
23
16
There are a few things you need to do in order to get this script to run properly:
logger.error(f'Destination volume "{partnerIp}::{partnerSvmName}:{volumeName}{destinationVolumeSuffix}" already exist but is not of type "DP", or is not a flexgroup type volume.')
296
-
return
297
-
#
298
-
# At this point we have the destination volume. Time to create the snapmirror relationship.
logger.error(f'API call to {endpoint} failed. HTTP status code: {response.status}.')
332
-
return
333
-
logger.info(f'Path {fsxId}::{svmName}:{volumeName} is being SnapMirrored to {partnerIp}::{partnerSvmName}:{volumeName}{destinationVolumeSuffix}')
334
-
else:
335
-
logger.info(f'Path {fsxId}::{svmName}:{volumeName} would have been SnapMirrored to {partnerIp}::{partnerSvmName}:{volumeName}{destinationVolumeSuffix}')
0 commit comments