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


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

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


sendln 'rows 0'
wait '::> '
sendln 'date'
wait '::> '


;基本設定系
;システム構成
sendln 'vserver show'
wait '::> '

sendln 'vserver show -ins'
wait '::> '
sendln 'system node show'
wait '::> '
sendln 'system node show -ins'
wait '::> '
sendln 'options'
wait '::> '
sendln 'system license show'
wait '::> '
sendln 'system license show -ins'
wait '::> '
sendln 'system snmp show'
wait '::> '
sendln 'system node autosupport show'
wait '::> '
sendln 'system node autosupport show -ins'
wait '::> '
sendln 'system node autosupport history show'
wait '::> '
sendln 'cluster time-service ntp server show'
wait '::> '
sendln 'timezone'
wait '::> '
sendln 'system service-processor show'
wait '::> '
sendln 'system service-processor network show'
wait '::> '

;ネットワーク関連	
sendln 'network interface show'
wait '::> '
sendln 'network interface show -ins'
wait '::> '
sendln 'network interface show -failover'
wait '::> '
sendln 'network interface failover-groups show'
wait '::> '

sendln 'network port show'
wait '::> '
sendln 'network port show -ins'
wait '::> '
sendln 'network port ifgrp show'
wait '::> '
sendln 'network port ifgrp show -ins'
wait '::> '

sendln 'network ipspace show'
wait '::> '
sendln 'network port broadcast-domain show'
wait '::> '



sendln 'vserver services name-service ns-switch show'
wait '::> '
sendln 'vserver services name-service dns hosts show'
wait '::> '
sendln 'vserver services name-service dns hosts show -ins'
wait '::> '
sendln 'security login show'
wait '::> '
sendln 'security login show -ins'
wait '::> '

;名前解決関連	
sendln 'vserver services name-service dns show'
wait '::> '
sendln 'vserver services name-service nis-domain show'
wait '::> '

;ディスク構成	
sendln 'storage disk show'
wait '::> '
sendln 'storage disk show -ins'
wait '::> '
sendln 'storage disk show -partition-ownership'
wait '::> '

sendln 'df'
wait '::> '
sendln 'df -h'
wait '::> '
sendln 'df -A -h'
wait '::> '
sendln 'df -i'
wait '::> '

sendln 'storage aggregate show'
wait '::> '
sendln 'storage aggregate show -ins'
wait '::> '
sendln 'storage aggregate show-spare-disks'
wait '::> '

sendln 'volume show'
wait '::> '
sendln 'volume show -ins'
wait '::> '
sendln 'volume language'
wait '::> '
sendln 'volume show -fields junction-path,snapshot-policy,policy'
wait '::> '

sendln 'volume efficiency show'
wait '::> '
sendln 'volume efficiency policy show'
wait '::> '


;ファイル共有(NFS/CIFS)	
sendln 'vserver cifs show'
wait '::> '
sendln 'vserver cifs show -ins'
wait '::> '
sendln 'vserver cifs share show'
wait '::> '
sendln 'vserver cifs share show -ins'
wait '::> '
sendln 'vserver cifs share access-control show'
wait '::> '
sendln 'vserver cifs share access-control show -ins'
wait '::> '
sendln 'vserver nfs show'
wait '::> '
sendln 'vserver nfs show -ins'
wait '::> '
sendln 'vserver export-policy show'
wait '::> '
sendln 'vserver export-policy show -ins'
wait '::> '
sendln 'vserver export-policy rule show'
wait '::> '
sendln 'vserver export-policy rule show -ins'
wait '::> '
sendln 'volume qtree show'
wait '::> '
sendln 'volume qtree show -ins'
wait '::> '
sendln 'volume quota show'
wait '::> '
sendln 'volume quota show -ins'
wait '::> '
sendln 'volume quota policy show'
wait '::> '
sendln 'volume quota policy show -ins'
wait '::> '
sendln 'volume quota policy rule show'
wait '::> '
sendln 'volume quota policy rule show -ins'
wait '::> '
sendln 'volume quota report'
wait '::> '

