NetApp ONTAP 9.xの設定取得用TeraTermマクロ

NetApp ONTAP 9.1環境から9.8環境に移行する案件があったので、現状の設定とステータスをだいたい取れるようなTera Termマクロを作ったので公開

githubにも置いた https://github.com/osakanataro/get-ontap-config

1sendln 'rows 0'
2wait '::> '
3sendln 'date'
4wait '::> '
5 
6 
7;基本設定系
8;システム構成
9sendln 'vserver show'
10wait '::> '
11 
12sendln 'vserver show -ins'
13wait '::> '
14sendln 'system node show'
15wait '::> '
16sendln 'system node show -ins'
17wait '::> '
18sendln 'options'
19wait '::> '
20sendln 'system license show'
21wait '::> '
22sendln 'system license show -ins'
23wait '::> '
24sendln 'system snmp show'
25wait '::> '
26sendln 'system node autosupport show'
27wait '::> '
28sendln 'system node autosupport show -ins'
29wait '::> '
30sendln 'system node autosupport history show'
31wait '::> '
32sendln 'cluster time-service ntp server show'
33wait '::> '
34sendln 'timezone'
35wait '::> '
36sendln 'system service-processor show'
37wait '::> '
38sendln 'system service-processor network show'
39wait '::> '
40 
41;ネットワーク関連  
42sendln 'network interface show'
43wait '::> '
44sendln 'network interface show -ins'
45wait '::> '
46sendln 'network interface show -failover'
47wait '::> '
48sendln 'network interface failover-groups show'
49wait '::> '
50 
51sendln 'network port show'
52wait '::> '
53sendln 'network port show -ins'
54wait '::> '
55sendln 'network port ifgrp show'
56wait '::> '
57sendln 'network port ifgrp show -ins'
58wait '::> '
59 
60sendln 'network ipspace show'
61wait '::> '
62sendln 'network port broadcast-domain show'
63wait '::> '
64 
65 
66 
67sendln 'vserver services name-service ns-switch show'
68wait '::> '
69sendln 'vserver services name-service dns hosts show'
70wait '::> '
71sendln 'vserver services name-service dns hosts show -ins'
72wait '::> '
73sendln 'security login show'
74wait '::> '
75sendln 'security login show -ins'
76wait '::> '
77 
78;名前解決関連
79sendln 'vserver services name-service dns show'
80wait '::> '
81sendln 'vserver services name-service nis-domain show'
82wait '::> '
83 
84;ディスク構成
85sendln 'storage disk show'
86wait '::> '
87sendln 'storage disk show -ins'
88wait '::> '
89sendln 'storage disk show -partition-ownership'
90wait '::> '
91 
92sendln 'df'
93wait '::> '
94sendln 'df -h'
95wait '::> '
96sendln 'df -A -h'
97wait '::> '
98sendln 'df -i'
99wait '::> '
100 
101sendln 'storage aggregate show'
102wait '::> '
103sendln 'storage aggregate show -ins'
104wait '::> '
105sendln 'storage aggregate show-spare-disks'
106wait '::> '
107 
108sendln 'volume show'
109wait '::> '
110sendln 'volume show -ins'
111wait '::> '
112sendln 'volume language'
113wait '::> '
114sendln 'volume show -fields junction-path,snapshot-policy,policy'
115wait '::> '
116 
117sendln 'volume efficiency show'
118wait '::> '
119sendln 'volume efficiency policy show'
120wait '::> '
121 
122 
123;ファイル共有(NFS/CIFS)  
124sendln 'vserver cifs show'
125wait '::> '
126sendln 'vserver cifs show -ins'
127wait '::> '
128sendln 'vserver cifs share show'
129wait '::> '
130sendln 'vserver cifs share show -ins'
131wait '::> '
132sendln 'vserver cifs share access-control show'
133wait '::> '
134sendln 'vserver cifs share access-control show -ins'
135wait '::> '
136sendln 'vserver nfs show'
137wait '::> '
138sendln 'vserver nfs show -ins'
139wait '::> '
140sendln 'vserver export-policy show'
141wait '::> '
142sendln 'vserver export-policy show -ins'
143wait '::> '
144sendln 'vserver export-policy rule show'
145wait '::> '
146sendln 'vserver export-policy rule show -ins'
147wait '::> '
148sendln 'volume qtree show'
149wait '::> '
150sendln 'volume qtree show -ins'
151wait '::> '
152sendln 'volume quota show'
153wait '::> '
154sendln 'volume quota show -ins'
155wait '::> '
156sendln 'volume quota policy show'
157wait '::> '
158sendln 'volume quota policy show -ins'
159wait '::> '
160sendln 'volume quota policy rule show'
161wait '::> '
162sendln 'volume quota policy rule show -ins'
163wait '::> '
164sendln 'volume quota report'
165wait '::> '
166 
167;Snapshot運用
168sendln 'volume snapshot show'
169wait '::> '
170sendln 'volume snapshot policy show'
171wait '::> '
172sendln 'volume snapshot autodelete show'
173wait '::> '
174sendln 'volume show -fields snapshot-policy,policy'
175wait '::> '
176sendln 'volume show -fields percent-snapshot-space'
177wait '::> '
178sendln 'volume show -fields sched-snap-name'
179wait '::> '
180 
181;Snapmirror
182sendln 'snapmirror show'
183wait '::> '
184sendln 'snapmirror show -ins'
185wait '::> '
186sendln 'snapmirror show-history'
187wait '::> '
188sendln 'snapmirror show-history -ins'
189wait '::> '
190 
191;ストレージ間通信  
192sendln 'storage shelf show'
193wait '::> '
194sendln 'storage shelf acp show'
195wait '::> '
196 
197;クラスタ設定
198sendln 'cluster show'
199wait '::> '
200sendln 'cluster show -ins'
201wait '::> '
202sendln 'cluster peer show'
203wait '::> '
204 
205sendln 'vserver peer show'
206wait '::> '
207sendln 'vserver peer show -ins'
208wait '::> '

