NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

Clustered ONTAP の基本操作について

ライセンスの有効化

必要に応じてライセンスを追加します。*1

cluster1::> license add -license-code "License Code"

Aggregate の操作

Raid サイズ、Disk 数を指定して Aggregate を作成します。

cluster1::> storage aggregate create -aggregate aggr1 -raidtype raid_dp -diskcount 5 -nodes cluster1-01 -maxraidsize 22

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

cluster1::> storage aggregate show
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0       5.27GB    4.44GB   16% online       1 cluster1-01      raid_dp,
                                                                   normal
aggr0_cluster1_02_0
             900MB   43.54MB   95% online       1 cluster1-02      raid_dp,
                                                                   normal
aggr1       2.64GB    2.64GB    0% online       0 cluster1-01      raid_dp,
                                                                   normal
3 entries were displayed.

disk が aggr1 にアサインされている事を確認します。

cluster1::> disk show -aggregate aggr1
                     Usable           Container
Disk                   Size Shelf Bay Type        Position   Aggregate Owner
---------------- ---------- ----- --- ----------- ---------- --------- --------
cluster1-01:v4.21    1020MB     -   - aggregate   dparity    aggr1     cluster1-01
cluster1-01:v4.22    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v4.24    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v5.19    1020MB     -   - aggregate   parity     aggr1     cluster1-01
cluster1-01:v5.20    1020MB     -   - aggregate   data       aggr1     cluster1-01
5 entries were displayed.

aggr1 に disk を1本追加します。

cluster1::> storage aggregate add-disks -aggregate aggr1 -disklist cluster1-01:v4.25

disk が追加され、aggr1 の容量が増加している事を確認する。

cluster1::> storage aggregate show
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0       5.27GB    4.44GB   16% online       1 cluster1-01      raid_dp,
                                                                   normal
aggr0_cluster1_02_0
             900MB   43.54MB   95% online       1 cluster1-02      raid_dp,
                                                                   normal
aggr1       3.52GB    3.51GB    0% online       0 cluster1-01      raid_dp,
                                                                   normal
3 entries were displayed.

disk(cluster1-01:v4.25)が aggr1 にアサインされている事を確認します。

cluster1::> disk show -aggregate aggr1
                     Usable           Container
Disk                   Size Shelf Bay Type        Position   Aggregate Owner
---------------- ---------- ----- --- ----------- ---------- --------- --------
cluster1-01:v4.21    1020MB     -   - aggregate   dparity    aggr1     cluster1-01
cluster1-01:v4.22    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v4.24    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v4.25    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v5.19    1020MB     -   - aggregate   parity     aggr1     cluster1-01
cluster1-01:v5.20    1020MB     -   - aggregate   data       aggr1     cluster1-01
6 entries were displayed.

インターフェースグループの作成

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

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

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

cluster1::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster1-01
         a0a        ip           02:0c:29:c4:aa:e4 none    -
cluster1-02
         a0a        ip           02:0c:29:c0:8c:8a none    -

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

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

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

cluster1::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster1-01
         a0a        ip           02:0c:29:c4:aa:e4 full    e0d
cluster1-02
         a0a        ip           02:0c:29:c0:8c:8a full    e0d
2 entries were displayed.

VLAN 作成

VLAN を作成します。

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

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
cluster1-02
       a0a-10    a0a     10       02:0c:29:c0:8c:8a
2 entries were displayed.

フェイルオーバーグループ作成

フェイルオーバーグループを作成します。

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

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

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-02       a0a-10
6 entries were displayed.

SVM(Server Virtual Machine)作成

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

cluster1::> 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: svm-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]:
Enter the Vserver root volume's security style {mixed, ntfs, unix} [unix]:
Vserver creation might take some time to finish....

Vserver svm-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 svm-01 has been configured successfully.

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

cluster1::> vserver show
                    Admin     Root                  Name    Name
Vserver     Type    State     Volume     Aggregate  Service Mapping
----------- ------- --------- ---------- ---------- ------- -------
cluster1    admin   -         -          -          -       -
cluster1-01 node    -         -          -          -       -
cluster1-02 node    -         -          -          -       -
svm-01      data    running   rootvol    aggr1      file    file
4 entries were displayed.

