【NetApp】同一SVM間でのSnapMirror

about

NetAppで同一SVM間でのSnapMirrormの方法。 前提は以下の通り。

  • SnapMirrorに用いるSVMは作成済み。
  • SnapMirror元のvolumeは作成済み。
  • SnapMirror先のVolumeは作成する。

volumeの作成

SVMのVolumeの確認

SnapMirror先となるvolumeを作成する前に、現状のSVMを確認する。

cluster01::> volume show -vserver server1
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- -------------------- -----
server1 test01nasv001_root test_aggr1 online RW 16TB 1.31TB  91%
server1 test01navl001 test_aggr1 online RW 16TB   1.31TB  91%
2 entries were displayed.

SVMのvolumの状況はvolume show -vserver [vserver_name]で確認できる。

volumeを作成する

SnapMirror先となるvolumeを作成する。
volumeの作成にはvolume create -vserver [vserver_name] -volume [volume_name] -size [size MB,GB,TB]を使う。
実際に発行したコマンドは以下の通り。オプションについては各自で確認して欲しい。

cluster01::> volume create -vserver server1 -volume
test01navl901 -aggregate test_aggr1 -size 50G -snapshot-space 0
-snapshot-policy none -space-guarantee none -security-style unix -policy
default -type DP
[Job 10383] Job succeeded: Successful

作成したvolumeを確認する。

volumehが作成できたかは、またvolume showをして確認する。

cluster01::> volume show -vserver p9999w11nasv001
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ----------  ---------- -----
server1 test01nasv001_root test_aggr1 online RW 16TB 1.31TB  91%
server1 test01navl001 test_aggr1 online RW 16TB   1.31TB  91%
server1 test01navl901 test_aggr1 online RW 30GB 30.00GB  0%
3 entries were displayed.

エントリが3つに増え、test01navl901が作成されたことが確認できた。

SnapMirrorの設定

SnapMirrorの設定を確認する snapmirror show

SnapMirrorはsnapmirrorコマンドで体系が統一されている。snapmirror showを発行して、現状を確認する。

cluster01::> snapmirror show -vserver server1
There are no entries matching your query.

何も設定されていないことが、確認できた。

SnapMirrorの設定を行う snapmirror create

ソースとデスティネーションとなるvolumeが用意できたので、SnapMirrorによる転送の設定を行う。今回の例のvolumeの関係性は以下の通り。

  • ソース
    • test01navl001
  • デスティネーション
    • test01navl901

この関係性でSnapMirrorを作成する。

clusetr01::> snapmirror create -source-path
server1:test01navl001 -destination-path server1:test01navl901 -type DP -throttle 44800 -schedule 15min
Operation succeeded: snapmirror create for the relationship with
destination "server1:test01navl901".

コマンドが発行できたので、現状の確認を行う。

SnapMirrorのイニシャライズをする snapmirror initialize

ここまでSnapMirrorの関係性は設定できたが、SnapMirrorは開始されていない。
有効かされていないと、snapmirror showを発行するとUninitializedと表示される。

cluster01::> snapmirror show -vserver server1
                                                   Progress
Source            Destination Mirror  Relationship   Total             Last
Path        Type  Path        State   Status         Progress  Healthy
Updated
----------- ---- ------------ ------- -------------- --------- -------
--------
server1:test01navl001 DP server1:test01navl901
Uninitialized Idle - true -

SnapMirrorを開始するために、snapmirrro initialzieを行う。

clusetr01::> snapmirror initialize -destination-path
server1:test01navl901
Operation is queued: snapmirror initialize of destination
"server1:test01navl901".

再度、snapmirror showをして確認を行う。成功していればSnapmirroredと表示される。

clusetr01::> snapmirror show -vserver server1

Progress
Source            Destination Mirror  Relationship   Total             Last
Path        Type  Path        State   Status         Progress  Healthy
Updated
----------- ---- ------------ ------- -------------- --------- -------
--------
server1:test01navl001 DP server1:test01navl901
Snapmirrored Idle - true -

成功だ。最後にlunのmapping状況も確認しよう。

clusetr01::> lun show -vserver server1
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
server1 /vol/test01navl901/test01nalu001 online unmapped
linux 20GB
server1 /vol/test01navl001/test01nalu001 online mapped linux
20GB
2 entries were displayed.

2つのパスが確認できる。

余談

SnapMirror後のvolume名変更

SnapMirrorの設定後に、Volumeのタイポ等に気が付いて名前変更を行う場合もあるだろう。
その際でも関係は維持されたまま、名前変更ができるので安心して欲しい。
ちなみに名前変更にはvolume renameコマンドを使用する。

cluster01::> volume rename -vserver server1 -volume
test01navl901 -newname test01nasl901
[Job 10385] Job succeeded: Successful

名前変更を行った後のsnapmirror show

cluster01::> snapmirror show -vserver server1

Progress
Source            Destination Mirror  Relationship   Total             Last
Path        Type  Path        State   Status         Progress  Healthy
Updated
----------- ---- ------------ ------- -------------- --------- -------
--------
server1:test01navl001 DP server1:test01nasl901
Snapmirrored Idle - true -