NetAppでファイルのアクセス監査ログを取る

ファイルサーバで、誰かがエクスプローラーの誤操作で変なところにファイルを移動させてしまうことがある。

その時に、アクセス監査ログから誰が移動(削除)操作を行ったかなどを特定できないか、ということで、NetAppのStorage VMに対するアクセス監査の設定を行った。

CIFSアクセスとNFS v4アクセスで利用できる。

公式ドキュメント:SVMでのNASイベントの監査

まずは監査ログの出力先ディレクトリを作成する。これは設定するStorage VM配下のボリュームのどこかに作成する。

今回はvolume:testvolの中に「audit」というディレクトリを作成した。

Storage VMへの監査有効化は「vserver audit create -vserver SVM名 -destination /出力先ディレクトリ」で行う。

1ontap98::> vserver audit show
2This table is currently empty.
3 
4ontap98::> vserver audit create -vserver share225 -destination /testvol/audit
5 
6ontap98::>

設定されたことを確認する。

1ontap98::> vserver audit show
2Vserver     State  Event Types        Log Format Target Directory
3----------- ------ ------------------ ---------- ----------------------------
4share225    false  file-ops,          evtx       /testvol/audit
5                   cifs-logon-logoff,
6                   audit-policy-
7                   change
8 
9ontap98::> vserver audit show -ins
10 
11                           Vserver: share225
12                    Auditing State: false
13              Log Destination Path: /testvol/audit
14     Categories of Events to Audit: file-ops, cifs-logon-logoff,
15                                    audit-policy-change
16                        Log Format: evtx
17               Log File Size Limit: 100MB
18      Log Rotation Schedule: Month: -
19Log Rotation Schedule: Day of Week: -
20        Log Rotation Schedule: Day: -
21       Log Rotation Schedule: Hour: -
22     Log Rotation Schedule: Minute: -
23                Rotation Schedules: -
24          Log Files Rotation Limit: 0
25            Log Retention Duration: 0s
26 
27ontap98::>

次にディレクトリに監査を設定する。

CIFSの場合

volume:testvolの中にある「test1」というディレクトリに設定を行うため、プロパティから「詳細設定」を選択

「監査」タブで設定を行う

今回はファイルやディレクトリの削除について記録したいので、「プリンシパル」を「Everyone」と指定し、「高度なアクセス許可」で「サブフォルダーとファイルの削除」と「削除」で設定します。

下記のような表示になります。

これで設定は完了です。

該当するファイルアクセスを行うと、指定したディレクトリ内に「audit_<vserver名>_last.evtx」というファイルにログが出力されていきます。

上記は毎日2:00にファイルをローテートする設定を追加しているので複数のファイルが存在しています。

ちなみに設定は下記の様に行いました。(-rotate-limit 3で設定しているのでファイルが日時入りのファイルが3つある)

1ontap98::> vserver audit modify -vserver share225 -rotate-schedule-month all -rotate-schedule-dayofweek all -rotate-schedule-hour 2 -rotate-schedule-minute 0 -rotate-limit 3 -rotate-size 1M
2 
3ontap98::> vserver audit show -ins
4 
5                           Vserver: share225
6                    Auditing State: true
7              Log Destination Path: /testvol/audit
8     Categories of Events to Audit: file-ops
9                        Log Format: evtx
10               Log File Size Limit: 1MB
11      Log Rotation Schedule: Month: January-December
12Log Rotation Schedule: Day of Week: Sunday-Saturday
13        Log Rotation Schedule: Day: -
14       Log Rotation Schedule: Hour: 2
15     Log Rotation Schedule: Minute: 0
16                Rotation Schedules: @2:00
17          Log Files Rotation Limit: 3
18            Log Retention Duration: 0s
19 
20ontap98::>

(1回設定した値を消すには 「-rotate-schedule-dayofweek -」などを行う)

で、どんなログが出るか、というあたりですが、ファイルを削除した場合には、イベントID:4656とイベントID:9999が出力されました。

イベントIDの詳細については「監査できるSMBイベント」を参照のこと…ただ、載ってないのもあるんですよね…

NFSv4の場合

NFS v4の場合はLinux上から nfs4_getfacl, nfs4_setfaclコマンドを使って設定する。

