NetApp ONTAPシミュレータのディスク構成を変更する

NetApp ONTAPシミュレータの初期構成は1024MB HDDが28本接続されている、という構成になっている。

使いにくいので、9GB HDD構成に変更して使用することにする。

ONTAPシミュレータのデータディスクのありか

vSphere上で vsim-netapp-DOT9.7-cm_nodar.ova をデプロイした場合、下記の様な構成になっている。

このとき、ハードディスク4の230GBの中にファイルとして1024MBディスクのイメージファイルが作成されている。

もし、200GB以上のデータを書き込みたい場合は、初回起動前にハードディスク4の容量を増やす必要がある。初回起動時はUFSファイルシステムを作成してくれるので対応できるのだが、シミュレータ内にはファイルシステム拡張用のコマンドが用意されていないので初回起動時以外に拡張しようとすると、FreeBSD 12のDVDで起動してgrowfsコマンドで拡張する、といった操作が必要になる。

ハードディスク4のサイズを「1TB」に変更した場合はこんな感じです。(ついでにCPUとメモリを増量している)

ディスク削除

ONTAPシミュレータ仮想マシンの電源を入れ、下記の「Press Ctrl-C for Boot Menu」が出たらCtrlキーとCキーを同時押しする。

しばらく待つと下記の様なメニューが表示されるので「4」のClean Configuration and initialize all disks」を選択する。

初期化確認は「yes」で答える。

しばらく待つと再起動して、下記の様な初期セットアップが始まる。

これはyesと入力しないで、Ctrl+Cで強制中断すると下記の様にログインプロンプトが現れるので「admin」ユーザでログインする。(パスワードは聞かれない)

「set diag」を実行すると「systemshellコマンド」が利用できるようになる。これはONTAP OS上でUNIXコマンドを実行できるようになるものです。(“system node systemshell”が正式コマンド名なのですが、ONTAP 9.7ではsystemshellでも実行できます)

「systemshell localhost “df -h /sim/dev”」と実行すると、UNIXで「df -h /sim/dev」を実行する、というような動作になります。

なお、日本語配列キーボードを使う場合、「”」は「Shift+8」で入力します。

::> set diag

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

::*> system node systemshell local "df -h /sim/dev"
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/ad3      223G     11G    194G     5%    /sim
::*>

上記のdfコマンドの実行がlockされているとしてエラーになる場合があります。これはONTAP設定が2023年に変わったことによる影響です。その場合はロックを解除します。

ONTAPシミュレータ上で認識するディスクのイメージファイルは「/sim/dev/,disks」というディレクトリにあります(「,」は誤字ではない)

現状あるファイルを確認するには「systemshell localhost “ls -l /sim/dev/,disks”」と実行します。

(画像はないです)

::*> systemshell local "ls -l /sim/dev/,disks"
total 11024296
-rwxr-xr-x  1 root  wheel         912 Sep  2 13:56 ,reservations
-rw-r--r--  1 root  wheel        1372 Sep  2 13:56 Shelf:DiskShelf14
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.16:NETAPP__:VD-1000MB-FZ-520:14001600:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.17:NETAPP__:VD-1000MB-FZ-520:14001601:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.18:NETAPP__:VD-1000MB-FZ-520:14001602:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.19:NETAPP__:VD-1000MB-FZ-520:14001603:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.20:NETAPP__:VD-1000MB-FZ-520:14001604:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v0.21:NETAPP__:VD-1000MB-FZ-520:14001605:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:10 v0.22:NETAPP__:VD-1000MB-FZ-520:14001606:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.24:NETAPP__:VD-1000MB-FZ-520:14001607:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.25:NETAPP__:VD-1000MB-FZ-520:14001608:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.26:NETAPP__:VD-1000MB-FZ-520:14001709:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.27:NETAPP__:VD-1000MB-FZ-520:14001710:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.28:NETAPP__:VD-1000MB-FZ-520:14001711:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.29:NETAPP__:VD-1000MB-FZ-520:14001712:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v0.32:NETAPP__:VD-1000MB-FZ-520:14001713:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.16:NETAPP__:VD-1000MB-FZ-520:16391700:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.17:NETAPP__:VD-1000MB-FZ-520:16391701:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.18:NETAPP__:VD-1000MB-FZ-520:16391702:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:27 v1.19:NETAPP__:VD-1000MB-FZ-520:16391703:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.20:NETAPP__:VD-1000MB-FZ-520:16391704:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.21:NETAPP__:VD-1000MB-FZ-520:16391705:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.22:NETAPP__:VD-1000MB-FZ-520:16391706:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.24:NETAPP__:VD-1000MB-FZ-520:16391707:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.25:NETAPP__:VD-1000MB-FZ-520:16391708:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.26:NETAPP__:VD-1000MB-FZ-520:16391709:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.27:NETAPP__:VD-1000MB-FZ-520:16391710:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 13:05 v1.28:NETAPP__:VD-1000MB-FZ-520:16391711:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 11:50 v1.29:NETAPP__:VD-1000MB-FZ-520:16391712:2104448
-rw-r--r--  1 root  wheel  1094312960 Sep 24 11:50 v1.32:NETAPP__:VD-1000MB-FZ-520:16391713:2104448
::*>