LIF(Logical Interface) 作成

  • role について
    • クラスタネットワークで使用する LIF は、cluster を定義します。
    • データ通信で使用する LIF は、data を定義します。通常、SVM 上に作成する LIF です。
    • ノード管理で使用する LIF は、node-mgmt を定義します。
    • Intercluster SnapMirror で使用する LIF は、intercluster を定義します。
    • クラスタ管理に使用する LIF は、cluster-mgmt を定義します。

iSCSI 用の LIF を作成します。

cluster1::> network interface create -vserver svm-01 -lif lif-iscsi01 -role data -data-protocol iscsi -home-node cluster1-01 -home-port a0a-10 -address 172.16.10.11 -netmask 255.255.255.0
cluster1::> network interface create -vserver svm-01 -lif lif-iscsi02 -role data -data-protocol iscsi -home-node cluster1-02 -home-port a0a-10 -address 172.16.10.12 -netmask 255.255.255.0

iSCSI 用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-iscsi01,lif-iscsi02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-iscsi01  up/up    172.16.10.11/24    cluster1-01   a0a-10  true
            lif-iscsi02  up/up    172.16.10.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

NFS 用の LIF を作成します。NFS の LIF はマイグレートが可能です。

cluster1::> network interface create -vserver svm-01 -lif lif-nfs01 -role data -data-protocol nfs -home-node cluster1-01 -home-port a0a-10 -address 172.16.20.11 -netmask 255.255.255.0 -failover-group failovergroup
cluster1::> network interface create -vserver svm-01 -lif lif-nfs02 -role data -data-protocol nfs -home-node cluster1-02 -home-port a0a-10 -address 172.16.20.12 -netmask 255.255.255.0 -failover-group failovergroup

NFS 用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-10  true
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

LIF の詳細情報を確認する際は、-instance オプションを使用します。

cluster1::> network interface show -lif lif-iscsi01 -instance

                    Vserver Name: svm-01
          Logical Interface Name: lif-iscsi01
                            Role: data
                   Data Protocol: iscsi
                       Home Node: cluster1-01
                       Home Port: a0a-10
                    Current Node: cluster1-01
                    Current Port: a0a-10
              Operational Status: up
                 Extended Status: -
                         Is Home: true
                 Network Address: 172.16.10.11
                         Netmask: 255.255.255.0
             Bits in the Netmask: 24
                 IPv4 Link Local: -
              Routing Group Name: d172.16.99.0/24
           Administrative Status: up
                 Failover Policy: disabled
                 Firewall Policy: data
                     Auto Revert: false
   Fully Qualified DNS Zone Name: none
         DNS Query Listen Enable: false
             Failover Group Name:
                        FCP WWPN: -
                  Address family: ipv4
                         Comment: -

LIF の設定を変更する際は、modefy コマンドを使用します。

cluster1::> network interface modify -vserver svm-01 -lif lif-iscsi01 -address 172.16.100.11

CIFS 用の LIF を作成します。

cluster1::> network interface create -vserver svm-01 -lif lif-cifs01 -role data -data-protocol cifs -home-node cluster1-01 -home-port a0a-10 -address 172.16.30.11 -netmask 255.255.255.0
cluster1::> network interface create -vserver svm-01 -lif lif-cifs02 -role data -data-protocol cifs -home-node cluster1-02 -home-port a0a-10 -address 172.16.30.12 -netmask 255.255.255.0

CIFS 用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-cifs01,lif-cifs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-cifs01   up/up    172.16.30.11/24    cluster1-01   a0a-10  true
            lif-cifs02   up/up    172.16.30.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

LIF をマイグレート*2します。
※iSCSI の LIF では、マイグレートをサポートしていません。

cluster1::> network interface migrate -vserver svm-01 -lif lif-nfs01 -dest-node cluster1-02 -dest-port a0a-10

lif-nfs01 の Home Node が cluster1-01 から cluster1-02 へ移行した事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-02   a0a-10  false
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

LIF をリバート*3します。

cluster1::> network interface revert -vserver svm-01 -lif lif-nfs01

lif-nfs01 の Home Node が cluster1-02 から cluster1-01 へ戻った事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-10  true
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

SVM 上の全ての LIF を Home Port に戻す際は、lif_name を指定せず * を入力します。

cluster1::> network interface revert -vserver svm-01 *

LIF に適用している VLAN の変更

VLAN-id 20 を定義します。

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

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
cluster1-02
       a0a-10    a0a     10       02:0c:29:c0:8c:8a
       a0a-20    a0a     20       02:0c:29:c0:8c:8a
