Windows Serverによるファイルサーバー移行のメモ


Windows Serverを移行する時に現状の設定を確認する必要がある。

その際に確認しといた方が良さそうな項目についてのメモ

1) ネットワーク設定

Active Directoryに参加するだろうからある程度はなんとかなるだろうけど・・・

DNSサーバの順序あたりは確認しておいた方がいい

「ipconfig /all」
「netsh interface ipv4 show config」

NICチーミング設定がされてるかどうか、されている場合は「チーミングモード」「負荷分散モード」と「スタンバイアダプターの設定有無」を確認

2) Windowsファイアウォール設定

これもActive Directory側から操作されてるかもしれないけど確認

「受信の規則」にある追加されたっぽい設定を確認

コマンドの場合

「netsh advfirewall show allprofiles」でプロファイル確認
「netsh advfirewall show currentprofile」で現在有効になってるプロファイル確認
「netsh advfirewall firewall show rule name=all」で設定出力

3) 共有設定

コンピュータの管理を起動して共有確認
 「コンピュータの管理」の[システムツール]-[共有フォルダー]-[共有]の内容を確認
 各共有のプロパティを開き、「共有のアクセス許可」と「セキュリティ」を確認

「net share」で共有一覧を表示
「net share 共有名」で各共有の詳細を確認
「Get-SmbShare」で共有一覧表示
「Get-SmbShare|Get-SmbShareAccess」で各共有のアクセス権限表示
「Get-SmbShare|Format-List」共有一覧の詳細出力
「Get-SmbShare|Get-SmbShareAccess|Format-List」アクセス権限表示の詳細出力

共有をコマンドで設定する場合

net share "share"="D:\share"  /GRANT:"BUILTIN\Administrators,FULL" /GRANT:"Everyone,FULL"

4) クォータ設定

クォータ設定は2種類あるので注意が必要

ファイルサーバーリソースマネージャを起動して「クォータ」の内容を確認
 対象ディレクトリと適用されている”クォータテンプレート”の内容
  制限値, ハード/ソフト, 通知設定

「dirquota template list」でテンプレート一覧を表示
「dirquota template list /list-n」でテンプレートを通知設定込みで表示
「dirquota autoquota list」で自動適用クォータを確認

ドライブプロパティのクォータ設定を確認
 各ドライブのプロパティを開き、クォータタブの内容を確認

「fsutil volume list」でドライブ名を確認
「fsutil quota query ドライブ名」で確認

コマンドで設定する場合
旧サーバでtemplateをexportして、新サーバでimportして、各quotaを設定

dirquota template export /file:ファイル名
dirquota template import /file:ファイル名
dirquota quota add /Path:"D:\share" /sourcetemplate:"10 GB 制限"

5) シャドウコピー設定

ドライブプロパティのシャドウコピー設定を確認
 各ドライブのプロパティを開き、シャドウコピータブの内容を確認

コマンドの場合、スケジュール実行についてはタスクスケジューラで行っているのでschtasksコマンドでの確認が必要になることに注意

「vssadmin list shadows」で現在存在しているシャドウコピーを確認
「vssadmin list shadowstorage」でシャドウコピーの保存先を確認
「vssadmin list volumes」でディスクのIDを確認
「schtasks /query /xml」で一覧をXML形式で出力し、名前が"ShadowCopyVolume~"のものの内容を確認

6) タスクスケジューラ設定

タスクスケジューラを起動して設定を確認
 タスクスケジューラライブラリに登録されているタスク一覧を確認
 それぞれのタスクの詳細を確認

「schtasks /query /fo list」で一覧を表示
「schtasks /query /xml」で一覧をXML形式で表示

rocobopyでのファイル同期

robocopyのオプション

「/mir /copyall /R:1 /W:1」でいける場合が多い

EFSRAW対応の場合は「/COPYALL /MIR /B /EFSRAW /R:1 /W:1」

Windowsサーバ上で監査設定があって、コピー先が監査非対応の場合は「/E /B /copy:DATSO /R:1 /W:1」かなぁ?

「 /NP」オプションを付けて進捗表示なしにしてもよい

最初は「/MIR」ではなく「/B /E」で実行して、指定誤りによる誤削除がないようにする、というのも1つの手。

これは /MIR か /PURGE を指定すると、コピー元にないファイルは削除されるが、コピー先のディレクトリ指定を誤って既存データのあるディレクトリを指定してしまうと削除されるため。

robocopyを実行するバッチファイルの作成例

@echo off
set TIME2=%TIME: =0%
set LOGDATE=%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%-%TIME2:~0,2%%TIME2:~3,2%

robocopy \\旧FS\share  \\新FS\share /mir /copyall /R:0 /W:0 /LOG+:D:\LOGS\share-%LOGDATE%.txt

代表的なrobocopyエラーコードと対処一覧