;Snapshot運用	
sendln 'volume snapshot show'
wait '::> '
sendln 'volume snapshot policy show'
wait '::> '
sendln 'volume snapshot autodelete show'
wait '::> '
sendln 'volume show -fields snapshot-policy,policy'
wait '::> '
sendln 'volume show -fields percent-snapshot-space'
wait '::> '
sendln 'volume show -fields sched-snap-name'
wait '::> '

;Snapmirror	
sendln 'snapmirror show'
wait '::> '
sendln 'snapmirror show -ins'
wait '::> '
sendln 'snapmirror show-history'
wait '::> '
sendln 'snapmirror show-history -ins'
wait '::> '

;ストレージ間通信	
sendln 'storage shelf show'
wait '::> '
sendln 'storage shelf acp show'
wait '::> '

;クラスタ設定	
sendln 'cluster show'
wait '::> '
sendln 'cluster show -ins'
wait '::> '
sendln 'cluster peer show'
wait '::> '

sendln 'vserver peer show'
wait '::> '
sendln 'vserver peer show -ins'
wait '::> '

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


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

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

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

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

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

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

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

ontap98::> vserver audit show
This table is currently empty.

ontap98::> vserver audit create -vserver share225 -destination /testvol/audit

ontap98::>

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

ontap98::> vserver audit show
Vserver     State  Event Types        Log Format Target Directory
----------- ------ ------------------ ---------- ----------------------------
share225    false  file-ops,          evtx       /testvol/audit
                   cifs-logon-logoff,
                   audit-policy-
                   change

ontap98::> vserver audit show -ins

                           Vserver: share225
                    Auditing State: false
              Log Destination Path: /testvol/audit
     Categories of Events to Audit: file-ops, cifs-logon-logoff,
                                    audit-policy-change
                        Log Format: evtx
               Log File Size Limit: 100MB
      Log Rotation Schedule: Month: -
Log Rotation Schedule: Day of Week: -
        Log Rotation Schedule: Day: -
       Log Rotation Schedule: Hour: -
     Log Rotation Schedule: Minute: -
                Rotation Schedules: -
          Log Files Rotation Limit: 0
            Log Retention Duration: 0s

ontap98::>

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

CIFSの場合

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

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

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

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

これで設定は完了です。

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

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

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

ontap98::> 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

ontap98::> vserver audit show -ins

                           Vserver: share225
                    Auditing State: true
              Log Destination Path: /testvol/audit
     Categories of Events to Audit: file-ops
                        Log Format: evtx
               Log File Size Limit: 1MB
      Log Rotation Schedule: Month: January-December
Log Rotation Schedule: Day of Week: Sunday-Saturday
        Log Rotation Schedule: Day: -
       Log Rotation Schedule: Hour: 2
     Log Rotation Schedule: Minute: 0
                Rotation Schedules: @2:00
          Log Files Rotation Limit: 3
            Log Retention Duration: 0s

ontap98::>

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

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

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

NFSv4の場合

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

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

[root@linux mnt]# nfs4_getfacl test3/

# file: test3/
A::OWNER@:rwaDxtTnNcCy
A:g:GROUP@:rxtncy
A::EVERYONE@:rxtncy
[root@linux mnt]#

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

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

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

[root@linux mnt]# nfs4_setfacl -R -a U:fdS:EVERYONE@:Cd test3
[root@linux mnt]# nfs4_getfacl test3/

# file: test3/
A::OWNER@:rwaDxtTnNcCy
A:g:GROUP@:rxtncy
A::EVERYONE@:rxtncy
U:fdS:EVERYONE@:dC
[root@linux mnt]#

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

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

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

ソース "NetApp-Security-Auditing" からのイベント ID 4658 の説明が見つかりません。このイベントを発生させるコンポーネントがローカル コンピューターにインストールされていないか、インストールが壊れています。ローカル コンピューターにコンポーネントをインストールするか、コンポーネントを修復してください。