4 entries were displayed.

LIF(lif-nfs)の home-port を VLAN 20 に指定します。

cluster1::> network interface modify -vserver svm-01 -lif lif-nfs01 -home-node cluster1-01 -home-port a0a-20
cluster1::> network interface modify -vserver svm-01 -lif lif-nfs02 -home-node cluster1-02 -home-port a0a-20

現状は、home-port が VLAN 10 となっている事を確認します。

cluster1::> network interface show -lif lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-10  false
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  false
2 entries were displayed.

home-port を VLAN20 へ移行します。

cluster1::> network interface migrate -vserver svm-01 -lif lif-nfs01 -dest-node cluster1-01 -dest-port a0a-20
cluster1::> network interface migrate -vserver svm-01 -lif lif-nfs02 -dest-node cluster1-02 -dest-port a0a-20

home-port が VLAN20 へ移行した事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-20  true
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-20  true
2 entries were displayed.

ルーティング設定*4

SVM-01 にデフォルトルートを設定します。

cluster1::> network routing-groups route create -vserver svm-01 -routing-group d172.16.10.0/24 -destination 0.0.0.0/0 -gateway 172.16.10.254

SVM-01 のルーティングテーブルを確認します。

cluster1::> network routing-groups route show
          Routing
Vserver   Group     Destination     Gateway         Metric
--------- --------- --------------- --------------- ------
cluster1
          c192.168.1.0/24
                    0.0.0.0/0       192.168.1.2     20
cluster1-01
          n192.168.1.0/24
                    0.0.0.0/0       192.168.1.2     10
cluster1-02
          n192.168.1.0/24
                    0.0.0.0/0       192.168.1.2     10
svm-01
          d172.16.10.0/24
                    0.0.0.0/0       172.16.10.254   20
4 entries were displayed.

ルーティングテーブルから、ルートを削除する場合は、route delete コマンドを使用します。

cluster1::> network routing-groups route delete -vserver svm-01 -routing-group d172.16.99.0/24 -destination 0.0.0.0/0

Volume の操作

volume を作成します。*5

cluster1::> volume create -vserver svm-01 -volume vol_nfs01 -aggregate aggr1 -size 2g -security-style unix -space-guarantee none -junction-path /vol_nfs01

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

cluster1::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cluster1-01
          vol0         aggr0        online     RW      851.5MB    486.3MB   42%
cluster1-02
          vol0         aggr0_cluster1_02_0
                                    online     RW      851.5MB    519.5MB   38%
svm-01    rootvol      aggr1        online     RW          2GB     1.90GB    5%
svm-01    vol_nfs01    aggr1        online     RW          2GB     1.50GB   24%
4 entries were displayed.

volume サイズを変更する場合は、volume size コマンドを使用します。

cluster1::> volume size -vserver svm-01 -volume vol_nfs01 -new-size 3g

volume サイズが変更された事を確認します。

cluster1::> volume show vol_nfs01
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm-01    vol_nfs01    aggr1        online     RW          3GB     1.50GB   49%

volume 作成時に junction-path を指定しなかった場合は、個別にマウントします。

cluster1::> volume mount -vserver svm-01 -volume vol_nfs01 -junction-path /vol_nfs01

LUN の操作

iSCSI ターゲットを作成します。

cluster1::cluster> vserver iscsi create -vserver svm-01

iSCSI ターゲットが作成された事を確認します。

cluster1::cluster> vserver iscsi show
           Target                           Target                       Status
Vserver    Name                             Alias                        Admin
---------- -------------------------------- ---------------------------- ------
svm-01     iqn.1992-08.com.netapp:sn.a74d0e3b00ef11e4918d123478563412:vs.3
                                            svm-01                       up

igroup を作成します。

clluster1::cluster> lun igroup create -vserver svm-01 -igroup igroup01 -protocol iscsi -ostype vmware

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

cluster1::cluster> lun igroup show
Vserver   Igroup       Protocol OS Type  Initiators
--------- ------------ -------- -------- ------------------------------------
svm-01    igroup01     iscsi    vmware   -

igroup にサーバの initiator を追加します。

cluster1::cluster> lun igroup add -vserver svm-01 -igroup igroup01 -initiator iqn.1998-01.com.vmware:localhost-0a162bb4

igroup に initiator が追加された事を確認します。