NFS v4でマウントして、「test3」というディレクトリのACLを確認

1[root@linux mnt]# nfs4_getfacl test3/
2 
3# file: test3/
4A::OWNER@:rwaDxtTnNcCy
5A:g:GROUP@:rxtncy
6A::EVERYONE@:rxtncy
7[root@linux mnt]#

上記には「U:」で始まるものがありません。

ファイルとディレクトリに関して成功した操作→「fdS」
対象は全ユーザ→「EVERYONE@」
ACLの変更と削除に関して記録→「Cd」

ということを行いたい場合は「nfs4_setfacl -R -a U:fdS:EVERYONE@:Cd 対象ディレクトリ」と実行します。

1[root@linux mnt]# nfs4_setfacl -R -a U:fdS:EVERYONE@:Cd test3
2[root@linux mnt]# nfs4_getfacl test3/
3 
4# file: test3/
5A::OWNER@:rwaDxtTnNcCy
6A:g:GROUP@:rxtncy
7A::EVERYONE@:rxtncy
8U:fdS:EVERYONE@:dC
9[root@linux mnt]#

で、ファイルを削除した場合、イベントID:4663 とイベントID:4658 が記録されました。

NFSで監査できるイベントについては「監査できるNFSファイルおよびディレクトリのアクセス イベント」に記載があるのですが、evtx出力した時にどういうイベントIDになるのか、という対応表はないようです。

また、どちらの場合でも、下記の様なエラーっぽいものが表示されています。この説明が見つかりませんは仕様で回避方法は無いようです。

1ソース "NetApp-Security-Auditing" からのイベント ID 4658 の説明が見つかりません。このイベントを発生させるコンポーネントがローカル コンピューターにインストールされていないか、インストールが壊れています。ローカル コンピューターにコンポーネントをインストールするか、コンポーネントを修復してください。
2 
3イベントが別のコンピューターから発生している場合、イベントと共に表示情報を保存する必要があります。
4 
5イベントには次の情報が含まれています:
6 
7172.17.44.87
8EV_RenderedValue_2.00
9false
10Not Present
11Not Present
12Security
13File
1400000000000406;00;0000064f;046d016e
15(nfsshare);/test3/test2.txt
16 
17メッセージ リソースは存在しますが、メッセージがメッセージ テーブルに見つかりませんでした。
1The description for Event ID 4658 from source NetApp-Security-Auditing cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
2 
3If the event originated on another computer, the display information had to be saved with the event.
4 
5The following information was included with the event:
6 
7172.17.44.87
8EV_RenderedValue_2.00
9false
10Not Present
11Not Present
12Security
13File
1400000000000406;00;0000064f;046d016e
15(nfsshare);/test3/test2.txt

日本語メッセージリソースがないことが原因なのかと考え、英語UIに替えてみても表示は同じでした。

NetApp KB「The description for Event ID cannot be found in the EVTX logs generated by clustered Data ONTAP」があるので解決できるのかと思ったのですが、無理そうです。

古いONTAPがActive Directoryに参加できない

古いONTAP、具体的にはONTAP 8.3.2環境の移行案件があったので、検証のためにONTAP simulatorのONTAP 8.3.2版を仮想環境上に作成して、Active Directoryに参加しようとしたところ下記のエラーとなった。(なお、接続先Active Direcrotyはsamba 4.14.5で構成している)

1ontap832::> vserver cifs create -cifs-server share226 -domain adosakana.local -vserver share226
2 
3In order to create an Active Directory machine account for the CIFS server, you
4must supply the name and password of a Windows account with sufficient
5privileges to add computers to the "CN=Computers" container within the
6ADOSAKANA.LOCAL domain.
7 
8Enter the user name: administrator
9 
10Enter the password:
11 
12Error: Machine account creation procedure failed
13  [ 12154] Loaded the preliminary configuration.
14  [ 12332] Created a machine account in the domain
15  [ 12339] Successfully connected to 172.17.44.49:445 using TCP
16  [ 12351] Unable to connect to LSA service on
17           samba.adosakana.local (Error:
18           RESULT_ERROR_GENERAL_FAILURE)
19  [ 14357] TCP connection to 172.17.44.141:445 via interface
20           172.17.44.236 failed: (Operation timed out).
21  [ 14357] Could not open a socket to 'samba.adosakana.local'
22  [ 14357] Unable to connect to LSA service on
23           samba.adosakana.local (Error:
24           RESULT_ERROR_SPINCLIENT_UNABLE_TO_RESOLVE_SERVER)
25  [ 14357] No servers available for MS_LSA, vserver: 2, domain:
26           adosakana.local.
27**[ 14357] FAILURE: Unable to make a connection (LSA:adosakana.local),
28**         result: 6940
29  [ 14357] Could not find Windows SID
30           'S-1-5-21-937304154-1581684492-536532533-512'
31  [ 14381] Deleted existing account
32           'CN=SHARE226,CN=Computers,DC=adosakana,DC=local'
33 
34Error: command failed: Failed to create the Active Directory machine account
35       "SHARE226". Reason: SecD Error: no server available.
36 
37ontap832::>