イベントが別のコンピューターから発生している場合、イベントと共に表示情報を保存する必要があります。

イベントには次の情報が含まれています: 

172.17.44.87
EV_RenderedValue_2.00
false
Not Present
Not Present
Security
File
00000000000406;00;0000064f;046d016e
(nfsshare);/test3/test2.txt

メッセージ リソースは存在しますが、メッセージがメッセージ テーブルに見つかりませんでした。
The 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.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

172.17.44.87
EV_RenderedValue_2.00
false
Not Present
Not Present
Security
File
00000000000406;00;0000064f;046d016e
(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で構成している)

ontap832::> vserver cifs create -cifs-server share226 -domain adosakana.local -vserver share226

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
ADOSAKANA.LOCAL domain.

Enter the user name: administrator

Enter the password:

Error: Machine account creation procedure failed
  [ 12154] Loaded the preliminary configuration.
  [ 12332] Created a machine account in the domain
  [ 12339] Successfully connected to 172.17.44.49:445 using TCP
  [ 12351] Unable to connect to LSA service on
           samba.adosakana.local (Error:
           RESULT_ERROR_GENERAL_FAILURE)
  [ 14357] TCP connection to 172.17.44.141:445 via interface
           172.17.44.236 failed: (Operation timed out).
  [ 14357] Could not open a socket to 'samba.adosakana.local'
  [ 14357] Unable to connect to LSA service on
           samba.adosakana.local (Error:
           RESULT_ERROR_SPINCLIENT_UNABLE_TO_RESOLVE_SERVER)
  [ 14357] No servers available for MS_LSA, vserver: 2, domain:
           adosakana.local.
**[ 14357] FAILURE: Unable to make a connection (LSA:adosakana.local),
**         result: 6940
  [ 14357] Could not find Windows SID
           'S-1-5-21-937304154-1581684492-536532533-512'
  [ 14381] Deleted existing account
           'CN=SHARE226,CN=Computers,DC=adosakana,DC=local'

Error: command failed: Failed to create the Active Directory machine account
       "SHARE226". Reason: SecD Error: no server available.

ontap832::>

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

ontap832::> vserver cifs security show -vserver share226

Vserver: share226

                    Kerberos Clock Skew:                   - minutes
                    Kerberos Ticket Age:                   - hours
                   Kerberos Renewal Age:                   - days
                   Kerberos KDC Timeout:                   - seconds
                    Is Signing Required:                   -
        Is Password Complexity Required:                   -
   Use start_tls For AD LDAP connection:               false
              Is AES Encryption Enabled:               false
                 LM Compatibility Level:  lm-ntlm-ntlmv2-krb
             Is SMB Encryption Required:                   -

ontap832::>

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

ontap832::> version -node *

ontap832-01:
NetApp Release 8.3.2: Tue Feb 23 23:35:06 UTC 2016


ontap832::>

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

ontap832::> version -node *

ontap832-01:
NetApp Release 8.3.2P12: Mon Aug 14 02:57:01 UTC 2017


ontap832::>

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

ontap832::> vserver cifs security show -vserver share226

Vserver: share226

                    Kerberos Clock Skew:                   - minutes
                    Kerberos Ticket Age:                   - hours
                   Kerberos Renewal Age:                   - days
                   Kerberos KDC Timeout:                   - seconds
                    Is Signing Required:                   -
        Is Password Complexity Required:                   -
   Use start_tls For AD LDAP connection:               false
              Is AES Encryption Enabled:               false
                 LM Compatibility Level:  lm-ntlm-ntlmv2-krb
             Is SMB Encryption Required:                   -
        SMB1 Enabled for DC Connections:                   -
        SMB2 Enabled for DC Connections:                   -

ontap832::>

設定を変更

ontap832::> vserver cifs security modify -vserver share226 -smb1-enabled-for-dc-connections false -smb2-enabled-for-dc-connections true

