2024/05/21追記: 新規でONTAPシミュレータを作る人は「ONTAPシミュレータの新規導入手順 」の方を読んでください。
この記事は稼働中のONTAPシミュレータをなんとかしようとするものです。
NetApp ONTAP 9.7シミュレータをしばらく稼働させ続けていると、ディスクがフルとなって死ぬ。
なんでなんだろーなー?とONTAP 9.1シミュレータと構成の差をみてみたら、仮想ディスクの大きさが4GBから1GBに縮小されていた。
そりゃ、ディスクの余裕がだいぶ異なりますね。
というわけで、vol0の容量を増やしましょう
状況の確認
まず、aggregate の空き容量を確認 「storage aggregate show」か「df -A -h」を実行します。
1
ontap97-sub::> storage aggregate show
4
Aggregate Size Available Used% State #Vols Nodes RAID Status
5
--------- -------- --------- ----- ------- ------ ---------------- ------------
6
aggr0_ontap97_sub_01 855MB 41.41MB 95% online 1 ontap97-sub-01 raid_dp,
8
aggr1 14.06GB 14.00GB 0% online 3 ontap97-sub-01 raid_dp,
10
2 entries were displayed.
12
ontap97-sub::> df -A -h
13
Aggregate total used avail capacity
14
aggr0_ontap97_sub_01 855MB 812MB 42MB 95%
15
aggr0_ontap97_sub_01/.snapshot 45MB 0B 45MB 0%
16
aggr1 14GB 61MB 14GB 0%
17
aggr1/.snapshot 0B 0B 0B 0%
18
4 entries were displayed.
空きディスクの確認
現状、aggr0の空き容量がないため、ディスクを追加します。
追加できるディスクがあるかを「storage disk show -container-type spare」を実行して確認
1
ontap97-sub::> storage disk show -container-type spare
2
Usable Disk Container Container
3
Disk Size Shelf Bay Type Type Name Owner
4
---------------- ---------- ----- --- ------- ----------- --------- --------
5
NET-1.19 1020MB - 27 FCAL spare Pool0 ontap97-sub-01
6
NET-1.20 1020MB - 28 FCAL spare Pool0 ontap97-sub-01
7
NET-1.21 1020MB - 29 FCAL spare Pool0 ontap97-sub-01
8
NET-1.27 1020MB - 32 FCAL spare Pool0 ontap97-sub-01
9
NET-1.28 1020MB - 32 FCAL spare Pool0 ontap97-sub-01
10
5 entries were displayed.
現在5本のスペアがあります。スペアが0本だと問題が発生します。
その場合はディスクを追加します。
シミュレータへのディスク追加
ONTAPシミュレータが認識しているディスクを追加することはできます。
追加はシミュレータ仮想マシンの仮想ディスクとして追加するのではなく、シミュレータOS内部でディスクファイルを作成する形で行います。
ちなみに、security loginコマンドでshellにログインできるような権限を付与してパスワードも設定する、的なことを書いている手順もありますが、それは必要が無い手法を使います。
まずは、diagモードに切り替えてコマンドを実行する必要があるので「set diag」を実行します。
3
Warning: These diagnostic commands are for use by NetApp personnel only.
4
Do you want to continue? {y|n}: y
現在使われているディスクタイプを確認するため、「systemshell local “ls -l /sim/dev/,disks”」を実行します。(disksの前に「,」が入っています)
(最近のONTAPではdiagアカウントがlockされていて実行できない。その場合はロックを解除する )
1
ontap97-sub::*> systemshell local "ls -l /sim/dev/,disks"
2
(system node systemshell)
4
-rwxr-xr-x 1 root wheel 912 Mar 10 16:07 ,reservations
5
-rw-r--r-- 1 root wheel 1372 Mar 10 16:07 Shelf:DiskShelf14
6
-rw-r--r-- 1 root wheel 1094312960 Mar 10 16:45 v0.16:NETAPP__:VD-1000MB-FZ-520:13511800:2104448
7
-rw-r--r-- 1 root wheel 1094312960 Mar 10 16:45 v0.17:NETAPP__:VD-1000MB-FZ-520:13511901:2104448
9
-rw-r--r-- 1 root wheel 1094312960 Mar 10 16:23 v1.29:NETAPP__:VD-1000MB-FZ-520:15901912:2104448
10
-rw-r--r-- 1 root wheel 1094312960 Mar 10 16:23 v1.32:NETAPP__:VD-1000MB-FZ-520:15901913:2104448
上記の場合「NETAPP__:VD-1000MB-FZ-520」というディスクを使っています。
このディスクを追加するために該当するdisk type IDを「systemshell local “vsim_makedisks -h”」を実行して確認します。
1
ontap97-sub::*> systemshell local "vsim_makedisks -h"
2
(system node systemshell)
3
Usage: /usr/sbin/vsim_makedisks [ -n <additional number of disks to create> ]
4
[ -t <disk type ID> ]
5
[ -e <additional sectors> ]
6
[ -a <adapter on which to start populating disks ]
9
By default 5 disks will be added. The <disk type ID> can be one
10
of the following: (NOTE, 0 is the default)
12
Type Vendor ID Product ID Usable Size[B] Actual Size[B] Zero BPS RPM
13
0 NETAPP__ VD-16MB_________ 16,777,216 38,273,024 No 512 10000
14
1 NETAPP__ VD-35MB_________ 35,913,728 57,409,536 No 512 10000
15
2 NETAPP__ VD-50MB_________ 52,428,800 73,924,608 No 512 10000
16
3 NETAPP__ VD-100MB________ 104,857,600 126,353,408 No 512 10000
17
4 NETAPP__ VD-500MB________ 524,288,000 545,783,808 No 512 10000
18
5 NETAPP__ VD-1000MB_______ 1,048,576,000 1,070,071,808 No 512 10000
19
6 NETAPP__ VD-16MB-FZ______ 16,777,216 38,273,024 Yes 512 15000
20
7 NETAPP__ VD-35MB-FZ______ 35,913,728 57,409,536 Yes 512 15000
21
8 NETAPP__ VD-50MB-FZ______ 52,428,800 73,924,608 Yes 512 15000
22
9 NETAPP__ VD-100MB-FZ_____ 104,857,600 126,353,408 Yes 512 15000
23
10 NETAPP__ VD-500MB-FZ_____ 524,288,000 545,783,808 Yes 512 15000
24
11 NETAPP__ VD-1000MB-FZ____ 1,048,576,000 1,070,071,808 Yes 512 15000
25
12 NETAPP__ VD-16MB-520_____ 16,777,216 38,273,024 No 520 10000
26
13 NETAPP__ VD-35MB-520_____ 35,913,728 57,409,536 No 520 10000
27
14 NETAPP__ VD-50MB-520_____ 52,428,800 73,924,608 No 520 10000
28
15 NETAPP__ VD-100MB-520____ 104,857,600 126,353,408 No 520 10000
29
16 NETAPP__ VD-500MB-520____ 524,288,000 545,783,808 No 520 10000
30
17 NETAPP__ VD-1000MB-520___ 1,048,576,000 1,070,071,808 No 520 10000
31
18 NETAPP__ VD-16MB-FZ-520__ 16,777,216 38,273,024 Yes 520 15000
32
19 NETAPP__ VD-35MB-FZ-520__ 35,913,728 57,409,536 Yes 520 15000
33
20 NETAPP__ VD-50MB-FZ-520__ 52,428,800 73,924,608 Yes 520 15000
34
21 NETAPP__ VD-100MB-FZ-520_ 104,857,600 126,353,408 Yes 520 15000
35
22 NETAPP__ VD-500MB-FZ-520_ 524,288,000 545,783,808 Yes 520 15000
36
23 NETAPP__ VD-1000MB-FZ-520 1,048,576,000 1,070,071,808 Yes 520 15000
37
24 NETAPP__ VD-16MB-FZ-ATA__ 16,777,216 51,388,416 Yes 512 7200
38
25 NETAPP__ VD-35MB-FZ-ATA__ 36,700,160 73,801,728 Yes 512 7200
39
26 NETAPP__ VD-50MB-FZ-ATA__ 52,428,800 91,496,448 Yes 512 7200
40
27 NETAPP__ VD-100MB-FZ-ATA_ 104,857,600 150,478,848 Yes 512 7200
41
28 NETAPP__ VD-500MB-FZ-ATA_ 524,288,000 622,338,048 Yes 512 7200
42
29 NETAPP__ VD-1000MB-FZ-ATA 1,048,576,000 1,212,162,048 Yes 512 7200
43
30 NETAPP__ VD-2000MB-FZ-520 2,097,512,000 2,119,007,808 Yes 520 15000
44
31 NETAPP__ VD-4000MB-FZ-520 4,194,304,000 4,215,799,808 Yes 520 15000
45
32 NETAPP__ VD-2000MB-FZ-ATA 2,097,512,000 2,391,810,048 Yes 512 7200
46
33 NETAPP__ VD-4000MB-FZ-ATA 4,194,304,000 4,751,106,048 Yes 512 7200
47
34 NETAPP__ VD-100MB-SS-512_ 104,857,600 126,353,408 Yes 512 15000
48
35 NETAPP__ VD-500MB-SS-520_ 524,288,000 545,783,808 Yes 520 15000
49
36 NETAPP__ VD-9000MB-FZ-520 9,437,184,000 9,458,679,808 Yes 520 15000
50
37 NETAPP__ VD-9000MB-FZ-ATA 9,437,184,000 10,649,346,048 Yes 512 7200
上記結果より「23」でした。
ディスク追加は「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t タイプ -n 追加本数”」を実行して行います。
“sudo”コマンドを使用することでsecurity loginコマンドによる設定変更を省略しています。
今回、使用しているディスクはタイプ23であるため、これを10本追加するのであれは「systemshell localhost “cd /sim/dev;sudo vsim_makedisks -t 23 -n 10″」を実行します。
1
ontap97-sub::*> systemshell localhost "cd /sim/dev;sudo vsim_makedisks -t 23 -n 10"
2
(system node systemshell)
3
Creating ,disks/v0.33:NETAPP__:VD-1000MB-FZ-520:66781814:2104448
4
Creating ,disks/v0.34:NETAPP__:VD-1000MB-FZ-520:66781815:2104448
5
Creating ,disks/v0.35:NETAPP__:VD-1000MB-FZ-520:66781816:2104448
6
Creating ,disks/v0.36:NETAPP__:VD-1000MB-FZ-520:66781817:2104448
7
Creating ,disks/v0.37:NETAPP__:VD-1000MB-FZ-520:66781818:2104448
8
Creating ,disks/v0.38:NETAPP__:VD-1000MB-FZ-520:66781819:2104448
9
Creating ,disks/v0.39:NETAPP__:VD-1000MB-FZ-520:66781820:2104448
10
Creating ,disks/v0.40:NETAPP__:VD-1000MB-FZ-520:66781821:2104448
11
Creating ,disks/v0.41:NETAPP__:VD-1000MB-FZ-520:66781822:2104448
12
Creating ,disks/v0.42:NETAPP__:VD-1000MB-FZ-520:66781823:2104448
13
Shelf file Shelf:DiskShelf14 updated
ディスクを追加すると、まず未割り当てとして登録されます。
未割り当てディスクは「storage disk show -container-type unassigned」で確認します。
1
ontap97-sub::*> storage disk show -container-type unassigned
2
There are no entries matching your query.
また「storage disk show -container-type spare」を実行してスペアディスクが増えていないことを確認します。
シミュレータ環境では追加したディスクがオンラインで認識されず、シミュレータの再起動が必要なようです。
再起動後、「storage disk show -container-type spare」を実行するとスペアディスクが増えていることがわかります。
1
ontap97-sub::> storage disk show -container-type spare
2
Usable Disk Container Container
3
Disk Size Shelf Bay Type Type Name Owner
4
---------------- ---------- ----- --- ------- ----------- --------- --------
5
NET-1.19 1020MB - 27 FCAL spare Pool0 ontap97-sub-01
6
NET-1.20 1020MB - 28 FCAL spare Pool0 ontap97-sub-01
7
NET-1.21 1020MB - 29 FCAL spare Pool0 ontap97-sub-01
8
NET-1.27 1020MB - 32 FCAL spare Pool0 ontap97-sub-01
9
NET-1.28 1020MB - 32 FCAL spare Pool0 ontap97-sub-01
10
NET-1.29 1020MB - 33 FCAL spare Pool0 ontap97-sub-01
11
NET-1.30 1020MB - 34 FCAL spare Pool0 ontap97-sub-01
12
NET-1.31 1020MB - 35 FCAL spare Pool0 ontap97-sub-01
13
NET-1.32 1020MB - 36 FCAL spare Pool0 ontap97-sub-01
14
NET-1.33 1020MB - 37 FCAL spare Pool0 ontap97-sub-01
15
NET-1.34 1020MB - 38 FCAL spare Pool0 ontap97-sub-01
16
NET-1.35 1020MB - 39 FCAL spare Pool0 ontap97-sub-01
17
NET-1.36 1020MB - 40 FCAL spare Pool0 ontap97-sub-01
18
NET-1.37 1020MB - 41 FCAL spare Pool0 ontap97-sub-01
19
NET-1.38 1020MB - 42 FCAL spare Pool0 ontap97-sub-01
20
15 entries were displayed.
システムaggregateへのディスク追加
システムaggregateにディスクを追加します。
とりあえずディスクを3本追加します。 「storage aggregate add-disks -aggregate システムaggr名 -diskcount ディスク本数」
1
ontap97-sub::> storage aggregate add-disks -aggregate aggr0_ontap97_sub_01 -diskcount 3
3
Warning: Aggregate "aggr0_ontap97_sub_01" is a root aggregate. Adding disks to
4
the root aggregate is not recommended. Once added, disks cannot be
5
removed without reinitializing the node.
6
Do you want to continue? {y|n}: y
8
Info: Disks would be added to aggregate "aggr0_ontap97_sub_01" on node
9
"ontap97-sub-01" in the following manner:
13
RAID Group rg0, 6 disks (block checksum, raid_dp)
15
Position Disk Type Size Size
16
---------- ------------------------- ---------- -------- --------
17
data NET-1.19 FCAL 1000MB 1.00GB
18
data NET-1.27 FCAL 1000MB 1.00GB
19
data NET-1.20 FCAL 1000MB 1.00GB
21
Aggregate capacity available for volume use would be increased by 2.64GB.
23
Do you want to continue? {y|n}: y
aggregateの容量が増えたことを確認します
1
ontap97-sub::> storage aggregate show
4
Aggregate Size Available Used% State #Vols Nodes RAID Status
5
--------- -------- --------- ----- ------- ------ ---------------- ------------
6
aggr0_ontap97_sub_01 3.34GB 2.55GB 24% online 1 ontap97-sub-01 raid_dp,
8
aggr1 14.06GB 14.00GB 0% online 3 ontap97-sub-01 raid_dp,
10
2 entries were displayed.
12
ontap97-sub::> df -A -h
13
Aggregate total used avail capacity
14
aggr0_ontap97_sub_01 3420MB 812MB 2607MB 24%
15
aggr0_ontap97_sub_01/.snapshot 180MB 0B 180MB 0%
16
aggr1 14GB 61MB 14GB 0%
17
aggr1/.snapshot 0B 0B 0B 0%
18
4 entries were displayed.
システムボリュームの拡張
まずは現状のvol0のサイズを確認します
1
ontap97-sub::> volume show
2
Vserver Volume Aggregate State Type Size Available Used%
3
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
4
ontap97-sub-01 vol0 aggr0_ontap97_sub_01 online RW 807.3MB 230.4MB 69%
5
1 entries were displayed.
8
Filesystem total used avail capacity Mounted on Vserver
9
/vol/vol0/ 766MB 536MB 230MB 69% --- ontap97-sub-01
10
/vol/vol0/.snapshot 40MB 32MB 7824KB 81% --- ontap97-sub-01
11
2 entries were displayed.
「system node run -node ノード名 df -h」という手法でもボリューム容量を確認することができます。
1
ontap97-sub::> system node run -node ontap97-sub-01 df -h
2
Filesystem total used avail capacity Mounted on
3
/vol/vol0/ 766MB 544MB 222MB 71% /vol/vol0/
4
/vol/vol0/.snapshot 40MB 32MB 7768KB 81% /vol/vol0/.snapshot
現状のvol0サイズを確認するため「system node run -node ノード名 vol size vol0」を実行します。
1
ontap97-sub::> system node run -node ontap97-sub-01 vol size vol0
2
vol size: Flexible volume 'vol0' has size 826656k.
vol0のサイズを2GBに設定します。
1
ontap97-sub::> system node run -node ontap97-sub-01 vol size vol0 2g
2
vol size: Flexible volume 'vol0' size set to 2g.
容量が変わったことを確認します。
1
ontap97-sub::> volume show
2
Vserver Volume Aggregate State Type Size Available Used%
3
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
4
ontap97-sub-01 vol0 aggr0_ontap97_sub_01 online RW 2GB 1.38GB 27%
5
1 entries were displayed.
8
Filesystem total used avail capacity Mounted on Vserver
9
/vol/vol0/ 1945MB 536MB 1409MB 27% --- ontap97-sub-01
10
/vol/vol0/.snapshot 102MB 32MB 69MB 32% --- ontap97-sub-01
11
2 entries were displayed.
13
ontap97-sub::> system node run -node ontap97-sub-01 df -h
14
Filesystem total used avail capacity Mounted on
15
/vol/vol0/ 1945MB 543MB 1402MB 28% /vol/vol0/
16
/vol/vol0/.snapshot 102MB 32MB 69MB 32% /vol/vol0/.snapshot
これで、vol0に余裕ができました。