これは暗号化の問題なので「vserver cifs security show」で設定項目を確認する。

1ontap832::> vserver cifs security show -vserver share226
2 
3Vserver: share226
4 
5                    Kerberos Clock Skew:                   - minutes
6                    Kerberos Ticket Age:                   - hours
7                   Kerberos Renewal Age:                   - days
8                   Kerberos KDC Timeout:                   - seconds
9                    Is Signing Required:                   -
10        Is Password Complexity Required:                   -
11   Use start_tls For AD LDAP connection:               false
12              Is AES Encryption Enabled:               false
13                 LM Compatibility Level:  lm-ntlm-ntlmv2-krb
14             Is SMB Encryption Required:                   -
15 
16ontap832::>

ONTAP 8.3.2無印では関連するオプション「SMB2 Enabled for DC Connections」を設定する項目が無い

1ontap832::> version -node *
2 
3ontap832-01:
4NetApp Release 8.3.2: Tue Feb 23 23:35:06 UTC 2016
5 
6 
7ontap832::>

アップデータを探したところ、832P12_q_image.tgz(リンク先はNetAppサポートサイトにログインを済ませてからアクセス) があったので、「ONTAP 9.7シミュレータをアップデートする手法」と同じ手法でアップデートを行った。

1ontap832::> version -node *
2 
3ontap832-01:
4NetApp Release 8.3.2P12: Mon Aug 14 02:57:01 UTC 2017
5 
6 
7ontap832::>

ONTAP 8.3.2P12であれば、「SMB2 Enabled for DC Connections」が存在していた。

1ontap832::> vserver cifs security show -vserver share226
2 
3Vserver: share226
4 
5                    Kerberos Clock Skew:                   - minutes
6                    Kerberos Ticket Age:                   - hours
7                   Kerberos Renewal Age:                   - days
8                   Kerberos KDC Timeout:                   - seconds
9                    Is Signing Required:                   -
10        Is Password Complexity Required:                   -
11   Use start_tls For AD LDAP connection:               false
12              Is AES Encryption Enabled:               false
13                 LM Compatibility Level:  lm-ntlm-ntlmv2-krb
14             Is SMB Encryption Required:                   -
15        SMB1 Enabled for DC Connections:                   -
16        SMB2 Enabled for DC Connections:                   -
17 
18ontap832::>

設定を変更

1ontap832::> vserver cifs security modify -vserver share226 -smb1-enabled-for-dc-connections false -smb2-enabled-for-dc-connections true
2 
3ontap832::> vserver cifs security show -vserver share226
4 
5Vserver: share226
6 
7                    Kerberos Clock Skew:                   - minutes
8                    Kerberos Ticket Age:                   - hours
9                   Kerberos Renewal Age:                   - days
10                   Kerberos KDC Timeout:                   - seconds
11                    Is Signing Required:                   -
12        Is Password Complexity Required:                   -
13   Use start_tls For AD LDAP connection:               false
14              Is AES Encryption Enabled:               false
15                 LM Compatibility Level:  lm-ntlm-ntlmv2-krb
16             Is SMB Encryption Required:                   -
17        SMB1 Enabled for DC Connections:               false
18        SMB2 Enabled for DC Connections:                true
19 
20ontap832::>

そして、Active Directoryへの参加

1ontap832::> vserver cifs create -cifs-server share226 -domain adosakana.local -vserver share226
2 
3In order to create an Active Directory machine account for the CIFS server, you
4must supply the name and password of a Windows account with sufficient
5privileges to add computers to the "CN=Computers" container within the
6ADOSAKANA.LOCAL domain.
7 
8Enter the user name: administrator
9 
10Enter the password:
11 
12Warning: An account by this name already exists in Active Directory at
13         CN=SHARE226,CN=Computers,DC=adosakana,DC=local
14         Ok to reuse this account? {y|n}: y
15 
16ontap832::>

今度は成功した。

富士通のNetApp型番メモ 2021/07/07版

富士通はETERNUS NRシリーズとしてNetApp FASシリーズを取り扱っていた。

2020年に「ETERNUS AX/HXシリーズ」に改名したが、元のNetApp型番と違う番号がついており、よくわからなくなってしまった。

(これまではFAS 2720A→NR F2720という感じで分かりやすかった)

ETERNUS AX/ETERNUS HX series 製品変遷FUJITSU Storage ETERNUS AX series, HX series 製品比較表NetApp Fusionで「New ASA, AFF and FAS Manual Design」で出てくるプロダクトを比較しつつこんな感じかな、というのが下記

正しいかどうかは未確認

ETERNUX AX1100
 拡張Shelf不許可の廉価版AX2100?
 CPU/メモリスペックは2CPU8コア/64GB

ETERNUS AX2100 = AFF A220A? AFF A250A?
 CPU/メモリスペックはAX2100/HX2100/2200で同じ2CPU12コア/64GB
ETERNUS AX2200 = FAS500fA
 NVMe/FCにも対応
 拡張Shelf NS224とあわせてNVMe SSD SED専用
 220V電源専用
 CPU/メモリスペックは2CPU12コア/128GB