ontap832::> vserver cifs security show -vserver share226

Vserver: share226

                    Kerberos Clock Skew:                   - minutes
                    Kerberos Ticket Age:                   - hours
                   Kerberos Renewal Age:                   - days
                   Kerberos KDC Timeout:                   - seconds
                    Is Signing Required:                   -
        Is Password Complexity Required:                   -
   Use start_tls For AD LDAP connection:               false
              Is AES Encryption Enabled:               false
                 LM Compatibility Level:  lm-ntlm-ntlmv2-krb
             Is SMB Encryption Required:                   -
        SMB1 Enabled for DC Connections:               false
        SMB2 Enabled for DC Connections:                true

ontap832::>

そして、Active Directoryへの参加

ontap832::> vserver cifs create -cifs-server share226 -domain adosakana.local -vserver share226

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
ADOSAKANA.LOCAL domain.

Enter the user name: administrator

Enter the password:

Warning: An account by this name already exists in Active Directory at
         CN=SHARE226,CN=Computers,DC=adosakana,DC=local
         Ok to reuse this account? {y|n}: y

ontap832::>

今度は成功した。

富士通の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シミュレータのシステムボリュームを拡張する


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

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

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

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

状況の確認

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

ontap97-sub::> storage aggregate show


Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_ontap97_sub_01 855MB 41.41MB 95% online   1 ontap97-sub-01   raid_dp,
                                                                   normal
aggr1      14.06GB   14.00GB    0% online       3 ontap97-sub-01   raid_dp,
                                                                   normal
2 entries were displayed.

ontap97-sub::> df -A -h
Aggregate                total       used      avail capacity
aggr0_ontap97_sub_01     855MB      812MB       42MB      95%
aggr0_ontap97_sub_01/.snapshot 45MB    0B       45MB       0%
aggr1                     14GB       61MB       14GB       0%
aggr1/.snapshot             0B         0B         0B       0%
4 entries were displayed.

ontap97-sub::>

空きディスクの確認

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

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

ontap97-sub::> storage disk show -container-type spare
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.19             1020MB     -  27 FCAL    spare       Pool0     ontap97-sub-01
NET-1.20             1020MB     -  28 FCAL    spare       Pool0     ontap97-sub-01
NET-1.21             1020MB     -  29 FCAL    spare       Pool0     ontap97-sub-01
NET-1.27             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
NET-1.28             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
5 entries were displayed.

ontap97-sub::>

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

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

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

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

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

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

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

ontap97-sub::> set diag

Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

ontap97-sub::*>

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

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

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

ontap97-sub::*>

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

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

ontap97-sub::*> systemshell local "vsim_makedisks -h"
  (system node systemshell)
Usage: /usr/sbin/vsim_makedisks [ -n <additional number of disks to create> ]
          [ -t <disk type ID> ]
          [ -e <additional sectors> ]
          [ -a <adapter on which to start populating disks ]
          [ -h ]

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

ontap97-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″」を実行します。

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

ontap97-sub::*>

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

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

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

ontap97-sub::*>

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

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

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

ontap97-sub::> storage disk show -container-type spare
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.19             1020MB     -  27 FCAL    spare       Pool0     ontap97-sub-01
NET-1.20             1020MB     -  28 FCAL    spare       Pool0     ontap97-sub-01
NET-1.21             1020MB     -  29 FCAL    spare       Pool0     ontap97-sub-01
NET-1.27             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
NET-1.28             1020MB     -  32 FCAL    spare       Pool0     ontap97-sub-01
NET-1.29             1020MB     -  33 FCAL    spare       Pool0     ontap97-sub-01
NET-1.30             1020MB     -  34 FCAL    spare       Pool0     ontap97-sub-01
NET-1.31             1020MB     -  35 FCAL    spare       Pool0     ontap97-sub-01
NET-1.32             1020MB     -  36 FCAL    spare       Pool0     ontap97-sub-01
NET-1.33             1020MB     -  37 FCAL    spare       Pool0     ontap97-sub-01
NET-1.34             1020MB     -  38 FCAL    spare       Pool0     ontap97-sub-01
NET-1.35             1020MB     -  39 FCAL    spare       Pool0     ontap97-sub-01
NET-1.36             1020MB     -  40 FCAL    spare       Pool0     ontap97-sub-01
NET-1.37             1020MB     -  41 FCAL    spare       Pool0     ontap97-sub-01
NET-1.38             1020MB     -  42 FCAL    spare       Pool0     ontap97-sub-01
15 entries were displayed.