いまある仮想ディスクを削除する場合は「systemshell localhost “sudo rm /sim/dev/,disks/*”」と実行します。

削除した後の、ディスク再作成はvsim_makedisksというコマンドで実行します。

いろいろオプションがあるのでまずは「systemshell local “vsim_makedisks -h”」と実行して確認します。

::*> systemshell local "vsim_makedisks -h"
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

::*>

いろんなディスクタイプが選択できますが、BPSが520になっているものを優先して選びます。

その中で一番容量が大きいのは36番なので、「-t 36」というオプションを使います。

今回は60本を増設してみます(なお、あとで分かりますが、56本までしか認識してくれませんでした)

アダプタ0配下に20本追加するコマンド「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 0″」を実行します。

アダプタ1配下に20本追加するコマンド「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 1″」を実行します。

アダプタ2配下に20本追加するコマンド「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 2″」を実行します。

作成したら「halt local」で停止をして、再起動します。

これで起動すればOKです。

Windowsで簡易的にWebサーバをたてるソフト HFS

むかしはネットワーク機器のfirmware versionアップにtftpやftpなどを使うことが多かった。

最近はhttp経由という例が増えている。

Windows標準のIISだと大がかりすぎるのでもっと簡単にできるものを探して「簡単WEBサーバー」というものを試したのだが、これはGETしか実装していないという中途半端なものだった。

GETしか実装されていないと何が問題になるかと言うと、ファイルダウンロード前にHEADでファイルサイズを確認し、保存できる領域があるかを確認する、という動作をする機器の場合、HEADが実装されていないため容量確認ができず、ダウンロードが実施できない、ということになる。

で、探したところ「HFS ~ Http File Server」というものを発見。

これは2MBのバイナリでインストール不要というもの。

hfs.exeを実行すると下記の様にウィンドウが立ち上がり、Webサーバとして動作しだす。

ファイルの登録は簡単で、登録したいファイルの右クリックメニューから「Add to HFS」を選択するだけ、となっている。

追加すると下記の様に/直下に配置される。ファイルを選択するとダウンロードに使用するURLが表示されるという点も便利

ダウンロードが開始されるとLogウインドウにどういうリクエストがあったのかが表示される。

起動したWindowsに複数のIPアドレスがある場合、どのIPアドレスで公開するかは選択できる。

ポート番号は80以外にも設定することはできる(httpsは未対応)

サービスとして動作させることはできないが、Windows起動時にHFSを実行する、という設定もある

ONTAP 9でCIFS/NFS共有へのアクセス確認

NetApp ONTAP9でCIFS/NFS共有を作った時に、指定ディレクトリに対してアクセスできるかどうかをNetApp側で確認する手法

export policy上でクライアントIPからのアクセスを許可しているか確認

export policy上で、該当IPアドレスからのアクセスを受け付ける設定になっているかを確認

「vserver export-policy check-access」を使用する。

CIFSアクセスの確認

ontap-select-cluster::> vserver export-policy check-access -vserver svm0 -volume testvol -qtree ntfs-test1 -client-ip  172.17.44.50 -authentication-method ntlm -protocol cifs -access-type read-write
                                         Policy    Policy       Rule
Path                          Policy     Owner     Owner Type  Index Access
----------------------------- ---------- --------- ---------- ------ ----------
/                             default    svm0_root volume          1 read
/testvol                      testvol    testvol   volume          8 read
/testvol/ntfs-test1           testvol    ntfs-test1
                                                   qtree           8 read-write
3 entries were displayed.

ontap-select-cluster::>

上記の場合、/testvol/ntfs-test1 ディレクトリに対する読み書きが許可されている、ということになる。

NFSアクセスの確認

ontap-select-cluster::> vserver export-policy check-access -vserver svm0 -volume testvol -qtree ntfs-test1 -client-ip  172.17.44.50 -authentication-method sys -protocol nfs4 -access-type read-write
                                         Policy    Policy       Rule
Path                          Policy     Owner     Owner Type  Index Access
----------------------------- ---------- --------- ---------- ------ ----------
/                             default    svm0_root volume          1 read
/testvol                      testvol    testvol   volume          8 read
/testvol/ntfs-test1           testvol    ntfs-test1
                                                   qtree           8 read-write
3 entries were displayed.

ontap-select-cluster::>

上記の場合、/testvol/ntfs-test1 ディレクトリに対する読み書きが許可されている、ということになる。

該当ディレクトリ/ファイルの権限確認

NetApp上のパスを指定して、そこに与えられている権限がどのようになっているかを確認する。

「vserver security file-directory show」コマンドを使う。

NTFS/mixedの場合

ontap-select-cluster::> vserver security file-directory show -vserver svm0 -path /testvol/ntfs-test1

                Vserver: svm0
              File Path: /testvol/ntfs-test1
      File Inode Number: 966
         Security Style: mixed
        Effective Style: ntfs
         DOS Attributes: 10
 DOS Attributes in Text: ----D---
Expanded Dos Attributes: -
           UNIX User Id: 0
          UNIX Group Id: 0
         UNIX Mode Bits: 777
 UNIX Mode Bits in Text: rwxrwxrwx
                   ACLs: NTFS Security Descriptor
                         Control:0x8004
                         Owner:BUILTIN\Administrators
                         Group:BUILTIN\Administrators
                         DACL - ACEs
                           ALLOW-Everyone-0x1f01ff
                           ALLOW-Everyone-0x10000000-OI|CI|IO

ontap-select-cluster::>

Windowsからアクセスした際、該当ファイルの所有者がAdministratorsになっていて、Everyoneに対するアクセスが許可されている、というのが分かる

NFSの場合

ontap-select-cluster::> vserver security file-directory show -vserver svm0 -path /testvol/test

                Vserver: svm0
              File Path: /testvol/test
      File Inode Number: 96
         Security Style: unix
        Effective Style: unix
         DOS Attributes: 10
 DOS Attributes in Text: ----D---
Expanded Dos Attributes: -
           UNIX User Id: 0
          UNIX Group Id: 0
         UNIX Mode Bits: 777
 UNIX Mode Bits in Text: rwxrwxrwx
                   ACLs: -

ontap-select-cluster::>

UNIXからNFSでアクセスした際に、777権限なので誰でも読み書き可能であることがわかる。

ユーザ名の変換について

UNIX上のユーザ名とWindows上のユーザ名の変換状況を確認しつつ、該当ディレクトリ/ファイルにアクセスできるかを確認するには「vserver security file-directory show-effective-permissions」を使用する。

NTFS/mixedの場合

/testvol/ntfs-test1 にUNIXからrootユーザでアクセスできるか、WindowsからAdministratorユーザでアクセスできるかをそれぞれ確認するには、下記の様に実行する。

unixのrootユーザを指定していても「Windows User Name」としてADOSAKANAドメインのAdministrator相当である、と認識されているし、逆にAdministratorを指定していてもUNIX rootユーザ相当であると認識されている。

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/ntfs-test1 -unix-user-name root

              Vserver: svm0
    Windows User Name: ADOSAKANA\Administrator
       Unix User Name: root
            File Path: /testvol/ntfs-test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x1f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/ntfs-test1 -win-user-name administrator

              Vserver: svm0
    Windows User Name: administrator
       Unix User Name: root
            File Path: /testvol/ntfs-test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x1f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize

ontap-select-cluster::>

NFSの場合

このユーザ名変換の確認の動作は、Secutiry Styleがntfs/mixedかNFSは差が無いようだ。

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/test1 -unix-user-name root

              Vserver: svm0
    Windows User Name: ADOSAKANA\Administrator
       Unix User Name: root
            File Path: /testvol/test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x11f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize
                        System Security

ontap-select-cluster::> vserver security file-directory show-effective-permissions -vserver svm0 -path /testvol/test1 -win-user-name ADOSAKANA\administrator

              Vserver: svm0
    Windows User Name: ADOSAKANA\administrator
       Unix User Name: root
            File Path: /testvol/test1
      CIFS Share Path: -
Effective Permissions:
                       Effective File or Directory Permission: 0x11f01ff
                        Read
                        Write
                        Append
                        Read EA
                        Write EA
                        Execute
                        Delete Child
                        Read Attributes
                        Write Attributes
                        Delete
                        Read Control
                        Write DAC
                        Write Owner
                        Synchronize
                        System Security

ontap-select-cluster::>

ONTAP 9.7シミュレータをアップデートする手法

いままでONTAP シミュレータってアップデートできないものだ、と思っていたのですが、ぐぐってみたらアップデートできる、という手法を発見。実践してみた。

2022/10/07追記: ONTAP 9.7→9.8P12→9.10.1P6 といったアップデートも条件によっては可能でした→詳細(ONTAPシミュレータを9.7から9.10.1にアップデートしようとしたらIllegal instructionとwaiting until daemon ktlsd starts upで失敗した)

2023/11/21追加: ONTAP9.5→9.7→9.8→9.11.1 アップデートも仮想マシンHWバージョンをあげて実行することで成功しました。

ネタ元「NetApp ONTAP 9.7 Simulator Upgrade How To

ポイント

・アップデートにあたりvol0に約6GBの容量が必要
・ONTAP シミュレータ標準のroot aggregate構成では6GBを確保できないので、ディスク追加必須
・アップデートは 97P6_q_image.tgz などの通常のNetApp FAS用ファイルがそのまま使える

なお、ONTAPシミュレータの初期構築時からアップデートを考慮するのであれば、初回の電源ON後、設定を行わずにONTAPシミュレータのディスクを1GB HDD構成から9GB HDD構成に変更する操作を行った方が良い→「NetApp ONTAPシミュレータのディスク構成を変更する

また、一度設定したONTAPシミュレータでスペアがない場合は「ONTAP 9.7シミュレータのシステムボリュームを拡張する」の手順を実行することでディスクを追加することができる。

手順

なお、CLIで実施していますが、これは失敗した場合の調査のやりやすさを優先しているためなので、Web UIからアップデートしても大丈夫です。

(2023/05/16追記)また、ここに書かれている手順より、clusterコマンドを使った方が本来は適切であるようです。

その1 アップデートファイルの入手

NetAppサイトよりONTAPのアップデートファイルを入手。

2020/09/03時点だと 97P6_q_image.tgz が最新。

その2 httpサーバの設置

NetAppからアクセスできる場所に httpサーバを立てて、アップデートファイルをダウンロードできるようにする。

Windows上でhttpサーバを建てる場合、「簡単WEBサーバー」というものを使用したところHTTP HEADを実装していないようでファイル容量の検出ができず、正常に動作しませんでした。

ネタ元のサイトでは「HFS ~ Http File Server」というものを使用していました。

わたしは最初はLinux上のApacheを使用しましたが、HFSを試してみたところ非常に簡単に使えました。詳細→「Windowsで簡易的にWebサーバをたてるソフト HFS

その3ONTAPシミュレータへのログイン

ログインします。

その4 root aggregateへのディスク追加

現状のaggregate構成の確認するため「storage aggregate show」を実行

nas01c::> storage aggregate show
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_nas01c_01
             855MB   42.13MB   95% online       1 nas01c-01        raid_dp,
                                                                   normal
nas01c::>

得られたaggregate名を使って「storage disk show -aggregate aggr0_nas01c_01」を実行し、ディスク構成を確認。

nas01c::> storage disk show -aggregate aggr0_nas01c_01
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.15             1020MB     -  16 FCAL    aggregate   aggr0_nas01c_01
NET-1.16             1020MB     -  17 FCAL    aggregate   aggr0_nas01c_01
NET-1.17             1020MB     -  18 FCAL    aggregate   aggr0_nas01c_01
3 entries were displayed.
nas01c::>

現状はディスク3本で855MBであることがわかる。

追加するディスクは現状スペアディスク認識となっているものを使用するため、現状のスペアディスクを「storage disk show -container-type spare」で確認する。

nas01c::> storage disk show -container-type spare
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.18             1020MB     -  19 FCAL    spare       Pool0     nas01c-01
NET-1.19             1020MB     -  20 FCAL    spare       Pool0     nas01c-01
NET-1.20             1020MB     -  21 FCAL    spare       Pool0     nas01c-01
NET-1.21             1020MB     -  22 FCAL    spare       Pool0     nas01c-01
NET-1.22             1020MB     -  24 FCAL    spare       Pool0     nas01c-01
NET-1.23             1020MB     -  25 FCAL    spare       Pool0     nas01c-01
NET-1.24             1020MB     -  26 FCAL    spare       Pool0     nas01c-01
NET-1.25             1020MB     -  27 FCAL    spare       Pool0     nas01c-01
NET-1.26             1020MB     -  28 FCAL    spare       Pool0     nas01c-01
NET-1.27             1020MB     -  29 FCAL    spare       Pool0     nas01c-01
NET-1.28             1020MB     -  32 FCAL    spare       Pool0     nas01c-01
11 entries were displayed.
nas01c::>

ディスクを7本追加するため「storage aggregate add-disks -aggregate aggr0_nas01c_01 -diskcount 7」と実行します。

nas01c::> storage aggregate add-disks -aggregate aggr0_nas01c_01 -diskcount 7
Warning: Aggregate "aggr0_nas01c_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_nas01c_01" on node "nas01c-01" in the following manner:
      First Plex
        RAID Group rg0, 9 disks (block checksum, raid_dp)
                                                            Usable Physical
          Position   Disk                      Type           Size     Size
          ---------- ------------------------- ---------- -------- --------
          data       NET-1.18                  FCAL         1000MB   1.00GB
          data       NET-1.19                  FCAL         1000MB   1.00GB
          data       NET-1.20                  FCAL         1000MB   1.00GB
          data       NET-1.21                  FCAL         1000MB   1.00GB
          data       NET-1.22                  FCAL         1000MB   1.00GB
          data       NET-1.23                  FCAL         1000MB   1.00GB
          data       NET-1.24                  FCAL         1000MB   1.00GB
      Aggregate capacity available for volume use would be increased by 5.27GB.
Do you want to continue? {y|n}: y
nas01c::>

ディスクを7本追加し、10本構成としたところ、root aggregateのサイズは6.68GBとなりました。

nas01c::> storage aggregate show
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_nas01c_01
            6.68GB    5.88GB   12% online       1 nas01c-01        raid_dp,
                                                                   normal
nas01c::> storage disk show -aggregate aggr0_nas01c_01
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.15             1020MB     -  16 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.16             1020MB     -  17 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.17             1020MB     -  18 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.18             1020MB     -  19 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.19             1020MB     -  20 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.20             1020MB     -  21 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.21             1020MB     -  22 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.22             1020MB     -  24 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.23             1020MB     -  25 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
NET-1.24             1020MB     -  26 FCAL    aggregate   aggr0_nas01c_01
                                                                    nas01c-01
10 entries were displayed.
nas01c::>

その5 vol0のディスク容量増加

アップデートに関する作業はvol0ボリュームを使用するため、vol0のサイズを6Gにします。

2022/04/15追記:ONTAP9.7→9.7P12で試したところアップデータのtgzは2.5GBあり、その時下記の結果となりました。
 ・vol0 3GB:アップデートファイルのダウンロードに失敗
 ・vol0 4GB:Verifying package signature で失敗
 ・vol0 5GB:とりあえず成功するも、途中の空き容量がギリギリ

2022/08/19追記:ONTAP 9.9.1→9.9.1P10の場合6GBでも失敗したため、とりあえず10GBで実施しました。

現状を確認するため「volume show」を実行します

nas01c::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
nas01c-01 vol0         aggr0_nas01c_01
                                    online     RW      807.3MB    426.8MB   44%
nas01c::>

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

nas01c::> volume size -vserver nas01c-01 -volume vol0
vol size: Volume "nas01c-01:vol0" has size 807.3m.
nas01c::>

vol0のサイズを6gにするため「volume size -vserver ノード名 -volume vol0 -new-size 6g」を実行します。

nas01c::> volume size -vserver nas01c-01 -volume vol0 -new-size 6g
vol size: Volume "nas01c-01:vol0" size set to 6g.
nas01c::>

容量が増加したことを「volume size -vserver ノード名 -volume vol0」と「volume show」を実行して確認します。

nas01c::> volume size -vserver nas01c-01 -volume vol0
vol size: Volume "nas01c-01:vol0" has size 6g.
nas01c::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
nas01c-01 vol0         aggr0_nas01c_01
                                    online     RW          6GB     5.36GB    5%
nas01c::>

2023/06/05追記: clusterコマンドを使う手順は、最後尾の「cluster imageコマンドを使った手順」に飛ぶ

その6 advanceモードへの切り替え

アップデート関連のコマンドはadvanceモードもしくはdiagモードでの実行となるため、切り替えます。

nas01c::> set adv
Warning: These advanced commands are potentially dangerous; use them only when
         directed to do so by NetApp personnel.
Do you want to continue? {y|n}: y
nas01c::*>

その7 現状確認

「system image show」と「system image package show」を実行して、現在のシステムイメージの状態を確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  true    true    9.7                       -
nas01c-02
         image1  true    true    9.7                       -
2 entries were displayed.
nas01c::*> system image package show
nas01c::*>

現状、両ノードとも9.7が標準で起動する設定(Is Default:true)で、現状の起動も9.7(Is Currect:true)であることがわかります。

また「version -node *」を実行してOSバージョンを確認します。

nas01c::*> version -node *
nas01c-01  :
NetApp Release 9.7: Thu Jan 09 11:10:19 UTC 2020
nas01c-02  :
NetApp Release 9.7: Thu Jan 09 11:10:19 UTC 2020
2 entries were displayed.
nas01c::*>

その8 アップデートをimage2へ書き込む

「system image update -node ノード名 -package http://HTTPサーバ/97P6_q_image.tgz -replace image2」という形で、image2に対してダウンロードしたファイルを書き込みます。

nas01c::*> system image update -node nas01c-01 -package http://172.17.44.103/97P6_q_image.tgz -replace image2
Software update started on node nas01c-02. Updating image2 with package http://.../97P6_q_image.tgz.
Downloading package. This may take up to 20 minutes.
99% downloaded
Download complete.
Listing package contents.
Decompressing package contents.
Verifying package signature.
Invoking script (install phase). This may take up to 60 minutes.
Mode of operation is UPDATE
Current image is image1
Alternate image is image2
Versions are compatible
Available space on boot device is 1452 MB
Required  space on boot device is 740 MB
Kernel binary matches install machine type
external keymanager check script has run successfully.
Getting ready to install image
Directory /cfcard/x86_64/freebsd/image2 created
Syncing device...
Extracting to /cfcard/x86_64/freebsd/image2...
x netboot/VERSION
x netboot/COMPAT.TXT
x netboot/BUILD
x netboot/kernel.sig
x netboot/key_fingerprint.csfc.sig
x netboot/key_fingerprint.sig
x netboot/platform.ko.sig
x netboot/platfs.img.sig
x netboot/rootfs.img.sig
x netboot/kernel.csfc.sig
x netboot/platform.ko.csfc.sig
x netboot/platfs.img.csfc.sig
x netboot/rootfs.img.csfc.sig
x netboot/CHECKSUM
x netboot/metadata.xml
x netboot/nvdimm.ko
x netboot/pvscsi.ko
x netboot/INSTALL
x netboot/if_vmx.ko
x netboot/bsdboot.tgz
x netboot/cap.xml
x netboot/mpt.ko
x netboot/platform.ko
x netboot/platfs.img
x netboot/kernel
x netboot/fw.tgz
x netboot/pmroot_late.tgz
x netboot/rootfs.img
Installed MD5 checksums pass
Installing diagnostic and firmware files
Firmware MD5 checksums pass
Updating FreeBSD boot partition
Successfully updated FreeBSD boot partition
Installation complete. image2 updated on node nas01c-01.
nas01c::*>

正常に書き込まれたかは「system image show」と「system image package show」を実行して確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
3 entries were displayed.
nas01c::*> system image package show
             Package
Node         Repository     Package File Name
------------ -------------- -----------------
nas01c-01
             mroot
                            97P6_q_image.tgz
1 entries were displayed.
nas01c::*>

問題がないようであれば、もう片方のノードにもアップロードします。

nas01c::*> system image update -node nas01c-02 -package http://172.17.44.103/97P6_q_image.tgz -replace image2
Software update started on node nas01c-02. Updating image2 with package http://.../97P6_q_image.tgz.
Downloading package. This may take up to 20 minutes.
99% downloaded
Download complete.
Listing package contents.
Decompressing package contents.
Verifying package signature.
Invoking script (install phase). This may take up to 60 minutes.
Mode of operation is UPDATE
Current image is image1
Alternate image is image2
Versions are compatible
Available space on boot device is 1452 MB
Required  space on boot device is 740 MB
Kernel binary matches install machine type
external keymanager check script has run successfully.
Getting ready to install image
Directory /cfcard/x86_64/freebsd/image2 created
Syncing device...
Extracting to /cfcard/x86_64/freebsd/image2...
x netboot/VERSION
x netboot/COMPAT.TXT
x netboot/BUILD
x netboot/kernel.sig
x netboot/key_fingerprint.csfc.sig
x netboot/key_fingerprint.sig
x netboot/platform.ko.sig
x netboot/platfs.img.sig
x netboot/rootfs.img.sig
x netboot/kernel.csfc.sig
x netboot/platform.ko.csfc.sig
x netboot/platfs.img.csfc.sig
x netboot/rootfs.img.csfc.sig
x netboot/CHECKSUM
x netboot/metadata.xml
x netboot/nvdimm.ko
x netboot/pvscsi.ko
x netboot/INSTALL
x netboot/if_vmx.ko
x netboot/bsdboot.tgz
x netboot/cap.xml
x netboot/mpt.ko
x netboot/platform.ko
x netboot/platfs.img
x netboot/kernel
x netboot/fw.tgz
x netboot/pmroot_late.tgz
x netboot/rootfs.img
Installed MD5 checksums pass
Installing diagnostic and firmware files
Firmware MD5 checksums pass
Updating FreeBSD boot partition
Successfully updated FreeBSD boot partition
Installation complete. image2 updated on node nas01c-02.
nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 16:37:32
4 entries were displayed.
nas01c::*> system image package show
             Package
Node         Repository     Package File Name
------------ -------------- -----------------
nas01c-01
             mroot
                            97P6_q_image.tgz
nas01c-02
             mroot
                            97P6_q_image.tgz
2 entries were displayed.
nas01c::*>

その9 image2からの再起動

現在はimage1から起動する設定となっているので、それをimage2から起動するように変更します。

「system image modify -node ノード名 -image image2 -isdefault true」と実行します。

nas01c::*> system image modify -node nas01c-01 -image image2 -isdefault true
After a clean shutdown, image2 will be set as the default boot image on node
nas01c-01.
nas01c::*> 

Is Default設定が変更されているかを「system image show」で確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  false   true    9.7                       -
         image2  true    false   9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 16:37:32
4 entries were displayed.
nas01c::*>

変更したノードを「reboot -node ノード名」で再起動します。

nas01c::*> reboot -node nas01c-01
  (system node reboot)
Warning: This operation will cause node "nas01c-01" to be marked as unhealthy. Unhealthy nodes do not participate in quorum voting. If the node
         goes out of service and one more node goes out of service there will be a data serving failure for the entire cluster. This will cause a
         client disruption. Use "cluster show" to verify cluster state. If possible bring other nodes online to improve the resiliency of this
         cluster.
Do you want to continue? {y|n}: y
nas01c::*>

再起動中、下記の様な形で「Running the upgrade system」という表示があったりします。

再起動が完了したら、「system image show」でIs DefaultとIs Currectが変更されていることを確認します。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  false   false   9.7                       -
         image2  true    true    9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  true    true    9.7                       -
         image2  false   false   9.7P6                     9/2/2020 16:37:32
4 entries were displayed.
nas01c::*>

また「version -node *」を実行してOSバージョンが変更されていることを確認します。

nas01c::*> version -node *
nas01c-01  :
NetApp Release 9.7P6: Tue Jul 28 04:06:27 UTC 2020
nas01c-02  :
NetApp Release 9.7: Thu Jan 09 11:10:19 UTC 2020
2 entries were displayed.
nas01c::*>

その10 もう片側も同様に再起動

もう片側のノードにも同じ事を実行します。

途中は省略。

「system image show」を実行して、Is Default, Is Currectが両方とも変更されたことを確認。

nas01c::*> system image show
                 Is      Is                                Install
Node     Image   Default Current Version                   Date
-------- ------- ------- ------- ------------------------- -------------------
nas01c-01
         image1  false   false   9.7                       -
         image2  true    true    9.7P6                     9/2/2020 14:51:02
nas01c-02
         image1  false   false   9.7                       -
         image2  true    true    9.7P6                     9/2/2020 16:37:32
4 entries were displayed.
nas01c::*>

「version -node *」を実行して、両ノードのOSバージョンが変更されたことを確認。

nas01c::*> version -node *
nas01c-01  :
NetApp Release 9.7P6: Tue Jul 28 04:06:27 UTC 2020
nas01c-02  :
NetApp Release 9.7P6: Tue Jul 28 04:06:27 UTC 2020
2 entries were displayed.
nas01c::*>


トラブル事例

いきなり下記の様なメッセージが出力されて動かなくなりました。

nas01c::*>
The management gateway server restarted. Waiting to see if the connection can be reestablished.
The connection with the management gateway server has been reestablished.
If the root cause of the interruption was a process core, you can see the core file details by issuing the following command:
        system node coredump show -node local -type application -corename mgwd.* -instance
***********************
**  SYSTEM MESSAGES  **
***********************
CRITICAL: This node is not healthy because the root volume is low on space
(<10MB). The node can still serve data, but it cannot participate in cluster
operations until this situation is rectified. Free space using the nodeshell or
contact technical support for assistance.
nas01c::>

メッセージにある「system node coredump show」を実行してもなにもないなー

nas01c::> system node coredump show
This table is currently empty.
nas01c::>  system node coredump show -node local -type application -corename mgwd.* -instance
There are no entries matching your query.
nas01c::>

じゃぁ、ディスク容量はどうだ?

nas01c::> system node run -node nas01c-02 df
Filesystem              kbytes       used      avail capacity  Mounted on
/vol/vol0/             5976884    5974408       2476     100%  /vol/vol0/
/vol/vol0/.snapshot     314572    3254436          0     1035%  /vol/vol0/.snapshot
nas01c::>

snapshotが領域を超え、通常ボリュームに進出して使用量が100%となっていました。

snapshotを削除します。

現状のsnapshotを確認

nas01c::> system node run -node nas01c-02 snap list
Volume vol0
working...
  %/used       %/total  date          name
----------  ----------  ------------  --------
 50% (50%)   48% (48%)  Sep 02 16:02  hourly.0
 52% ( 6%)   52% ( 3%)  Sep 02 15:45  hourly.1
nas01c::>

snapshotを削除

nas01c::> system node run -node nas01c-02 snap delete vol0 hourly.0
nas01c::> system node run -node nas01c-02 snap delete vol0 hourly.1
nas01c::> 

ディスク容量が空きました。

nas01c::> system node run -node nas01c-02 df
Filesystem              kbytes       used      avail capacity  Mounted on
/vol/vol0/             5976884    3029024    2947860      51%  /vol/vol0/
/vol/vol0/.snapshot     314572          0     314572       0%  /vol/vol0/.snapshot
nas01c::>

上記は「system node run -node ノード名 snap ~」で実行していますがONTAP OSの起動状況によっては「snap show ~」「snap delete ~」が使える場合もあります。

(dfコマンドを実行してちゃんとボリュームが表示される場合は使えるでしょう)

その場合、snap deleteコマンドの際にアスタリスクが使用できるので、全削除が簡単です。

下記はその実行例

nas01c::*> snap show
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
nas01c-01
         vol0
                  hourly.5                                1.37MB     0%    0%
                  hourly.4                               374.7MB     6%   10%
                  hourly.3                               316.9MB     5%    9%
                  hourly.2                               192.8MB     3%    5%
                  hourly.1                               245.9MB     4%    7%
                  hourly.0                               181.7MB     3%    5%
                  nightly.1                              276.1MB     4%    8%
                  nightly.0                              185.5MB     3%    5%
nas01c-02
         vol0
                  hourly.2                               107.8MB     2%    3%
                  hourly.1                               286.0MB     5%    8%
                  nightly.0                              252.2MB     4%    7%
                  hourly.0                               228.9MB     4%    6%
svm0     svm0_root
                  daily.2020-09-03_0010                    336KB     2%   39%
                  hourly.2020-09-03_0405                   128KB     1%   19%
                  hourly.2020-09-03_0505                   128KB     1%   19%
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
svm0     svm0_root
                  hourly.2020-09-03_0605                   364KB     2%   40%
                  hourly.2020-09-03_0854                   128KB     1%   19%
                  hourly.2020-09-03_0905                   128KB     1%   19%
                  hourly.2020-09-03_1005                   120KB     1%   18%
         testvol
                  daily.2020-09-03_0010                    152KB     0%    8%
                  hourly.2020-09-03_0505                   144KB     0%    8%
                  hourly.2020-09-03_0605                   152KB     0%    8%
                  hourly.2020-09-03_0705                   152KB     0%    8%
                  hourly.2020-09-03_0805                   164KB     0%    9%
                  hourly.2020-09-03_0905                   152KB     0%    8%
                  hourly.2020-09-03_1005                   144KB     0%    8%
26 entries were displayed.
nas01c::*> snap delete -vserver
    nas01c-01 nas01c-02 svm0
nas01c::*> snap delete -vserver nas01c-01 -volume vol0 -snapshot
    hourly.5  hourly.4  hourly.3  hourly.2  hourly.1  hourly.0  nightly.1
    nightly.0
nas01c::*> snap delete -vserver nas01c-01 -volume vol0 -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 "hourly.5" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "hourly.4" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "hourly.3" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "hourly.2" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "hourly.1" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "hourly.0" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "nightly.1" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
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 "nightly.0" for volume "vol0" in Vserver "nas01c-01" ?
          {y|n}: y
8 entries were acted on.
nas01c::*> snap delete -vserver nas01c-02 -volume vol0 -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 "hourly.2" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y
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 "hourly.1" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y
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 "nightly.0" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y
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 "hourly.0" for volume "vol0" in Vserver "nas01c-02" ?
          {y|n}: y
4 entries were acted on.
nas01c::*> snap show
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
svm0     svm0_root
                  daily.2020-09-03_0010                    336KB     2%   39%
                  hourly.2020-09-03_0405                   128KB     1%   19%
                  hourly.2020-09-03_0505                   128KB     1%   19%
                  hourly.2020-09-03_0605                   364KB     2%   40%
                  hourly.2020-09-03_0854                   128KB     1%   19%
                  hourly.2020-09-03_0905                   128KB     1%   19%
                  hourly.2020-09-03_1005                   120KB     1%   18%
         testvol
                  daily.2020-09-03_0010                    152KB     0%    8%
                  hourly.2020-09-03_0505                   144KB     0%    8%
                  hourly.2020-09-03_0605                   152KB     0%    8%
                  hourly.2020-09-03_0705                   152KB     0%    8%
                  hourly.2020-09-03_0805                   164KB     0%    9%
                  hourly.2020-09-03_0905                   152KB     0%    8%
                  hourly.2020-09-03_1005                   144KB     0%    8%
14 entries were displayed.
nas01c::*>

トラブル事例2

アップデートを実行したところ「Failed to verify the signatures of the image.」で失敗した。

ontap97-sub::*> system image update -package http://~/patch/97P18_q_image.tgz
Warning: The recommended best-practice is to use the automated update procedure
         if you are attempting an upgrade or a minor version downgrade. Refer
         to the Clustered Data ONTAP Upgrade and Revert/Downgrade Guide for
         details.
Do you want to continue? {y|n}: y
Software update started on node ontap97-sub-01. Updating image2 with package http://.../97P18_q_image.tgz.
Downloading package. This may take up to 20 minutes.
100% downloaded
Download complete.
Listing package contents.
Decompressing package contents.
Verifying package signature.
Install Failed.
Failed to verify the signatures of the image. The image may have been corrupted.
Replace the image, and then try the command again.
Error: command failed: Install Failed. Failed to verify the signatures of the
       image. The image may have been corrupted. Replace the image, and then
       try the command again.
ontap97-sub::*>

最初、ダウンロードしたファイルが壊れていたのかなどを確認していたが、結局はvol0の空き容量問題で失敗していただけだった。

最終的にvol0を5GBとすることで成功した。

vol0 3GBの際

vol0 3GBの時は、アップデータのダウンロードで失敗していた。

ontap97-sub::*> system image update -package http://~/patch/97P14_q_image.tgz
Warning: The recommended best-practice is to use the automated update procedure
         if you are attempting an upgrade or a minor version downgrade. Refer
         to the Clustered Data ONTAP Upgrade and Revert/Downgrade Guide for
         details.
Do you want to continue? {y|n}: y
Software update started on node ontap97-sub-01. Updating image2 with package http://.../97P14_q_image.tgz.
Downloading package. This may take up to 20 minutes.
Install Failed.
Cannot update or install image because the system management storage area is
almost out of space. To make space available, delete old Snapshot copies. For
further assistance, contact technical support.
Error: command failed: Install Failed. Cannot update or install image because
       the system management storage area is almost out of space. To make space
       available, delete old Snapshot copies. For further assistance, contact
       technical support.
ontap97-sub::*>

このときのvol0の空き容量を「df -h /vol/vol0」で確認したところ、97P14_q_image.tgz (2465KB)をおけるだけのスペースがありませんでした。

また、verifyではgzip圧縮を展開するようで、より空き容量が必要とされていました。

ひとまず、vol0 5GBで成功しましたが、やはり余裕をみて6GBあった方がいいと思います。


あえて地雷踏み事例

ONTAP 8.3.2シミュレータ環境をONTAP 8.3.2P12にアップデートした後

ONTAP 9.1P19アップデートファイルを適用してみたらどうなるかを実験。

上記を出力したあと、再起動を繰り替えるというリブートループに突入しました。


地雷試験2

ONTAPシミュレータのONTAP 9.9.1を普通のONTAP用のアップデータを使ってONTAP 9.10.1P6にアップデートする実験を行った

Webからアップデートを行う際は「system image show-update-progress」と「cluster image show-update-progress」で実行状況を確認することができる。

vol0の容量を10GBぐらいにしている場合、ONTAP9.10.1P6へのアップデートは成功した。途中のディスク使用量みた感じだと8GBぐらいでも成功しそうな感じだった。

ただ、アップデート後、Web GUIが英語表記のみとなり日本語表記に設定できなくなっている。

あと、「Automatic Update」という設定が追加されており、ONTAP OSの自働バージョンアップっぽいものができるようになった模様


cluster imageコマンドを使った手順

その1 現状利用できるパッケージがあるか確認

「cluster image package show-repository」を実行してイメージファイルがあるか確認

netapp9101dr::> cluster image package show-repository
There are no packages in the repository.
netapp9101dr::>

その2 イメージファイルのアップロード

「cluster image package get -url http://~/9101P12_q_image.tgz」といった形でファイルをONTAP内に取り込む

(ブラウザからは直接ファイルをアップロードできるが、コマンドの場合はWebサーバを経由するなどして送りこむ必要がある。

netapp9101dr::> cluster image package get -url http://~/9101P12_q_image.tgz
Package download completed.
Package processing completed.
netapp9101dr::>

その3 イメージファイルの確認

「cluster image package show-repository」を実行して確認

netapp9101dr::> cluster image package show-repository
Package Version  Package Build Time
---------------- ------------------
9.10.1P12        4/13/2023 09:30:59
netapp9101dr::>

Web側でみると下記の様になっている

その4 現状のイメージを確認

netapp9101dr::> cluster image show
Node                 Current Version         Installation Date
-------------------- ----------------------- -------------------
netapp9101dr-01      9.10.1                  -
netapp9101dr::>

その5 アップデートが実行できるかチェック

まず「cluster image validate -version バージョン」を実行して検証します。

netapp9101dr::> cluster image validate -version 9.10.1P12
It can take several minutes to complete validation...
WARNING: There are additional manual upgrade validation checks that must be performed after these automated validation checks have completed successfully.
Refer to the Upgrade Advisor Plan or the "What should I verify before I upgrade with or without Upgrade Advisor" section in the "Upgrade ONTAP" documentation for the remaining manual validation checks that need to be performed before update.
Upgrade ONTAP documentation available at: https://docs.netapp.com/us-en/ontap/upgrade/index.html
The list of checks are available at: https://docs.netapp.com/us-en/ontap/upgrade/task_what_to_check_before_upgrade.html
Failing to do so can result in an update failure or an I/O disruption.
Please use Interoperability Matrix Tool (IMT  http://mysupport.netapp.com/matrix) to verify host system supportability configuration information.
Validation checks started successfully.  Run the "cluster image show-update-progress" command to check validation status.
netapp9101dr::>

これは検証の開始された、という状態で、しばらく経ってから「cluster image show-update-progress」を実行し、検証が終わったことを確認します。

netapp9101dr::> cluster image show-update-progress
                                             Estimated         Elapsed
Update Phase         Status                   Duration        Duration
-------------------- ----------------- --------------- ---------------
Pre-update checks    completed                00:10:00        00:00:30
Details:
Pre-update Check     Status            Error-Action
-------------------- ----------------- --------------------------------------
Manual checks        Warning           Warning: Manual validation checks
                                       need to be performed. Refer to the
                                       Upgrade Advisor Plan or the "What
                                       should I verify before I upgrade with
                                       or without Upgrade Advisor" section
                                       in the "Upgrade ONTAP" documentation
                                       for the remaining validation checks
                                       that need to be performed before
                                       update. Failing to do so can result
                                       in an update failure or an I/O
                                       disruption.
                                       Action: Refer to the Upgrade Advisor
                                       Plan or the "What should I verify
                                       before I upgrade with or without
                                       Upgrade Advisor" section in the
                                       "Upgrade ONTAP" documentation for the
                                       remaining validation checks that need
                                       to be performed before update.
                                             Estimated         Elapsed
Update Phase         Status                   Duration        Duration
-------------------- ----------------- --------------- ---------------
Pre-update checks    completed                00:10:00        00:00:30
Details:
Pre-update Check     Status            Error-Action
-------------------- ----------------- --------------------------------------
NFS mounts           Warning           Warning: This cluster is serving NFS
                                       clients. If NFS soft mounts are used,
                                       there is a possibility of frequent
                                       NFS timeouts and race conditions that
                                       can lead to data corruption during
                                       the upgrade.
                                       Action: Use NFS hard mounts, if
                                       possible. To list Vservers running
                                       NFS, run the following command:
                                       vserver nfs show
2 entries were displayed.
netapp9101dr::>

Web側では下記の様になっています

その6 警告無視してアップデート

「Manual checks」と「NFS mounts」については無視しても実用上たいした問題ではないので、そのままアップデートを強行するため「cluster image update -version バージョン」を実行します。

netapp9101dr::> cluster image update -version 9.10.1P12
Starting validation for this update...

上記でしばらくとまったあと

netapp9101dr::> cluster image update -version 9.10.1P12
Starting validation for this update...
It can take several minutes to complete validation...
WARNING: There are additional manual upgrade validation checks that must be performed after these automated validation checks have completed successfully.
Refer to the Upgrade Advisor Plan or the "What should I verify before I upgrade with or without Upgrade Advisor" section in the "Upgrade ONTAP" documentation for the remaining manual validation checks that need to be performed before update.
Upgrade ONTAP documentation available at: https://docs.netapp.com/us-en/ontap/upgrade/index.html
The list of checks are available at: https://docs.netapp.com/us-en/ontap/upgrade/task_what_to_check_before_upgrade.html
Failing to do so can result in an update failure or an I/O disruption.
Please use Interoperability Matrix Tool (IMT  http://mysupport.netapp.com/matrix) to verify host system supportability configuration information.
Pre-update Check      Status     Error-Action
--------------------- ---------- --------------------------------------------
Manual checks         Warning    Warning: Manual validation checks need to
                                 be performed. Refer to the Upgrade Advisor
                                 Plan or the "What should I verify before I
                                 upgrade with or without Upgrade Advisor"
                                 section in the "Upgrade ONTAP"
                                 documentation for the remaining validation
                                 checks that need to be performed before
                                 update. Failing to do so can result in an
                                 update failure or an I/O disruption.
                                 Action: Refer to the Upgrade Advisor Plan
                                 or the "What should I verify before I
                                 upgrade with or without Upgrade Advisor"
                                 section in the "Upgrade ONTAP"
                                 documentation for the remaining validation
                                 checks that need to be performed before
                                 update.
NFS mounts            Warning    Warning: This cluster is serving NFS
                                 clients. If NFS soft mounts are used, there
                                 is a possibility of frequent NFS timeouts
                                 and race conditions that can lead to data
                                 corruption during the upgrade.
                                 Action: Use NFS hard mounts, if possible.
                                 To list Vservers running NFS, run the
                                 following command: vserver nfs show
Overall Status        Warning
3 entries were displayed.
Warning: Validation has reported warnings.
Warning: This is a single node cluster and the update will be disruptive.
Do you want to continue? {y|n}:

「y」を入力してアップデートを実施します。

Do you want to continue? {y|n}: y
Starting update...
Info: Run the "cluster image show-update-progress" command to check update status.
netapp9101dr::>

アップデートの進捗状況は「cluster image show-update-progress」を実行して確認します。

netapp9101dr::> cluster image show-update-progress
                                             Estimated         Elapsed
Update Phase         Status                   Duration        Duration
-------------------- ----------------- --------------- ---------------
Pre-update checks    completed                00:10:00        00:00:30
ONTAP updates        in-progress              00:45:00        00:00:04
Details:
Node name            Status            Status Description
-------------------- ----------------- --------------------------------------
netapp9101dr-01      in-progress       Installing ONTAP software image.
3 entries were displayed.
netapp9101dr::>

Web側はこの状況です

その7 終了確認

「cluster image show-update-progress」「version *」「cluster image show」を実行し、アップデートが実行できたかを確認

netapp9101dr::> cluster image show-update-progress
                                             Estimated         Elapsed
Update Phase         Status                   Duration        Duration
-------------------- ----------------- --------------- ---------------
Pre-update checks    completed                00:10:00        00:00:30
ONTAP updates        completed                00:45:00        00:12:10
Post-update checks   completed                00:10:00        00:00:04
3 entries were displayed.
Updated nodes: netapp9101dr-01.
netapp9101dr::> version *
netapp9101dr-01:
NetApp Release 9.10.1P12: Thu Apr 13 00:30:59 UTC 2023
netapp9101dr::> cluster image show
Node                 Current Version         Installation Date
-------------------- ----------------------- -------------------
netapp9101dr-01      9.10.1P12               6/5/2023 19:07:38
netapp9101dr::>

Web側の表示

アップデート履歴を確認する場合は「cluster image show-update-history」を実行

netapp9101dr::> cluster image show-update-history
           Package   Start      Completion              Previous  Updated
Status     Version   Time       Time       Component ID Version   Version
---------- --------- ---------- ---------- ------------ --------- ---------
successful 9.10.1P12 6/5/2023   6/5/2023   netapp9101dr 9.10.1    9.10.1P12
                     19:01:05   19:13:15   -01
netapp9101dr::> cluster image show-update-history  -ins
    Component ID: netapp9101dr-01
      Start Time: 6/5/2023 19:01:05
 Package Version: 9.10.1P12
          Status: successful
 Completion Time: 6/5/2023 19:13:15
Previous Version: 9.10.1
 Updated Version: 9.10.1P12
netapp9101dr::>

なお、アップデートに使用したファイルはvol0領域を2GB~3GB使用するため削除しましょう

netapp9101dr::> cluster image package show
Package Version  Package Build Time
---------------- ------------------
9.10.1P12        4/13/2023 09:30:59
netapp9101dr::> cluster image package
    delete          get             show-repository
netapp9101dr::> cluster image package delete -version 9.10.1P12
Package Delete Operation Completed Successfully
netapp9101dr::> cluster image package show
There are no packages in the repository.
netapp9101dr::>

NetApp ONTAP simulator 9.7がROOT VOLUME NOT WORKING PROPERLY: RECOVERY REQUIREDで起動する

NetApp ONTAP simulator 9.7をESXi上で動かしていたのだが、瞬電で死んだ。

再起動してみると、起動はするのだが「ROOT VOLUME NOT WORKING PROPERLY: RECOVERY REQUIRED」というメッセージでサービスが動作しない状態となっていた。

調べるとNetAppフォーラムに「Root volume is damaged」というのを発見。

ここでは、BOOTLOADERの環境変数で「bootarg.init.boot_recovery」が設定されているから、それを削除すれば大丈夫、とある。

しかし、確認してみると、そんな環境変数は設定されていない。

うーん、と同じ記事の次のページを開いてみると環境変数「bootarg.rdb_corrupt」を削除、という話が出てきた。

この環境変数ならあった。

「unsetenv bootarg.rdb_corrupt」を実行して、再起動することで正常に動作するようになった。

なお、bootarg.rdb_corruptがそもそも設定されていないけどおかしい場合は、vol0がsnapshotで埋まってしまっている場合が考えられる。

その際の対処方法については「ONTAP 9.7シミュレータをアップデートする手法」の「トラブル事例」に記載してある。

また、これらの対処を行って再起動してもまた「ROOT VOLUME NOT WORKING PROPERLY: RECOVERY REQUIRED」となる場合がある。
この場合はおそらくvol0領域が小さいためなので、vol0を拡張した上で、ONTAP再起動をかけ、BOOT> で止めて「unsetenv bootarg.rdb_corrupt」を実行して再起動することで対応できます。

モバイルバージョンを終了