ETERNUS AX4100 = AFF A400A
 NVMe/FCにも対応
 CPU/メモリスペックは2CPU10コア/256GB

ETERNUS HX2100 = FAS2720A
 コントローラ内蔵が3.5インチHDD
 CPU/メモリスペックはAX2100/HX2100/2200で同じ2CPU12コア/64GB
ETERNUS HX2200 = FAS2750A
 コントローラ内蔵が2.5インチHDD
 CPU/メモリスペックはAX2100/HX2100/2200で同じ2CPU12コア/64GB
ETERNUS HX6100 = FAS8300A?
 CPU/メモリスペックは2CPU10コア/256GB


富士通が提供する日本語資料

ETNERNUS AX/HX Series ホワイトペーパー
ETNERNUS AX/HX Series マニュアル

ETERNUS AX series、ETERNUS HX series データ移行情報 相互接続性について」という文書内でNetApp製FAS、ETERNUS NRと、ETRERNUS AX/HXに機能差異があるような記載が・・・
ライセンス内容の差異だといいんだけど


2021/10/20追記

HX2100実機が来た

NR1000F時代はNetAppそのままだったものが、富士通カスタマイズでの提供になりました。Lenovo/IBM版と同じような提供形態になりましたね。

NetApp純正だとONTAP 9.8P11が出ていますが、富士通からは9.8P3での提供でした。(SupportDeskサイトでのアップデートは未提供)

初期パスワードについてはNR1000F時代から引き続き「password0」でした。また、ライセンスはライセンスコードを印字したシートが付属です。また、ライセンスは入力された状態で起動します。

ONTAP 9.7シミュレータのシステムボリュームを拡張する

2024/05/21追記: 新規でONTAPシミュレータを作る人は「ONTAPシミュレータの新規導入手順」の方を読んでください。

この記事は稼働中のONTAPシミュレータをなんとかしようとするものです。


NetApp ONTAP 9.7シミュレータをしばらく稼働させ続けていると、ディスクがフルとなって死ぬ。

なんでなんだろーなー?とONTAP 9.1シミュレータと構成の差をみてみたら、仮想ディスクの大きさが4GBから1GBに縮小されていた。

そりゃ、ディスクの余裕がだいぶ異なりますね。

というわけで、vol0の容量を増やしましょう

状況の確認

まず、aggregate の空き容量を確認
「storage aggregate show」か「df -A -h」を実行します。

1ontap97-sub::> storage aggregate show
2 
3 
4Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
5--------- -------- --------- ----- ------- ------ ---------------- ------------
6aggr0_ontap97_sub_01 855MB 41.41MB 95% online   1 ontap97-sub-01   raid_dp,
7                                                                   normal
8aggr1      14.06GB   14.00GB    0% online       3 ontap97-sub-01   raid_dp,
9                                                                   normal
102 entries were displayed.
11 
12ontap97-sub::> df -A -h
13Aggregate                total       used      avail capacity
14aggr0_ontap97_sub_01     855MB      812MB       42MB      95%
15aggr0_ontap97_sub_01/.snapshot 45MB    0B       45MB       0%
16aggr1                     14GB       61MB       14GB       0%
17aggr1/.snapshot             0B         0B         0B       0%
184 entries were displayed.
19 
20ontap97-sub::>

空きディスクの確認

現状、aggr0の空き容量がないため、ディスクを追加します。

追加できるディスクがあるかを「storage disk show -container-type spare」を実行して確認

1ontap97-sub::> storage disk show -container-type spare
2                     Usable           Disk    Container   Container
3Disk                   Size Shelf Bay Type    Type        Name      Owner
4---------------- ---------- ----- --- ------- ----------- --------- --------
5NET-1.19             1020MB     -  27 FCAL    spare       Pool0     ontap97-sub-01
6NET-1.20             1020MB     -  28 FCAL    spare       Pool0     ontap97-sub-01
7NET-1.21             1020MB     -  29 FCAL    spare       Pool0     ontap97-sub-01
8NET-1.27             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
9NET-1.28             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
105 entries were displayed.
11 
12ontap97-sub::>

現在5本のスペアがあります。スペアが0本だと問題が発生します。

その場合はディスクを追加します。

シミュレータへのディスク追加

ONTAPシミュレータが認識しているディスクを追加することはできます。

追加はシミュレータ仮想マシンの仮想ディスクとして追加するのではなく、シミュレータOS内部でディスクファイルを作成する形で行います。

ちなみに、security loginコマンドでshellにログインできるような権限を付与してパスワードも設定する、的なことを書いている手順もありますが、それは必要が無い手法を使います。

まずは、diagモードに切り替えてコマンドを実行する必要があるので「set diag」を実行します。

1ontap97-sub::> set diag
2 
3Warning: These diagnostic commands are for use by NetApp personnel only.
4Do you want to continue? {y|n}: y
5 
6ontap97-sub::*>

現在使われているディスクタイプを確認するため、「systemshell local “ls -l /sim/dev/,disks”」を実行します。(disksの前に「,」が入っています)

(最近のONTAPではdiagアカウントがlockされていて実行できない。その場合はロックを解除する)

