Create a volume mirror
Pre-task:
- Make sure the two cluster has same user name
- Make sure the two cluster has same project name
- cluster1 - IP: 10.32.20.241
- cluster2 - IP: 10.32.20.242
cluster1: CLI > cluster > check
cluster1> cluster
cluster1:cluster> check
Service Status Report
ClusterLink ok [ link(v) clock(v) dns(v) ]
ClusterSys ok [ bootstrap(v) license(v) ]
ClusterSettings ok [ etcd(v) ]
HaCluster ok [ hacluster(v) ]
MsgQueue ok [ rabbitmq(v) ]
IaasDb ok [ mysql(v) ]
VirtualIp ok [ vip(v) haproxy_ha(v) ]
Storage ok [ ceph(v) ceph_mon(v) ceph_mgr(v) ceph_mds(v) ceph_osd(v) ceph_rgw(v) rbd_target(v) ]
ApiService ok [ haproxy(v) httpd(v) lmi(v) memcache(v) ]
SingleSignOn ok [ keycloak(v) ]
Compute ok [ nova(v) ]
Baremetal ok [ ironic(v) ]
Network ok [ neutron(v) ]
Image ok [ glance(v) ]
BlockStor ok [ cinder(v) ]
FileStor ok [ manila(v) ]
ObjectStor ok [ swift(v) ]
Orchestration ok [ heat(v) ]
LBaaS ok [ octavia(v) ]
DNSaaS ok [ designate(v) ]
K8SaaS ok [ k3s(v) rancher(v) ]
InstanceHa ok [ masakari(v) ]
DisasterRecovery ok [ freezer(v) ]
BusinessLogic ok [ mistral(v) murano(v) cloudkitty(v) senlin(v) watcher(v) ]
ApiManager ok [ tyk(v) redis(v) mongodb(v) ]
DataPipe ok [ zookeeper(v) kafka(v) ]
Metrics ok [ monasca(v) telegraf(v) grafana(v) ]
LogAnalytics ok [ filebeat(v) auditbeat(v) logstash(v) es(v) kibana(v) ]
Notifications ok [ influxdb(v) kapacitor(v) ]
cluster1:cluster>
cluster2: CLI > cluster > check
cluster2> cluster
cluster2:cluster> check
Service Status Report
ClusterLink ok [ link(v) clock(v) dns(v) ]
ClusterSys ok [ bootstrap(v) license(v) ]
ClusterSettings ok [ etcd(v) ]
HaCluster ok [ hacluster(v) ]
MsgQueue ok [ rabbitmq(v) ]
IaasDb ok [ mysql(v) ]
VirtualIp ok [ vip(v) haproxy_ha(v) ]
Storage ok [ ceph(v) ceph_mon(v) ceph_mgr(v) ceph_mds(v) ceph_osd(v) ceph_rgw(v) rbd_target(v) ]
ApiService ok [ haproxy(v) httpd(v) lmi(v) memcache(v) ]
SingleSignOn ok [ keycloak(v) ]
Compute ok [ nova(v) ]
Baremetal ok [ ironic(v) ]
Network ok [ neutron(v) ]
Image ok [ glance(v) ]
BlockStor ok [ cinder(v) ]
FileStor ok [ manila(v) ]
ObjectStor ok [ swift(v) ]
Orchestration ok [ heat(v) ]
LBaaS ok [ octavia(v) ]
DNSaaS ok [ designate(v) ]
K8SaaS ok [ k3s(v) rancher(v) ]
InstanceHa ok [ masakari(v) ]
DisasterRecovery ok [ freezer(v) ]
BusinessLogic ok [ mistral(v) murano(v) cloudkitty(v) senlin(v) watcher(v) ]
ApiManager ok [ tyk(v) redis(v) mongodb(v) ]
DataPipe ok [ zookeeper(v) kafka(v) ]
Metrics ok [ monasca(v) telegraf(v) grafana(v) ]
LogAnalytics ok [ filebeat(v) auditbeat(v) logstash(v) es(v) kibana(v) ]
Notifications ok [ influxdb(v) kapacitor(v) ]
cluster2:cluster>
Launch three VM on project admin of cluster1
Enable storage mirroring
cluster1(primary)
CLI > storage > mirror > site
cluster1> storage mirror
cluster1:mirror> site
Select action:
1: Configure
2: Add Site
3: Delete Site
4: Update Site
Enter index: 1
Enable the site:
1: Enabled
2: Disabled
Enter index: 1
Enter site name (required): primary
Applying policy changes.
Policy changes were successfully applied.
cluster2(secondary)
CLI > storage > mirror > site
cluster2> storage mirror
cluster2:mirror> site
Select action:
1: Configure
2: Add Site
3: Delete Site
4: Update Site
Enter index: 1
Enable the site:
1: Enabled
2: Disabled
Enter index: 1
Enter site name (required): secondary
Applying policy changes.
Policy changes were successfully applied.
Config remote peer
cluster1(primary)
CLI > storage > mirror > site
cluster1:mirror> site
Select action:
1: Configure
2: Add Site
3: Delete Site
4: Update Site
Enter index: 2
Enter site name (required): secondary
Enter IP address (required): 10.32.20.242
Enter remote secret (required): admin
Applying policy changes.
Policy changes were successfully applied.
cluster1:mirror> list
enabled: yes
site name: primary
peers:
enabled peer name ip address
---------------------------------------------------------------
[x] secondary 10.32.20.242
rules:
enabled volume
---------------------------------------------------------------
cluster2(secondary)
CLI > storage > mirror > site
cluster2:mirror> site
Select action:
1: Configure
2: Add Site
3: Delete Site
4: Update Site
Enter index: 2
Enter site name (required): primary
Enter IP address (required): 10.32.20.241
Enter remote secret (required): admin
Applying policy changes.
Policy changes were successfully applied.
cluster2:mirror> list
enabled: yes
site name: secondary
peers:
enabled peer name ip address
---------------------------------------------------------------
[x] primary 10.32.20.241
rules:
enabled volume
---------------------------------------------------------------
Select instance volume on cluster1 for sync-ing to all remote peers
cluster1:mirror> rule
Select action:
1: Add
2: Delete
3: Update
Enter index: 1
Select domain:
1: default
Enter index: 1
Select tenant:
1: admin
Enter index: 1
Select volume:
1: volume: 2f0ee00a-00ca-4ab3-826d-3c143fee1f1e, status: in-use, size: 1GB, attach: /dev/sda on cirros-a-2
2: volume: 06ac175a-bc8d-480c-b8e0-200d1567b80a, status: in-use, size: 1GB, attach: /dev/sda on cirros-a-3
3: volume: ba0867af-caef-4441-b24a-58b8a55360e4, status: in-use, size: 1GB, attach: /dev/sda on cirros-a-1
Enter index: 1
Apply the changes?
Enter 'YES' to confirm: YES
Applying policy changes.
Policy changes were successfully applied.
Watch sync status until done on cluster1(primary)
CLI > storage > mirror > status
cluster1:mirror> status
updated: 16:52:11
primary-site: OK
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e yes n/a up+stopped
cluster1:mirror> list
enabled: yes
site name: primary
peers:
enabled peer name ip address
---------------------------------------------------------------
[x] secondary 10.32.20.242
rules:
enabled volume
---------------------------------------------------------------
[x] 2f0ee00a-00ca-4ab3-826d-3c143fee1f1e
Watch sync status until done on cluster2(secondary)
CLI > storage > mirror > status
cluster2:mirror> status
updated: 16:52:17
secondary-site: WARNING
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e no no up+syncing
cluster2:mirror> status
updated: 16:52:28
secondary-site: OK
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e no no up+replaying
Verify a new volume entry is automatically created on cluster2
Make some changes on the mirroring volume on cirros-a-2 of cluster1
Check cluster2(secondary) status for making sure the data has been synced
cluster2:mirror> status
updated: 16:56:33
secondary-site: OK
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e no yes up+replaying
Demote images on cluster1(primary)
CLI > storage > mirror > demote
cluster1:mirror> demote
1: normal
2: force
Enter index: 1
Image demoted to non-primary
Promote images on cluster2(secondary)
CLI > storage > mirror > promote
cluster2:mirror> promote
1: normal
2: force
Enter index: 1
Image promoted to primary
Check mirroring status on cluster1(primary)
CLI > storage > mirror > status
cluster1:mirror> status
updated: 16:57:46
primary-site: WARNING
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e no no up+unknown
cluster1:mirror> status
updated: 16:58:09
primary-site: OK
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e no no up+replaying
Check mirroring status on cluster2(secondary)
CLI > storage > mirror > status
cluster2:mirror> status
updated: 16:57:48
secondary-site: WARNING
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e yes n/a up+unknown
cluster2:mirror> status
updated: 16:58:05
secondary-site: OK
volume primary synced state
-----------------------------------------------------------------------------
volume-2f0ee00a-00ca-4ab3-826d-3c143fee1f1e yes n/a up+stopped