NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

Data Protection SnapMirror について

Data Protection SnapMirror とは

従来のデータ保護を目的とした、クラスタ内/クラスタ間のミラーリング機能になります。

クラスタ内 SnapMirror
  • Cluster Network を使用して、ローカルクラスタ上で、SnapMirror を行う。
  • ターゲットボリュームは、Source と同じ SVM でも、異なる SVM でも良い。
クラスタ間 SnapMirror
  • 異なるクラスタに存在するボリューム間で、SnapMirror を行う。
  • クラスタ間の Intercluster LIF を使用する。

設定例

Source 側の設定

Cluster 間通信用の VLAN を定義します。

cluster1::> network port vlan create -node cluster1-01 -vlan-name a0a-99
cluster1::> network port vlan create -node cluster1-02 -vlan-name a0a-99

Cluster 間通信用の VLAN が定義された事を確認します。

cluster1::> network port vlan show
                 Network Network
Node   VLAN Name Port    VLAN ID  MAC Address
------ --------- ------- -------- -----------------
cluster1-01
       a0a-10    a0a     10       02:0c:29:c4:aa:e4
       a0a-20    a0a     20       02:0c:29:c4:aa:e4
       a0a-30    a0a     30       02:0c:29:c4:aa:e4
       a0a-99    a0a     99       02:0c:29:c4:aa:e4
cluster1-02
       a0a-10    a0a     10       02:0c:29:c0:8c:8a
       a0a-20    a0a     20       02:0c:29:c0:8c:8a
       a0a-30    a0a     30       02:0c:29:c0:8c:8a
       a0a-99    a0a     99       02:0c:29:c0:8c:8a
8 entries were displayed.

Cluster 間通信用の FailoverGroup を定義します。

cluster1::> network interface failover-groups create -failover-group failovergroup -node cluster1-01 -port a0a-99
cluster1::> network interface failover-groups create -failover-group failovergroup -node cluster1-02 -port a0a-99

Cluster 間通信用の FailoverGroup を定義された事を確認します。

cluster1::> network interface failover-groups show
Failover
Group               Node              Port
------------------- ----------------- ----------
clusterwide
                    cluster1-01       a0a
                    cluster1-01       e0c
                    cluster1-02       a0a
                    cluster1-02       e0c
failovergroup
                    cluster1-01       a0a-10
                    cluster1-01       a0a-99
                    cluster1-02       a0a-10
                    cluster1-02       a0a-99
8 entries were displayed.

Cluster 間通信用の LIF を作成します。

cluster1::> network interface create -vserver cluster1-01 -lif lif-cluster01 -role intercluster -home-node cluster1-01 -home-port a0a-99 -address 172.16.99.11 -netmask 255.255.255.0
cluster1::> network interface create -vserver cluster1-02 -lif lif-cluster02 -role intercluster -home-node cluster1-02 -home-port a0a-99 -address 172.16.99.12 -netmask 255.255.255.0

Cluster 間通信用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-cluster01,lif-cluster02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
cluster1-01
            lif-cluster01
                         up/up    172.16.99.11/24    cluster1-01   a0a-99  true
cluster1-02
            lif-cluster02
                         up/up    172.16.99.12/24    cluster1-02   a0a-99  true
2 entries were displayed.
Destination 側の設定

インターフェースグループを作成します。

cluster2::>  network port ifgrp create -node cluster2-01 -ifgrp a0a -distr-func ip -mode multimode
cluster2::>  network port ifgrp create -node cluster2-02 -ifgrp a0a -distr-func ip -mode multimode

インターフェースグループが作成された事を確認します。

cluster2::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster2-01
         a0a        ip           02:0c:29:af:99:db none    -
cluster2-02
         a0a        ip           02:0c:29:96:f8:e7 none    -
2 entries were displayed.

インターフェースグループにポートを追加します。

cluster2::> network port ifgrp add-port -node cluster2-01 -ifgrp a0a -port e0d
cluster2::> network port ifgrp add-port -node cluster2-02 -ifgrp a0a -port e0d

インターフェースグループにポートが追加された事を確認します。

cluster2::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster2-01
         a0a        ip           02:0c:29:af:99:db full    e0d
cluster2-02
         a0a        ip           02:0c:29:96:f8:e7 full    e0d
2 entries were displayed.

Cluster 間通信用の VLAN を定義します。

cluster2::> network port vlan create -node cluster2-01 -vlan-name a0a-99
cluster2::> network port vlan create -node cluster2-02 -vlan-name a0a-99

Cluster 間通信用の VLAN が定義された事を確認します。

cluster2::> network port vlan show
                 Network Network
Node   VLAN Name Port    VLAN ID  MAC Address
------ --------- ------- -------- -----------------
cluster2-01
       a0a-99    a0a     99       02:0c:29:af:99:db
cluster2-02
       a0a-99    a0a     99       02:0c:29:96:f8:e7
2 entries were displayed.

Cluster 間通信用の FailoverGroup を定義します。

cluster2::> network interface failover-groups create -failover-group failovergroup -node cluster2-01 -port a0a-99
cluster2::> network interface failover-groups create -failover-group failovergroup -node cluster2-02 -port a0a-99

Cluster 間通信用の FailoverGroup を定義された事を確認します。

cluster2::> network interface failover-groups show
Failover
Group               Node              Port
------------------- ----------------- ----------
clusterwide
                    cluster2-02       a0a
                    cluster2-02       e0c
                    cluster2-01       a0a
                    cluster2-01       e0c
failovergroup
                    cluster2-02       a0a-99
                    cluster2-01       a0a-99
6 entries were displayed.

vserver setup コマンドで SVM を作成します。