1ontap97-sub::*> systemshell local "ls -l /sim/dev/,disks"
2  (system node systemshell)
3total 1849640
4-rwxr-xr-x  1 root  wheel         912 Mar 10 16:07 ,reservations
5-rw-r--r--  1 root  wheel        1372 Mar 10 16:07 Shelf:DiskShelf14
6-rw-r--r--  1 root  wheel  1094312960 Mar 10 16:45 v0.16:NETAPP__:VD-1000MB-FZ-520:13511800:2104448
7-rw-r--r--  1 root  wheel  1094312960 Mar 10 16:45 v0.17:NETAPP__:VD-1000MB-FZ-520:13511901:2104448
8<略>
9-rw-r--r--  1 root  wheel  1094312960 Mar 10 16:23 v1.29:NETAPP__:VD-1000MB-FZ-520:15901912:2104448
10-rw-r--r--  1 root  wheel  1094312960 Mar 10 16:23 v1.32:NETAPP__:VD-1000MB-FZ-520:15901913:2104448
11 
12ontap97-sub::*>

上記の場合「NETAPP__:VD-1000MB-FZ-520」というディスクを使っています。

このディスクを追加するために該当するdisk type IDを「systemshell local “vsim_makedisks -h”」を実行して確認します。

1ontap97-sub::*> systemshell local "vsim_makedisks -h"
2  (system node systemshell)
3Usage: /usr/sbin/vsim_makedisks [ -n &lt;additional number of disks to create> ]
4          [ -t &lt;disk type ID> ]
5          [ -e &lt;additional sectors> ]
6          [ -a &lt;adapter on which to start populating disks ]
7          [ -h ]
8 
9By default 5 disks will be added. The &lt;disk type ID> can be one
10of the following: (NOTE, 0 is the default)
11                                                               Fast
12Type Vendor ID Product ID       Usable Size[B] Actual Size[B]  Zero  BPS   RPM
13  0  NETAPP__  VD-16MB_________     16,777,216     38,273,024   No   512  10000
14  1  NETAPP__  VD-35MB_________     35,913,728     57,409,536   No   512  10000
15  2  NETAPP__  VD-50MB_________     52,428,800     73,924,608   No   512  10000
16  3  NETAPP__  VD-100MB________    104,857,600    126,353,408   No   512  10000
17  4  NETAPP__  VD-500MB________    524,288,000    545,783,808   No   512  10000
18  5  NETAPP__  VD-1000MB_______  1,048,576,000  1,070,071,808   No   512  10000
19  6  NETAPP__  VD-16MB-FZ______     16,777,216     38,273,024   Yes  512  15000
20  7  NETAPP__  VD-35MB-FZ______     35,913,728     57,409,536   Yes  512  15000
21  8  NETAPP__  VD-50MB-FZ______     52,428,800     73,924,608   Yes  512  15000
22  9  NETAPP__  VD-100MB-FZ_____    104,857,600    126,353,408   Yes  512  15000
23 10  NETAPP__  VD-500MB-FZ_____    524,288,000    545,783,808   Yes  512  15000
24 11  NETAPP__  VD-1000MB-FZ____  1,048,576,000  1,070,071,808   Yes  512  15000
25 12  NETAPP__  VD-16MB-520_____     16,777,216     38,273,024   No   520  10000
26 13  NETAPP__  VD-35MB-520_____     35,913,728     57,409,536   No   520  10000
27 14  NETAPP__  VD-50MB-520_____     52,428,800     73,924,608   No   520  10000
28 15  NETAPP__  VD-100MB-520____    104,857,600    126,353,408   No   520  10000
29 16  NETAPP__  VD-500MB-520____    524,288,000    545,783,808   No   520  10000
30 17  NETAPP__  VD-1000MB-520___  1,048,576,000  1,070,071,808   No   520  10000
31 18  NETAPP__  VD-16MB-FZ-520__     16,777,216     38,273,024   Yes  520  15000
32 19  NETAPP__  VD-35MB-FZ-520__     35,913,728     57,409,536   Yes  520  15000
33 20  NETAPP__  VD-50MB-FZ-520__     52,428,800     73,924,608   Yes  520  15000
34 21  NETAPP__  VD-100MB-FZ-520_    104,857,600    126,353,408   Yes  520  15000
35 22  NETAPP__  VD-500MB-FZ-520_    524,288,000    545,783,808   Yes  520  15000
36 23  NETAPP__  VD-1000MB-FZ-520  1,048,576,000  1,070,071,808   Yes  520  15000
37 24  NETAPP__  VD-16MB-FZ-ATA__     16,777,216     51,388,416   Yes  512   7200
38 25  NETAPP__  VD-35MB-FZ-ATA__     36,700,160     73,801,728   Yes  512   7200
39 26  NETAPP__  VD-50MB-FZ-ATA__     52,428,800     91,496,448   Yes  512   7200
40 27  NETAPP__  VD-100MB-FZ-ATA_    104,857,600    150,478,848   Yes  512   7200
41 28  NETAPP__  VD-500MB-FZ-ATA_    524,288,000    622,338,048   Yes  512   7200
42 29  NETAPP__  VD-1000MB-FZ-ATA  1,048,576,000  1,212,162,048   Yes  512   7200
43 30  NETAPP__  VD-2000MB-FZ-520  2,097,512,000  2,119,007,808   Yes  520  15000
44 31  NETAPP__  VD-4000MB-FZ-520  4,194,304,000  4,215,799,808   Yes  520  15000
45 32  NETAPP__  VD-2000MB-FZ-ATA  2,097,512,000  2,391,810,048   Yes  512   7200
46 33  NETAPP__  VD-4000MB-FZ-ATA  4,194,304,000  4,751,106,048   Yes  512   7200
47 34  NETAPP__  VD-100MB-SS-512_    104,857,600    126,353,408   Yes  512  15000
48 35  NETAPP__  VD-500MB-SS-520_    524,288,000    545,783,808   Yes  520  15000
49 36  NETAPP__  VD-9000MB-FZ-520  9,437,184,000  9,458,679,808   Yes  520  15000
50 37  NETAPP__  VD-9000MB-FZ-ATA  9,437,184,000 10,649,346,048   Yes  512   7200
51 
52ontap97-sub::*>