cluster1::cluster> igroup show
Vserver   Igroup       Protocol OS Type  Initiators
--------- ------------ -------- -------- ------------------------------------
svm-01    igroup01     iscsi    vmware   iqn.1998-01.com.vmware:localhost-0a162bb4

LUN を作成します。

cluster1::cluster> lun create -vserver svm-01 -path /vol/vol_iscsi01/lun_iscsi01 -size 2g -ostype vmware -space-reserve disabled

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

cluster1::cluster> lun show
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
svm-01    /vol/vol_iscsi01/lun_iscsi01    online  unmapped vmware        2GB


LUN に igroup をマッピングします。

cluster1::cluster> lun map -vserver svm-01 -path /vol/vol_iscsi01/lun_iscsi01 -igroup igroup01

LUN に igroup がマッピングされた事を確認します。

cluster1::cluster> lun mapped show
Vserver    Path                                      Igroup   LUN ID  Protocol
---------- ----------------------------------------  -------  ------  --------
svm-01     /vol/vol_iscsi01/lun_iscsi01              igroup01      0  iscsi

lun サイズを変更する場合は、lun resize コマンドを使用します。

cluster1::> lun resize -vserver svm-01 -path /vol/vol_iscsi01/lun_iscsi01 -size  2.5g

lun サイズが変更された事を確認します。

cluster1::> lun show
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
svm-01    /vol/vol_iscsi01/lun_iscsi01    online  mapped   vmware     2.50GB

NFS 設定

NFS を有効化します。

cluster1::> nfs on -vserver svm-01

NFS が有効になっている事を確認します。

cluster1::> nfs status -vserver svm-01
The NFS server is running.

export-policy を作成します。

cluster1::> vserver export-policy create -vserver svm-01 -policyname export01

export-policy が作成された事を確認します。

cluster1::> vserver export-policy show
Vserver          Policy Name
---------------  -------------------
svm-01           default
svm-01           export01
2 entries were displayed.

export-policy に rule を設定します。

cluster1::> vserver export-policy rule create -vserver svm-01 -policyname export01 -clientmatch 0.0.0.0/0 -anon 0 -rorule any -rwrule any

export-policy に rule が設定された事を確認します。

cluster1::> vserver export-policy rule show
             Policy          Rule    Access   Client                RO
Vserver      Name            Index   Protocol Match                 Rule
------------ --------------- ------  -------- --------------------- ---------
svm-01       export01        1       any      0.0.0.0/0             any

export する volume に export-policy を適用します。

cluster1::> volume modify -vserver svm-01 -volume vol_nfs01 -policy export01

volume に export-policy が適用された事を確認します。

cluster1::> volume show -fields policy
vserver     volume policy
----------- ------ ------
cluster1-01 vol0   -
cluster1-02 vol0   -
svm-01      rootvol
                   default
svm-01      vol_iscsi01
                   default
svm-01      vol_nfs01
                   export01
5 entries were displayed.

CIFS 設定

DNS サーバを設定します。

cluster1::> vserver services dns create -vserver svm-01 -domains example.com -name-servers 192.168.1.99

DNS サーバが設定された事を確認します。

cluster1::> vserver services dns show
                                                              Name
Vserver         State     Domains                             Servers
--------------- --------- ----------------------------------- ----------------
svm-01          enabled   example.com                         192.168.1.99

CIFS サーバを作成し、ドメインに参加します。

cluster1::> cifs create -cifs-server svm-01_cifs -domain example.com -vserver svm-01

In order to create an Active Directory machine account for the CIFS server, you must supply the name and password of a
Windows account with sufficient privileges to add computers to the "CN=Computers" container within the "example.com"
domain.

Enter the user name: Administrator

Enter the password:

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

cluster1::> vserver cifs show
            Server          Status    Domain/Workgroup Authentication
Vserver     Name            Admin     Name             Style
----------- --------------- --------- ---------------- --------------
svm-01      SVM-01_CIFS     up        EXAMPLE          domain

volume を CIFS 共有します。
※volume の -security-style は ntfs である事が必須です。

cluster1::> vserver cifs share create -vserver svm-01 -share-name vol_cifs01 -path /vol_cifs01

volume が CIFS 共有された事を確認します。

cluster1::> vserver cifs share show
Vserver        Share         Path              Properties Comment  ACL
-------------- ------------- ----------------- ---------- -------- -----------
svm-01         admin$        /                 browsable  -        -
svm-01         ipc$          /                 browsable  -        -
svm-01         vol_cifs01    /vol_cifs01       oplocks    -        Everyone / Full Control
                                               browsable
                                               changenotify
