I have a playbook to create a load-sharing mirror volume for each SVM. it then creates the LS mirror relationship and initialises the mirror.
The volume is created as DP just like regular snapmirror but once initialised as a LS mirror the volume type changes to 'ls'
When re-running the playbook it errors as the volume type doesnt match. I can set ignore_errors but is there any other way to prevent this from erroring out?
error below:
"msg": "Error: changing a volume from one type to another is not allowed. Current: ls, desired: dp."}
playbook:
- name: Create LS mirror FlexVols
na_ontap_volume:
use_rest: always
state: present
name: "{{ item.vserver + '_ls' }}"
aggregate_name: "{{ item.ls_aggr }}"
size: 1
size_unit: gb
space_guarantee: volume
tiering_policy: none
vserver: "{{ item.vserver }}"
type: dp
wait_for_completion: True
comment: load-sharing mirror destination
<<: *login
with_items: "{{ nas_svm_config }}"
- name: create LS mirror for NAS SVMs
netapp.ontap.na_ontap_snapmirror:
state: present
source_vserver: "{{ item.vserver }}"
source_volume: "{{ item.vserver + '_root' }}"
destination_vserver: "{{ item.vserver }}"
destination_volume: "{{ item.vserver + '_ls' }}"
initialize: true
relationship_type: load_sharing
schedule: ls_mirror_15min
<<: *login
with_items: "{{ nas_svm_config }}"