上記結果より「23」でした。

ディスク追加は「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t タイプ -n 追加本数”」を実行して行います。

“sudo”コマンドを使用することでsecurity loginコマンドによる設定変更を省略しています。

今回、使用しているディスクはタイプ23であるため、これを10本追加するのであれは「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 23 -n 10″」を実行します。

1ontap97-sub::*> systemshell localhost "cd /sim/dev;sudo vsim_makedisks -t 23 -n 10"
2  (system node systemshell)
3Creating ,disks/v0.33:NETAPP__:VD-1000MB-FZ-520:66781814:2104448
4Creating ,disks/v0.34:NETAPP__:VD-1000MB-FZ-520:66781815:2104448
5Creating ,disks/v0.35:NETAPP__:VD-1000MB-FZ-520:66781816:2104448
6Creating ,disks/v0.36:NETAPP__:VD-1000MB-FZ-520:66781817:2104448
7Creating ,disks/v0.37:NETAPP__:VD-1000MB-FZ-520:66781818:2104448
8Creating ,disks/v0.38:NETAPP__:VD-1000MB-FZ-520:66781819:2104448
9Creating ,disks/v0.39:NETAPP__:VD-1000MB-FZ-520:66781820:2104448
10Creating ,disks/v0.40:NETAPP__:VD-1000MB-FZ-520:66781821:2104448
11Creating ,disks/v0.41:NETAPP__:VD-1000MB-FZ-520:66781822:2104448
12Creating ,disks/v0.42:NETAPP__:VD-1000MB-FZ-520:66781823:2104448
13Shelf file Shelf:DiskShelf14 updated
14 
15ontap97-sub::*>

ディスクを追加すると、まず未割り当てとして登録されます。

未割り当てディスクは「storage disk show -container-type unassigned」で確認します。

1ontap97-sub::*> storage disk show -container-type unassigned
2There are no entries matching your query.
3 
4ontap97-sub::*>

また「storage disk show -container-type spare」を実行してスペアディスクが増えていないことを確認します。

シミュレータ環境では追加したディスクがオンラインで認識されず、シミュレータの再起動が必要なようです。

再起動後、「storage disk show -container-type spare」を実行するとスペアディスクが増えていることがわかります。

1ontap97-sub::> storage disk show -container-type spare
2                     Usable           Disk    Container   Container
3Disk                   Size Shelf Bay Type    Type        Name      Owner
4---------------- ---------- ----- --- ------- ----------- --------- --------
5NET-1.19             1020MB     -  27 FCAL    spare       Pool0     ontap97-sub-01
6NET-1.20             1020MB     -  28 FCAL    spare       Pool0     ontap97-sub-01
7NET-1.21             1020MB     -  29 FCAL    spare       Pool0     ontap97-sub-01
8NET-1.27             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
9NET-1.28             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
10NET-1.29             1020MB     -  33 FCAL    spare       Pool0     ontap97-sub-01
11NET-1.30             1020MB     -  34 FCAL    spare       Pool0     ontap97-sub-01
12NET-1.31             1020MB     -  35 FCAL    spare       Pool0     ontap97-sub-01
13NET-1.32             1020MB     -  36 FCAL    spare       Pool0     ontap97-sub-01
14NET-1.33             1020MB     -  37 FCAL    spare       Pool0     ontap97-sub-01
15NET-1.34             1020MB     -  38 FCAL    spare       Pool0     ontap97-sub-01
16NET-1.35             1020MB     -  39 FCAL    spare       Pool0     ontap97-sub-01
17NET-1.36             1020MB     -  40 FCAL    spare       Pool0     ontap97-sub-01
18NET-1.37             1020MB     -  41 FCAL    spare       Pool0     ontap97-sub-01
19NET-1.38             1020MB     -  42 FCAL    spare       Pool0     ontap97-sub-01
2015 entries were displayed.
21 
22ontap97-sub::>

システムaggregateへのディスク追加

システムaggregateにディスクを追加します。