3 entries were displayed.

CIFS サーバのローカルユーザを作成します。

cluster1::> vserver cifs users-and-groups local-user create -user-name testuser -vserver svm-01

Enter the password:
Confirm the password:

ローカルユーザが作成された事を確認します。

cluster1::> vserver cifs users-and-groups local-user show
Vserver      User Name                   Full Name            Description
------------ --------------------------- -------------------- -------------
svm-01       SVM-01_CIFS\Administrator                        Built-in administrator account
svm-01       SVM-01_CIFS\testuser        -                    -
2 entries were displayed.

CIFS ACL を設定します。

cluster1::> vserver cifs share access-control create -vserver svm-01 -share vol_cifs01 -user-or-group testuser -permission read

CIFS ACL が設定された事を確認します。

cluster1::> vserver cifs share access-control show
               Share       User/Group                  Access
Vserver        Name        Name                        Permission
-------------- ----------- --------------------------- -----------
svm-01         vol_cifs01  Everyone                    Full_Control
svm-01         vol_cifs01  testuser                    Read
2 entries were displayed.

CIFS ACL が対象のユーザに適用された事を確認します。

cluster1::> vserver cifs share show
Vserver        Share         Path              Properties Comment  ACL
-------------- ------------- ----------------- ---------- -------- -----------
svm-01         admin$        /                 browsable  -        -
svm-01         ipc$          /                 browsable  -        -
svm-01         vol_cifs01    /vol_cifs01       oplocks    -        Everyone / Full Control
                                               browsable           testuser / Read
                                               changenotify
3 entries were displayed.

Snapshot の操作

Snapshot を手動で取得します。

cluster1::> volume snapshot create -vserver svm-01 -volume vol_nfs01 -snapshot ss01

Snapshot が取得された事を確認します。

cluster1::> volume snapshot show -vserver svm-01 -volume vol_nfs01
                                                                   ---Blocks---
Vserver  Volume  Snapshot                        State        Size Total% Used%
-------- ------- ------------------------------- -------- -------- ------ -----
svm-01   vol_nfs01
                 ss01                            valid        80KB     0%   31%

Snapshot を削除します。

cluster1::> volume snapshot delete -vserver svm-01 -volume vol_nfs01 -snapshot *

Warning: Deleting a Snapshot copy permanently removes any data that is stored only in that Snapshot copy. Are
         you sure you want to delete Snapshot copy "ss01" for volume "vol_nfs01" in Vserver "svm-01" ?
          {y|n}: y
1 entry was acted on.

Snapshot を取得するジョブスケジュールを作成します。

cluster1::> job schedule cron create -name job01 -hour 1 -minute 0

Snapshot のジョブが作成された事を確認します。

cluster1::> job schedule show -name job01

Schedule Name: job01
Schedule Type: cron
  Description: @1:00

Snapshot ポリシー*6を作成します。

cluster1::> volume snapshot policy create -policy sspolicy01 -enabled true -vserver svm-01 -schedule1 job01 -count1 2 -prefix1 job01

Snapshot ポリシーが作成された事を確認します。

cluster1::> volume snapshot policy show -policy sspolicy01
Vserver: svm-01
                         Number of Is
Policy Name              Schedules Enabled Comment
------------------------ --------- ------- ----------------------------------
sspolicy01                       1 true    -
    Schedule               Count     Prefix                 SnapMirror Label
    ---------------------- -----     ---------------------- -------------------
    job01                      2     job01                  -

Snapshot ポリシーを volume に適用します。

cluster1::> volume modify -vserver svm-01 -volume vol_nfs01 -snapshot-policy sspolicy01

Snapshot ポリシーが volume に適用された事を確認します。

cluster1::> volume show -fields snapshot-policy -volume vol_nfs01
vserver volume    snapshot-policy
------- --------- ---------------
svm-01  vol_nfs01 sspolicy01

以上

*1:シミュレーターのライセンスはNowからダウンロード可能です。

*2:LIF を Home Node の Home Port から、異なる Node・Port に移行します。

*3:LIF を Home Node の Home Port へ戻します。

*4:ルーティングは、SVM 単位で設定します。

*5:CIFS で共有する volume については、-security-style を ntfs にします。

*6:スケジュールの紐づけ及び、保持世代数を定義します。