cluster2::> vserver setup
Welcome to the Vserver Setup Wizard, which will lead you through
the steps to create a virtual storage server that serves data to clients.

You can enter the following commands at any time:
"help" or "?" if you want to have a question clarified,
"back" if you want to change your answers to previous questions, and
"exit" if you want to quit the Vserver Setup Wizard. Any changes
you made before typing "exit" will be applied.

You can restart the Vserver Setup Wizard by typing "vserver setup". To accept a default
or omit a question, do not enter a value.

Vserver Setup wizard creates and configures only data Vservers.
If you want to create a Vserver with Infinite Volume use the vserver create command.

Step 1. Create a Vserver.
You can type "back", "exit", or "help" at any question.

Enter the Vserver name: bsvm-01
Choose the Vserver data protocols to be configured {nfs, cifs, fcp, iscsi, ndmp}:  nfs, cifs, fcp, iscsi, ndmp
Choose the Vserver client services to be configured {ldap, nis, dns}: dns
Enter the Vserver's root volume aggregate [aggr1]: aggr1
Enter the Vserver language setting, or "help" to see all languages [C.UTF-8]: C
Enter the Vserver root volume's security style {mixed, ntfs, unix} [unix]: unix
Vserver creation might take some time to finish....

Vserver bsvm-01 with language set to C created.  The permitted protocols are nfs,cifs,fcp,iscsi,ndmp.

Step 2: Create a data volume
You can type "back", "exit", or "help" at any question.

Do you want to create a data volume? {yes, no} [yes]: no

Step 3: Create a logical interface.
You can type "back", "exit", or "help" at any question.

Do you want to create a logical interface? {yes, no} [yes]: no

Step 4: Configure DNS (Domain Name Service).
You can type "back", "exit", or "help" at any question.

Do you want to configure DNS? {yes, no} [yes]: no
Error: Failed to create NFS. Reason: You do not have a valid license for "NFS". Reason: Package "NFS" is not licensed in the cluster.

Step 5: Configure NFS.
You can type "back", "exit", or "help" at any question.

Step 6: Configure CIFS.
You can type "back", "exit", or "help" at any question.

Do you want to configure CIFS? {yes, no} [yes]: no

Step 7: Configure iSCSI.
You can type "back", "exit", or "help" at any question.

Do you want to configure iSCSI? {yes, no} [yes]: no

Step 8: Configure FCP.
You can type "back", "exit", or "help" at any question.

Do you want to configure FCP? {yes, no} [yes]: no

Vserver bsvm-01 has been configured successfully.

Cluster 間通信用の LIF を作成します。

cluster2::> network interface create -vserver cluster2-01 -lif lif-cluster01 -role intercluster -home-node cluster2-01 -home-port a0a-99 -address 172.16.99.21 -netmask 255.255.255.0
cluster2::> network interface create -vserver cluster2-02 -lif lif-cluster02 -role intercluster -home-node cluster2-02 -home-port a0a-99 -address 172.16.99.22 -netmask 255.255.255.0

Cluster 間通信用の LIF が作成されている事を確認します。

cluster2::> network interface show lif-cluster01,lif-cluster02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
cluster2-01
            lif-cluster01
                         up/up    172.16.99.21/24    cluster2-01   a0a-99  true
cluster2-02
            lif-cluster02
                         up/up    172.16.99.22/24    cluster2-02   a0a-99  true
2 entries were displayed.

Cluster Peer を作成します。

cluster2::> cluster peer create -peer-addrs 172.16.99.11,172.16.99.12 -username admin
Remote Password:

Cluster Peer が作成されている事を確認します。

cluster2::> cluster peer show -instance

            Peer Cluster Name: cluster1
Remote Intercluster Addresses: 172.16.99.11, 172.16.99.12
                 Availability: Available
          Remote Cluster Name: cluster1
          Active IP Addresses: 172.16.99.11, 172.16.99.12
        Cluster Serial Number: 1-80-000008

Vserver Peer を作成します。

cluster2::> vserver peer create -vserver bsvm-01 -peer-vserver svm-01 -applications snapmirror -peer-cluster cluster1

Vserver Peer が作成されている事を確認します。※この時点では、まだ承認されていません。

cluster2::> vserver peer show
            Peer        Peer
Vserver     Vserver     State
----------- ----------- ------------
bsvm-01     svm-01      initiated

Source 側で、destination 側の Vserver Peer を承認します。

cluster1::> vserver peer accept -vserver svm-01 -peer-vserver bsvm-01

Vserver Peer が承認されている事を確認します

cluster2::> vserver peer show
            Peer        Peer
Vserver     Vserver     State
----------- ----------- ------------
bsvm-01     svm-01      peered

SnapMirror 送信先の Volume を作成します。

cluster2::> volume create -vserver bsvm-01 -volume rootvol_is -aggregate aggr1 -type DP

送信先の Volume が作成された事を確認します。

cluster2::> volume show -volume rootvol_is
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
bsvm-01   rootvol_is   aggr1        online     DP         20MB    19.89MB    0%

InterCluster SnapMirror を作成します。

cluster2::> snapmirror create -source-path cluster1://svm-01/rootvol bsvm-01:rootvol_is -type DP

InterCluster SnapMirror が作成された事を確認します。

cluster2::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
svm-01:rootvol
            DP   bsvm-01:rootvol_is
                              Uninitialized
                                      Idle           -         true    -

InterCluste SnapMirror の Initialize を行います。

cluster2::> snapmirror initialize -source-path cluster1://svm-01/rootvol bsvm-01:rootvol_is

Initialize が完了した事を確認します。

cluster1::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
svm-01:rootvol
            DP   bsvm-01:rootvol_is
                              Snapmirrored
                                      Idle           -         true    -

以上