とりあえずディスクを3本追加します。
「storage aggregate add-disks -aggregate システムaggr名 -diskcount ディスク本数」

1ontap97-sub::> storage aggregate add-disks -aggregate aggr0_ontap97_sub_01 -diskcount 3
2 
3Warning: Aggregate "aggr0_ontap97_sub_01" is a root aggregate. Adding disks to
4         the root aggregate is not recommended. Once added, disks cannot be
5         removed without reinitializing the node.
6Do you want to continue? {y|n}: y
7 
8Info: Disks would be added to aggregate "aggr0_ontap97_sub_01" on node
9      "ontap97-sub-01" in the following manner:
10 
11      First Plex
12 
13        RAID Group rg0, 6 disks (block checksum, raid_dp)
14                                                            Usable Physical
15          Position   Disk                      Type           Size     Size
16          ---------- ------------------------- ---------- -------- --------
17          data       NET-1.19                  FCAL         1000MB   1.00GB
18          data       NET-1.27                  FCAL         1000MB   1.00GB
19          data       NET-1.20                  FCAL         1000MB   1.00GB
20 
21      Aggregate capacity available for volume use would be increased by 2.64GB.
22 
23Do you want to continue? {y|n}: y
24 
25ontap97-sub::>

aggregateの容量が増えたことを確認します

1ontap97-sub::> storage aggregate show
2 
3 
4Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
5--------- -------- --------- ----- ------- ------ ---------------- ------------
6aggr0_ontap97_sub_01 3.34GB 2.55GB 24% online   1 ontap97-sub-01   raid_dp,
7                                                                   normal
8aggr1      14.06GB   14.00GB    0% online       3 ontap97-sub-01   raid_dp,
9                                                                   normal
102 entries were displayed.
11 
12ontap97-sub::> df -A -h
13Aggregate                total       used      avail capacity
14aggr0_ontap97_sub_01    3420MB      812MB     2607MB      24%
15aggr0_ontap97_sub_01/.snapshot 180MB   0B      180MB       0%
16aggr1                     14GB       61MB       14GB       0%
17aggr1/.snapshot             0B         0B         0B       0%
184 entries were displayed.
19 
20ontap97-sub::>

システムボリュームの拡張

まずは現状のvol0のサイズを確認します

1ontap97-sub::> volume show
2Vserver   Volume       Aggregate    State      Type       Size  Available Used%
3--------- ------------ ------------ ---------- ---- ---------- ---------- -----
4ontap97-sub-01 vol0    aggr0_ontap97_sub_01 online RW  807.3MB    230.4MB   69%
51 entries were displayed.
6 
7ontap97-sub::> df -h
8Filesystem               total       used      avail capacity  Mounted on                 Vserver
9/vol/vol0/               766MB      536MB      230MB      69%  ---                        ontap97-sub-01
10/vol/vol0/.snapshot       40MB       32MB     7824KB      81%  ---                        ontap97-sub-01
112 entries were displayed.
12 
13ontap97-sub::>

「system node run -node ノード名 df -h」という手法でもボリューム容量を確認することができます。

1ontap97-sub::> system node run -node ontap97-sub-01 df -h
2Filesystem               total       used      avail capacity  Mounted on
3/vol/vol0/               766MB      544MB      222MB      71%  /vol/vol0/
4/vol/vol0/.snapshot       40MB       32MB     7768KB      81%  /vol/vol0/.snapshot
5 
6ontap97-sub::>

現状のvol0サイズを確認するため「system node run -node ノード名 vol size vol0」を実行します。

1ontap97-sub::> system node run -node ontap97-sub-01 vol size vol0
2vol size: Flexible volume 'vol0' has size 826656k.
3 
4ontap97-sub::>

vol0のサイズを2GBに設定します。

1ontap97-sub::> system node run -node ontap97-sub-01 vol size vol0 2g
2vol size: Flexible volume 'vol0' size set to 2g.
3 
4ontap97-sub::>

容量が変わったことを確認します。

1ontap97-sub::> volume show
2Vserver   Volume       Aggregate    State      Type       Size  Available Used%
3--------- ------------ ------------ ---------- ---- ---------- ---------- -----
4ontap97-sub-01 vol0    aggr0_ontap97_sub_01 online RW      2GB     1.38GB   27%
51 entries were displayed.
6 
7ontap97-sub::> df -h
8Filesystem               total       used      avail capacity  Mounted on                 Vserver
9/vol/vol0/              1945MB      536MB     1409MB      27%  ---                        ontap97-sub-01
10/vol/vol0/.snapshot      102MB       32MB       69MB      32%  ---                        ontap97-sub-01
112 entries were displayed.
12 
13ontap97-sub::> system node run -node ontap97-sub-01 df -h
14Filesystem               total       used      avail capacity  Mounted on
15/vol/vol0/              1945MB      543MB     1402MB      28%  /vol/vol0/
16/vol/vol0/.snapshot      102MB       32MB       69MB      32%  /vol/vol0/.snapshot
17ontap97-sub::>

これで、vol0に余裕ができました。

StatCounter - Free Web Tracker and Counter