エラー 2 (0x00000002)→指定したフォルダが存在しない
エラー 5 (0x00000005)→アクセス権がない。robocopyに/Bオプションを付ける
エラー 31 (0x0000001F)→コピー先に元と同じNTFSセキュリティ設定が行えない(OS制約などの可能性)
エラー 32 (0x00000020)→ファイルがアプリケーションからロックされているのでアプリを閉じる
エラー 64 (0x00000040)→指定した共有にアクセスできない
エラー 87 (0x00000057)→指定した共有にアクセスするためのユーザ名/パスワード指定が誤っている
エラー 112(0x00000070)→コピー先容量が足らない

メモ Nutanix AHVの管理画面で仮想マシンにClient certificatesのエラーがでていた


時々テスト用に起動することがあるNutanix環境がある。

テスト用なのでNutanix Community Editionで構築したのだがしばらくアップデートが出てなかったので結構古い。

確認することがあったのでWindows仮想マシンとLinux仮想マシンを作って、Windows側にNutanix Guest Toolsをインストールしてみたところエラーが・・・

Summary
Client certificates for VM <仮想マシン名> with uuid 33dd4645-3dcf-4efc-b837-0b1cb3a8d7d9 are expiring in -19717 days and need to be regenerated.Upon Certificate expiry, the CVM-Guest VM communication will be broken.

Possible Cause
Description
NGT Client certificates have definite expiry period of 1000 days based on ISO standards.

Recommendation
NGT Client certificates need to be regenerated on the guest VMs. Refer to KB 10075 for further details

KB 10075「NCC Health Check: ngt_client_cert_expiry_check

AOS 5.19.1以降と、AOS 5.19.1より前とで対処が違う模様。

2020.09.16はAOS5.18らしいので、より前なので対処策は KB-8120のようなのだが、Community Edition権限では読めない・・・

で・・・アップデートが出てないと思ってたNutanix Community Editionについて2023年3月に新しいバージョンが出ていたとは・・・

smzklab「[2023令和最新版]Nutanix Community Edition 2.0

ダウンロード場所「Download Community Edition

それはさておき、問題の対処方法を捜索

インフラ屋とアプリ屋のあいだ「NGTによる仮想マシンの識別方法と証明書の更新方法について」を見ると、期限が切れてる場合はNGTとの通信が出来ていない模様

しかしうちの環境だと「NGT Enabled:true」で「Communication Link Active:true」とNGTと通信はできている模様

nutanix@NTNX-20190b89-A-CVM:172.17.44.22:~$ ncli ngt get vm-id=<UUID>

    VM Id                     : <UUID>
    VM Name                   : <仮想マシン名>
    NGT Enabled               : true
    Tools ISO Mounted         : false
    Vss Snapshot              : true
    File Level Restore        : false
    Communication Link Active : true
nutanix@NTNX-20190b89-A-CVM:172.17.44.22:~$

とりあえず、書いてある証明書更新を実施してみる

「ncli vm list」でUUID確認

「ncli ngt get vm-id=<UUID>」で現状のステータス確認

「nutanix_guest_tools_cli query_vm_tools_entity <UUID>」でNGTと通信して内容が取れるか確認(うちの環境では取れた)

いまの環境のNGT versionは「ngt_version: “2.0”」となっていた。

「nutanix_guest_tools_cli delete_vm_tools_entity <UUID>」で登録を削除。最後は「result_vec: kNoError」と出る

「nutanix_guest_tools_cli query_vm_tools_entity <UUID>」でNGTと通信して内容を確認すると、ログが流れたあとjsonっぽい出力はなくすぐに「result_vec: kNonExistent」と出たので登録は削除されている

「nutanix_guest_tools_cli create_vm_tools_entity <UUID>」で登録を実施。最後は「result_vec: kNoError」と出る

「nutanix_guest_tools_cli query_vm_tools_entity <UUID>」でNGTと通信して内容を確認すると、ログが流れたあとjsonっぽい出力があれば再登録

Nutanix管理画面からMount Nutanix Guest Toolsを実行した後、仮想マシンを再起動、とあるので、それを行う(nutanix_guest_tools_cli mount_guest_tools <UUID>でもいいらしい)

仮想マシン再起動後、「ncli ngt get vm-id=<UUID>」を実行し、NGTの状態確認

結果変わらず。

今回、Linux仮想マシンだったので/usr/local/nutanix/ngt/config/にあるpem拡張子のファイルが更新されている。

# ls -l /usr/local/nutanix/ngt/config/
合計 20
-rwxr-x---. 1 root root 3988 12月 28 15:50 ca-cert.pem
-rwxr-x---. 1 root root 1854 12月 28 15:50 client-cert.pem
-rwxr-x---. 1 root root 1704 12月 28 15:50 client-key.pem
-r-xr-x---. 1 root root  118 12月 28 15:50 ngt_config.json
-rw-r--r--. 1 root root    0 12月 28 14:53 ngt_marker
-r-xr-x---. 1 root root  379 12月 28 14:53 script_execution_config.json
#