ontap97-sub::>

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

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

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

ontap97-sub::> storage aggregate add-disks -aggregate aggr0_ontap97_sub_01 -diskcount 3

Warning: Aggregate "aggr0_ontap97_sub_01" is a root aggregate. Adding disks to
         the root aggregate is not recommended. Once added, disks cannot be
         removed without reinitializing the node.
Do you want to continue? {y|n}: y

Info: Disks would be added to aggregate "aggr0_ontap97_sub_01" on node
      "ontap97-sub-01" in the following manner:

      First Plex

        RAID Group rg0, 6 disks (block checksum, raid_dp)
                                                            Usable Physical
          Position   Disk                      Type           Size     Size
          ---------- ------------------------- ---------- -------- --------
          data       NET-1.19                  FCAL         1000MB   1.00GB
          data       NET-1.27                  FCAL         1000MB   1.00GB
          data       NET-1.20                  FCAL         1000MB   1.00GB

      Aggregate capacity available for volume use would be increased by 2.64GB.

Do you want to continue? {y|n}: y

ontap97-sub::>

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

ontap97-sub::> storage aggregate show


Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_ontap97_sub_01 3.34GB 2.55GB 24% online   1 ontap97-sub-01   raid_dp,
                                                                   normal
aggr1      14.06GB   14.00GB    0% online       3 ontap97-sub-01   raid_dp,
                                                                   normal
2 entries were displayed.

ontap97-sub::> df -A -h
Aggregate                total       used      avail capacity
aggr0_ontap97_sub_01    3420MB      812MB     2607MB      24%
aggr0_ontap97_sub_01/.snapshot 180MB   0B      180MB       0%
aggr1                     14GB       61MB       14GB       0%
aggr1/.snapshot             0B         0B         0B       0%
4 entries were displayed.

ontap97-sub::>

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

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

ontap97-sub::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
ontap97-sub-01 vol0    aggr0_ontap97_sub_01 online RW  807.3MB    230.4MB   69%
1 entries were displayed.

ontap97-sub::> df -h
Filesystem               total       used      avail capacity  Mounted on                 Vserver
/vol/vol0/               766MB      536MB      230MB      69%  ---                        ontap97-sub-01
/vol/vol0/.snapshot       40MB       32MB     7824KB      81%  ---                        ontap97-sub-01
2 entries were displayed.

ontap97-sub::>

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

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

ontap97-sub::>

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

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

ontap97-sub::>

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

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

ontap97-sub::>

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

ontap97-sub::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
ontap97-sub-01 vol0    aggr0_ontap97_sub_01 online RW      2GB     1.38GB   27%
1 entries were displayed.

ontap97-sub::> df -h
Filesystem               total       used      avail capacity  Mounted on                 Vserver
/vol/vol0/              1945MB      536MB     1409MB      27%  ---                        ontap97-sub-01
/vol/vol0/.snapshot      102MB       32MB       69MB      32%  ---                        ontap97-sub-01
2 entries were displayed.

ontap97-sub::> system node run -node ontap97-sub-01 df -h
Filesystem               total       used      avail capacity  Mounted on
/vol/vol0/              1945MB      543MB     1402MB      28%  /vol/vol0/
/vol/vol0/.snapshot      102MB       32MB       69MB      32%  /vol/vol0/.snapshot
ontap97-sub::>

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