client-cert.pemを確認すると、発行日 2023/12/28 と更新されていることを確認

# openssl x509 -text -noout -in /usr/local/nutanix/ngt/config/client-cert.pem
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 4105 (0x1009)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, ST = CA, O = Nutanix, OU = NGT, CN = intermediate-ca
        Validity
            Not Before: Dec 28 06:45:42 2023 GMT
            Not After : Sep 23 06:45:42 2026 GMT
        Subject: C = US, ST = CA, L = San Jose, O = Nutanix, OU = Nutanix Guest Tools, CN = ngt-uuid=bbcae76c-bcc2-4da5-bb80-1ed6fb2d6045
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    <略>
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:FALSE
            Netscape Cert Type:
                SSL Client, S/MIME
            Netscape Comment:
                OpenSSL Generated Client Certificate
            X509v3 Subject Key Identifier:
                58:DD:30:0E:E9:FD:5E:5C:A0:68:5B:13:B4:34:4E:B5:10:43:D5:D1
            X509v3 Authority Key Identifier:
                16:EE:D1:30:0D:AC:E9:CE:CA:E9:69:D8:F1:8A:B6:7D:2B:46:45:F6
            X509v3 Key Usage: critical
                Digital Signature, Non Repudiation, Key Encipherment
            X509v3 Extended Key Usage:
                TLS Web Client Authentication, E-mail Protection
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        <略>
#

ca-cert.pem 側は2019/11/12発行だけど、有効期限が2029年までになっている状態

# openssl x509 -text -noout -in /usr/local/nutanix/ngt/config/ca-cert.pem
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 4096 (0x1000)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, ST = CA, L = San Jose, O = Nutanix, OU = NGT, CN = root-ca
        Validity
            Not Before: Nov 12 08:12:48 2019 GMT
            Not After : Nov  9 08:12:48 2029 GMT
        Subject: C = US, ST = CA, O = Nutanix, OU = NGT, CN = intermediate-ca
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (4096 bit)
                Modulus:
                    <略>
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Key Identifier:
                16:EE:D1:30:0D:AC:E9:CE:CA:E9:69:D8:F1:8A:B6:7D:2B:46:45:F6
            X509v3 Authority Key Identifier:
                AA:F6:89:7E:3B:F9:42:7E:15:D0:42:27:54:A8:65:2B:3E:5C:7F:B6
            X509v3 Basic Constraints: critical
                CA:TRUE, pathlen:0
            X509v3 Key Usage: critical
                Digital Signature, Certificate Sign, CRL Sign
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        <略>
#

….ca-certの有効期限が10年であることが問題?

そうするとNutanix側のCA証明書を再生成する必要があるのが「AOS < 5.19.1: Rrefer to KB 8120 for instructions on re-generating the certificates.」の内容ということなのか?

とりあえずよくわからないけど、NGTが使えていないわけではないので一旦放置、とした

ARCserve UDPでバックアップネットワーク設定を行う&UDPマニュアルメモ


ARCserve UDPは ver7 Update 1でバックアップネットワーク設定をサポートしました。

なので、2019年とかに導入したUDP ver6.xだと無理やりな設定を行っていました。

バックアップ LAN を使用した Arcserve UDP の運用について (Arcserve UDP 7.0 GA 以前)

UDP ver 7 Update 1からはプラン設定時にどのインタフェースを使用するかが選択できるようになりました。

バックアップ LAN を使用した Arcserve UDP の運用について (Arcserve UDP 7.0 Update 1 以降)

期待通りに動作していない場合は「バックアップ/リストア用のネットワークを指定しているにも関わらず、指定したネットワークが使用されない」などを確認。

UDP ver9でどのような画面になっているかは「ホスト ベースのバックアップ プランの作成」などを参考のこと

ARCserve UDPマニュアル類

ARCserve UDP ver9 日本語マニュアル一覧

Arcserve UDP 9.0 Documentation (各言語版)

Arcserve UDP 9.0 / 9.1 / 9.2 Software Compatibility Matrix

Arcserve Unified Data Protection 9.x 動作要件

ARCserve UDP KB情報

ONTAPアップデート時の警告についてのメモ


ONTAPアップデート時に検証を行うと、下記の様な警告が表示される。

とはいえ、ここで表示される警告の大半はノードが再起動するので問題があるかも?というものになる。

ONTAPシミュレータの場合はシングルノードなので再起動したら完全に止まりますが、ちゃんとしたハードウェアNetAppであれば2ノード以上あるので、実行するノードを切り替えつつアップデートされるので、影響は最小限となっています。

警告の例

Manual checks that can be done using Upgrade ONTAP documentation

これはほぼ必ず表示される警告

片ノード運用になるけど、I/O負荷大丈夫?SVMが動作しているノードを切り替える時に1回I/O止まってリトライされるけど大丈夫?という確認

Manual checks that can be done using Upgrade ONTAP documentation

メッセージ
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.
解決策
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.

ONTAP API to REST transition warning

ONTAP 9.12.1以降だと

ONTAP API to REST transition warning

メッセージ
NetApp ONTAP API has been used on this cluster for ONTAP data storage management within the last 30 days. NetApp ONTAP API is approaching end of availability.
解決策
Transition your automation tools from ONTAP API to ONTAP REST API. CPC-00410 - End of availability: ONTAPI : https://mysupport.netapp.com/info/communications/ECMLP2880232.html

LIFs on home node status

LIF(ネットワークインタフェース)がホーム以外のポートで運用されている場合に表示されます。

home portに戻すことで警告は消えます。home portに戻すことができない場合はONTAP OSのアップデートできません。

One or more LIFs are not on the node, verify that all LIFs are on the home node before attempting NDU.

Cluster/management switch support

Netappの各ノード間を接続しているクラスタネットワークの設定を確認してくれ、というものだが2ノード直結時でも出るので、謎。基本無視している。

Ensure that the NX-OS (cluster network switches), IOS (management network switches), and reference configuration file (RCF) software ersions are compatible with the target Data ONTAP release.
Refer to http://mysupport.netapp.com/NOW/download/software/cm_switches/ and http://mysupport.netapp.com/NOW/download/software/cm_switches_ntap/ for more details.

Name Service Configuration DNS Check

設定されているDNSサーバにアクセスできない状態で表示されますが、無視できる警告です。

無視してアップデートは可能ですが、名前解決ができないということはCIFS/Active Directory環境からのアクセスで問題が発生するかもしれないので注意が必要です。(再起動によりキャッシュが消えることによる問題)

Name Service Configuration DNS Check

メッセージ
None of the configured DNS servers are reacjanle for the following Vservers: 名前. There might be other Vservers for DNS servers are not reachable.

解決策
Delete the DNS server, or verify that the DNS status is "up". Delete the DNS configuration for the Vservers which do not have "dns" as a configured source in the ns-switch database.

NFS mounts

NFSサービスを提供している場合、NFS client側のマウント設定でsoft mountが使用されている場合、NetApp側ノード切り替え時にNFS client側の動作がイマイチな場合がある、という警告。

基本的にはNFS client側はhard mount設定で使ってほしい。

NetApp側で対処出来ることはないので無視する。

NFS mounts

メッセージ
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

解決策
Use NFS hard mounts, if possible

CIFS status

CIFSサービスを提供している場合、NetApp側ノード切り替え時にCIFS clientのアクセス手法によってはイマイチな動作をする可能性がある、という警告。

これも無視しちゃう

CIFS status

メッセージ
CIFS is currently in use. Any unprotected sessions may be affected with possible loss of data.

解決作
Stop all unprotected CIFS workloads before performing the update. To list the unprotected CIFS workloads, run the command: vserver cifs session show -continuously-available No, Partial


警告内容は「cluster image show-update-progress」を実行すると確認できる

ontap9121::> cluster image show-update-progress

                                             Estimated         Elapsed
Update Phase         Status                   Duration        Duration
-------------------- ----------------- --------------- ---------------
Pre-update checks    completed                00:10:00        00:00:38

Details:

Pre-update Check     Status            Error-Action
-------------------- ----------------- --------------------------------------
AMPQ Router and      OK                N/A
Broker Config
Cleanup
Aggregate online     OK                N/A
status and parity
check
Application          OK                N/A
Provisioning Cleanup
Autoboot Bootargs    OK                N/A
Status
Backend              OK                N/A
Configuration Status
Boot Menu Status     OK                N/A
CIFS compatibility   OK                N/A
status check
Capacity licenses    OK                N/A
install status check
Check For SP/BMC     OK                N/A
Connectivity To
Nodes
Check LDAP fastbind  OK                N/A
users using
unsecure connection.
Cloud keymanager     OK                N/A
connectivity check
Cluster health and   OK                N/A
eligibility status
Cluster/management   OK                N/A
switch check
Compatible New       OK                N/A
Image Check
Current system       OK                N/A
version check if it
is susceptible to
possible outage
during NDU
Data ONTAP Version   OK                N/A
and Previous
Upgrade Status
Data aggregates HA   OK                N/A
policy check
Disk status check    OK                N/A
for failed, broken
or non-compatibility
Duplicate Initiator  OK                N/A
Check
Encryption key       OK                N/A
migration status
check
External             OK                N/A
key-manager with
legacy KMIP client
check
External keymanager  OK                N/A
key server status
check
Infinite Volume      OK                N/A
availibility check
Logically over       OK                N/A
allocated DP
volumes check
Manual checks that   Warning           Warning: Manual validation checks
can be done using                      need to be performed. Refer to the
Upgrade ONTAP                          Upgrade Advisor Plan or the "What
documentation                          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.
MetroCluster         OK                N/A
configuration
status check for
compatibility
Minimum number of    OK                N/A
aggregate disks
check
NAE Aggregate and    OK                N/A
NVE Volume
Encryption Check
NDMP sessions check  OK                N/A
NFS mounts status    OK                N/A
check
NVMe over Fabrics    OK                N/A
license check
Name Service         OK                N/A
Configuration DNS
Check
Name Service         OK                N/A
Configuration LDAP
Check
Node to SP/BMC       OK                N/A
connectivity check
OKM/KMIP enabled     OK                N/A
systems - Missing
keys check
ONTAP API to REST    Warning           Warning: NetApp ONTAP API has been
transition warning                     used on this cluster for ONTAP data
                                       storage management within the last 30
                                       days. NetApp ONTAP API is approaching
                                       end of availability.
                                       Action: Transition your automation
                                       tools from ONTAP API to ONTAP REST
                                       API. For more details, refer to
                                       CPC-00410 - End of availability:
                                       ONTAPI
                                       https://mysupport.netapp.com/info/
                                       communications/ECMLP2880232.html
ONTAP Image          OK                N/A
Capability Status
OpenSSL 3.0.x        OK                N/A
upgrade validation
check
Openssh 7.2 upgrade  OK                N/A
validation check
Pre-Update           OK                N/A
Configuration
Verification
RDB Replica Health   OK                N/A
Check
Replicated database  OK                N/A
schema consistency
check
Running Jobs Status  OK                N/A
SAN and NVMe LIF     OK                N/A
Online Check
SAN compatibility    OK                N/A
for manual
configurability
check
SAN kernel agent     OK                N/A
status check
Secure Purge         OK                N/A
operation Check
Shelves and Sensors  OK                N/A
check
SnapLock Version     OK                N/A
Check
SnapMirror           OK                N/A
Synchronous
relationship status
check
SnapMirror           OK                N/A
compatibility
status check
Supported platform   OK                N/A
check
Target ONTAP         OK                N/A
release support for
FiberBridge 6500N
check
Upgrade Version      OK                N/A
Compatibility Status
Verify all bgp       OK                N/A
peer-groups are in
the up state
Verify that e0M is   OK                N/A
home to no LIFs
with high speed
services.
Volume Conversion    OK                N/A
In Progress Check
Volume move          OK                N/A
progress status
check
Volume online        OK                N/A
status check
iSCSI target portal  OK                N/A
groups status check
Overall Status       Warning           Warning
61 entries were displayed.

ontap9121::>

ONTAPシミュレータの新規導入手順


ONTAPシミュレータを標準設定でインストールすると結構面倒くさいので、トラブルが起きにくいように設定するやりかたのメモ書き

2023/12/14時点でONTAP 9.13.1のシミュレータもあるのですが、デプロイ後再起動するとブートループに陥る、という謎現象が発生していたりするので、この手順はONTAP 9.12.1で作っています。ONTAP 9.12.1で導入して9.13.1P2や9.13.1P7にアップデートしても動きが怪しい状況です。

1) 普通にovaファイルをデプロイ

2) 初回起動前にハードディスク2を拡大

これ、やる必要があるのかあまり確信はないのですが、ONTAPシミュレータで作成した場合、データは仮想マシン上のハードディスク2に保存されているようです。

初期値は200GB程度なので、実データがそれ以上保存できないんじゃないかなぁと思っているので、2000GBに増やしています。(下記画像は2000GBで指定したあとのTB表記)

3) 初回起動し、adminでログイン

ログイン後、初期セットアップが始まる状態の場合は、Ctrl+Cで強制終了して、プロンプトを出す

4) systemshellでローカルコマンドが実行できるか確認

最近のONTAPだと標準無効化されていると思うので、まずは状態を確認

「set diag」コマンドでdiagモードに移行したあとで「system node systemshell -node localhost -command ls /」を実行してどうなるかを確認する。

::> set diag

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

::*> system node systemshell -node localhost -command ls /
  (system node systemshell)

Error: command failed: Error: Account currently locked. Contact the storage
       administrator to unlock it.

::*>

ONTAPシミュレータ 9.12.1以降は上記の様な「Error」となると思われる。

5) diagアカウントのロックを解除

上記のエラーはdiagアカウントがロック状態であることが原因であるため、ロックを解除する。

「security login show -user-or-group-name diag」を実行して現在の状態を確認(ONTAPバージョンによっては “security login show -username diag”)

::*> security login show -user-or-group-name diag

Vserver: Default
                                                                 Second
User/Group                 Authentication                 Acct   Authentication
Name           Application Method        Role Name        Locked Method
-------------- ----------- ------------- ---------------- ------ --------------
diag           console     password      admin            yes    none

::*>

「Acct Lock: yes」であるためロックされていることを確認できる。

「security login unlock -username diag」を実行する

::*> security login unlock -username diag

Error: command failed: The admin password is not set. Use the "security login
          password" command to set the password, then try the command again.

::*>

上記のエラーがでた場合は「security login password -username admin」コマンドを実行して、adminユーザのパスワードを設定した後で、再度「security login unlock -username diag」を実行する

::*> security login password -username admin

Enter your current password: <初期設定前であればエンターキー入力>
Enter a new password: <新しいパスワード>
Enter it again: <新しいパスワード>

::*> security login unlock -username diag

::*>

ロック解除に成功した場合、なにも表示されないため、確認のために「security login show -user-or-group-name diag」を実行する

::*> security login show -user-or-group-name diag

Vserver: Default
                                                                 Second
User/Group                 Authentication                 Acct   Authentication
Name           Application Method        Role Name        Locked Method
-------------- ----------- ------------- ---------------- ------ --------------
diag           console     password      admin            no     none

::*>

6) 現状のディスク構成を確認

現状のディスク構成を確認するために「system node systemshell -node local -command “ls -l /sim/dev/,disks”」を実行する。

なお、日本語キーボードで「”」を入力する場合はShiftキーを押しながら「*:け」のキーを押すと入力できる。

::*> system node systemshell -node local -command "ls -l /sim/dev/,disks"

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

::*>

7) いまあるディスクを削除

/sim/dev/,disks にあるファイルを削除するために「system node systemshell -node local -command “cd /sim/dev/,disks; sudo rm *”」を実行します。

(日本語キーボードで「*」を入力する場合はShiftキーを押しながら「8(ゆ」のキーを押すと入力できる。)

実行後「system node systemshell -node local -command “ls -l /sim/dev/,disks”」を実行し、ファイルが削除されたことも確認します。

::*> system node systemshell -node local -command "cd /sim/dev/,disks; sudo rm *"

::*> system node systemshell -node local -command "ls -l /sim/dev/,disks"
total 0

::*>

8) ディスク作成

「system node systemshell -node localhost -command “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 0″」を実行してディスクを20本追加します。

(日本語キーボードで「_」を入力する場合はShiftキーを押しながら「=-ほ」のキーを押すと入力できる。)

「system node systemshell -node localhost -command “cd /sim/dev;sudo vsim_makedisks -t 36 -n 20 -a 1″」を追加実行して、さらに20本追加します。

9) 再起動

「reboot」を実行します。

10) Boot Menuを出す

再起動の始めに、下記のような「Press Ctrl-C for Boot Menu.」と出力されたタイミングでCtrl+Cキーを押す。

しばらく待つと下記の選択肢が表示される。

11) ディスク初期化を実行

“4. Clean configuration and initialize all disks.”の「4」を入力

“Zero disks, reset config and install a new file system?:”に「yes」と入力

続く”This will erase all the data on the disks, are you sure?:”も「yes」

初期化が終わると、自動再起動します。

12) 初期設定開始

ONTAP初期設定プロセスを実行していきます

初期セットアップ終了して、プロンプトを確認します。

13) 初期設定完了後追加設定

初期設定後、追加でしておくべき設定項目です。

この他に、SVM作ってCIFS/NFSファイルサーバをたてたりしていきます。

13a) aggr0へのディスク追加

ONTAPバージョンアップを行う場合、初期aggregateのサイズが10GB以上あった方が安全です。(ONTAP 9.7からいろいろバージョンアップテストを実施した結果)

ontap9121::> storage aggregate show


Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_ontap9121_01
            7.51GB   374.8MB   95% online       1 ontap9121-01     raid_dp,
                                                                   normal

ontap9121::> df -A -h
Aggregate                total       used      avail capacity
aggr0_ontap9121_01      7695MB     7320MB      374MB      95%
aggr0_ontap9121_01/.snapshot 405MB     0B      405MB       0%
2 entries were displayed.

ontap9121::>

7.51GBで、この容量であればパッチ適用程度であれば問題ないが、2段階アップデートを行う場合は少し容量が足らない可能性があります。

とりあえずディスク1本追加するため「storage aggregate add-disks -aggregate <aggregate名> -diskcount 1」を実行します。

ontap9121::> storage aggregate add-disks -aggregate aggr0_ontap9121_01 -diskcount 1

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

Info: Disks would be added to aggregate "aggr0_ontap9121_01" on node
      "ontap9121-01" in the following manner:

      First Plex

        RAID Group rg0, 4 disks (block checksum, raid_dp)
                                                            Usable Physical
          Position   Disk                      Type           Size     Size
          ---------- ------------------------- ---------- -------- --------
          data       NET-1.11                  FCAL         8.79GB   8.82GB

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

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

ontap9121::> storage aggregate show


Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0_ontap9121_01
           15.03GB    7.88GB   48% online       1 ontap9121-01     raid_dp,
                                                                   normal

ontap9121::> df -A -h
Aggregate                total       used      avail capacity
aggr0_ontap9121_01        15GB     7320MB     8069MB      48%
aggr0_ontap9121_01/.snapshot 810MB     0B      810MB       0%
2 entries were displayed.

ontap9121::>

13b) vol0領域の拡大

aggregateを拡大しただけでは、実際のアップデート時に使うvol0領域の大きさは変わりません。

vol0を拡大します。

現在値は「volume show」もしくは「df -h」で確認します。

ontap9121::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
ontap9121-01 vol0      aggr0_ontap9121_01 online RW     7.11GB     6.04GB   10%

ontap9121::> df -h
Filesystem               total       used      avail capacity  Mounted on                 Vserver
/vol/vol0/              6915MB      731MB     6184MB      10%  ---                        ontap9121-01
/vol/vol0/.snapshot      363MB         0B      363MB       0%  ---                        ontap9121-01
2 entries were displayed.

ontap9121::>

vol0の容量を10GBに設定する「volume size -vserver <クラスタ名> -volume vol0 -new-size 10g」を実行します。

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

ontap9121::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
ontap9121-01 vol0      aggr0_ontap9121_01 online RW       10GB     8.78GB    7%

ontap9121::> df -h
Filesystem               total       used      avail capacity  Mounted on                 Vserver
/vol/vol0/              9728MB      740MB     8987MB       7%  ---                        ontap9121-01
/vol/vol0/.snapshot      512MB         0B      512MB       0%  ---                        ontap9121-01
2 entries were displayed.

ontap9121::>

13c) 未割り当てディスク追加

現在のONTAP上で認識しているディスクを確認するために「storage disk show」を実行します。

ontap9121::> storage disk show
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.1                   -     -  16 FCAL    unassigned  -         -
NET-1.2                   -     -  17 FCAL    unassigned  -         -
NET-1.3                   -     -  18 FCAL    unassigned  -         -
NET-1.4                   -     -  19 FCAL    unassigned  -         -
NET-1.5                   -     -  20 FCAL    unassigned  -         -
NET-1.6                   -     -  21 FCAL    unassigned  -         -
NET-1.7                   -     -  22 FCAL    unassigned  -         -
NET-1.8              8.81GB     -  16 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.9              8.81GB     -  17 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.10             8.81GB     -  18 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.11             8.81GB     -  19 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.12                  -     -  24 FCAL    unassigned  -         -
NET-1.13                  -     -  25 FCAL    unassigned  -         -
NET-1.14                  -     -  26 FCAL    unassigned  -         -
NET-1.15                  -     -  27 FCAL    unassigned  -         -
NET-1.16                  -     -  28 FCAL    unassigned  -         -
NET-1.17                  -     -  29 FCAL    unassigned  -         -
NET-1.18             8.81GB     -  20 FCAL    spare       Pool0     ontap9121-01
NET-1.19             8.81GB     -  21 FCAL    spare       Pool0     ontap9121-01
NET-1.20             8.81GB     -  22 FCAL    spare       Pool0     ontap9121-01
NET-1.21             8.81GB     -  24 FCAL    spare       Pool0     ontap9121-01
NET-1.22             8.81GB     -  25 FCAL    spare       Pool0     ontap9121-01
NET-1.23             8.81GB     -  26 FCAL    spare       Pool0     ontap9121-01
NET-1.24             8.81GB     -  27 FCAL    spare       Pool0     ontap9121-01
NET-1.25                  -     -  32 FCAL    unassigned  -         -
NET-1.26                  -     -  33 FCAL    unassigned  -         -
NET-1.27             8.81GB     -  28 FCAL    spare       Pool0     ontap9121-01
NET-1.28             8.81GB     -  29 FCAL    spare       Pool0     ontap9121-01
NET-1.29             8.81GB     -  32 FCAL    spare       Pool0     ontap9121-01
NET-1.30             8.81GB     -  33 FCAL    spare       Pool0     ontap9121-01
NET-1.31                  -     -  34 FCAL    unassigned  -         -
NET-1.32                  -     -  35 FCAL    unassigned  -         -
NET-1.33                  -     -  36 FCAL    unassigned  -         -
NET-1.34                  -     -  37 FCAL    unassigned  -         -
NET-1.35             8.81GB     -  34 FCAL    spare       Pool0     ontap9121-01
NET-1.36             8.81GB     -  35 FCAL    spare       Pool0     ontap9121-01
NET-1.37                  -     -  38 FCAL    unassigned  -         -
NET-1.38             8.81GB     -  36 FCAL    spare       Pool0     ontap9121-01
NET-1.39             8.81GB     -  37 FCAL    spare       Pool0     ontap9121-01
NET-1.40             8.81GB     -  38 FCAL    spare       Pool0     ontap9121-01
40 entries were displayed.

ontap9121::>

10本は割り当てられていますが、10本は未割り当て(unassigned)となっています。

割り当てるためには「storage disk assign -disklist *」を実行します。

ontap9121::> storage disk assign -disklist *

ontap9121::> storage disk show
                     Usable           Disk    Container   Container
Disk                   Size Shelf Bay Type    Type        Name      Owner
---------------- ---------- ----- --- ------- ----------- --------- --------
NET-1.1              8.81GB     -  16 FCAL    spare       Pool0     ontap9121-01
NET-1.2              8.81GB     -  17 FCAL    spare       Pool0     ontap9121-01
NET-1.3              8.81GB     -  18 FCAL    spare       Pool0     ontap9121-01
NET-1.4              8.81GB     -  19 FCAL    spare       Pool0     ontap9121-01
NET-1.5              8.81GB     -  20 FCAL    spare       Pool0     ontap9121-01
NET-1.6              8.81GB     -  21 FCAL    spare       Pool0     ontap9121-01
NET-1.7              8.81GB     -  22 FCAL    spare       Pool0     ontap9121-01
NET-1.8              8.81GB     -  16 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.9              8.81GB     -  17 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.10             8.81GB     -  18 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.11             8.81GB     -  19 FCAL    aggregate   aggr0_ontap9121_01 ontap9121-01
NET-1.12             8.81GB     -  24 FCAL    spare       Pool0     ontap9121-01
NET-1.13             8.81GB     -  25 FCAL    spare       Pool0     ontap9121-01
NET-1.14             8.81GB     -  26 FCAL    spare       Pool0     ontap9121-01
NET-1.15             8.81GB     -  27 FCAL    spare       Pool0     ontap9121-01
NET-1.16             8.81GB     -  28 FCAL    spare       Pool0     ontap9121-01
NET-1.17             8.81GB     -  29 FCAL    spare       Pool0     ontap9121-01
NET-1.18             8.81GB     -  20 FCAL    spare       Pool0     ontap9121-01
NET-1.19             8.81GB     -  21 FCAL    spare       Pool0     ontap9121-01
NET-1.20             8.81GB     -  22 FCAL    spare       Pool0     ontap9121-01
NET-1.21             8.81GB     -  24 FCAL    spare       Pool0     ontap9121-01
NET-1.22             8.81GB     -  25 FCAL    spare       Pool0     ontap9121-01
NET-1.23             8.81GB     -  26 FCAL    spare       Pool0     ontap9121-01
NET-1.24             8.81GB     -  27 FCAL    spare       Pool0     ontap9121-01
NET-1.25             8.81GB     -  32 FCAL    spare       Pool0     ontap9121-01
NET-1.26             8.81GB     -  33 FCAL    spare       Pool0     ontap9121-01
NET-1.27             8.81GB     -  28 FCAL    spare       Pool0     ontap9121-01
NET-1.28             8.81GB     -  29 FCAL    spare       Pool0     ontap9121-01
NET-1.29             8.81GB     -  32 FCAL    spare       Pool0     ontap9121-01
NET-1.30             8.81GB     -  33 FCAL    spare       Pool0     ontap9121-01
NET-1.31             8.81GB     -  34 FCAL    spare       Pool0     ontap9121-01
NET-1.32             8.81GB     -  35 FCAL    spare       Pool0     ontap9121-01
NET-1.33             8.81GB     -  36 FCAL    spare       Pool0     ontap9121-01
NET-1.34             8.81GB     -  37 FCAL    spare       Pool0     ontap9121-01
NET-1.35             8.81GB     -  34 FCAL    spare       Pool0     ontap9121-01
NET-1.36             8.81GB     -  35 FCAL    spare       Pool0     ontap9121-01
NET-1.37             8.81GB     -  38 FCAL    spare       Pool0     ontap9121-01
NET-1.38             8.81GB     -  36 FCAL    spare       Pool0     ontap9121-01
NET-1.39             8.81GB     -  37 FCAL    spare       Pool0     ontap9121-01
NET-1.40             8.81GB     -  38 FCAL    spare       Pool0     ontap9121-01
40 entries were displayed.

ontap9121::>

「storage disk show -container-type unassigned」を実行してunassigned のディスクが無いことを確認します。

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

ontap9121::>

13d) vol0に対するsnapshot設定無効化

現在のvol0に対するスナップショット設定を確認するため「node run -node localhost -command snap sched」を実行

ontap9121::> node run -node localhost -command snap sched
Volume vol0: 0 2 6@8,12,16,20

ontap9121::>

上記の場合、vol0に対して定期的なsnapshotが作成される設定となっています。

この場合、vol0の使用容量枯渇のエラーになる場合があるため、定期取得を停止したほうがいいので、変更します。

変更は「node run -node localhost -command snap sched vol0 0 0 0」で行います。

ontap9121::> node run -node localhost -command snap sched vol0 0 0 0

ontap9121::> node run -node localhost -command snap sched
Volume vol0: 0 0 0

ontap9121::>

上記の様に「vol0: 0 0 0」となっていれば無効化されています。