NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

ONTAP 9.4 の重複排除効果監視について

ONTAP Simulator 9.4 を使用したテスト環境の構築と、重複排除効果を監視する方法をご紹介します。

環境構築手順(簡易版)

disk 追加~Aggr 作成

storage disk assign -all true -node cl-01
storage aggregate create -aggregate aggr1 -raidtype raid_dp -diskcount 20 -nodes cl -maxraidsize 28

※root volume 拡張(オプション)
ONTAP Simulator の初期セットアップ後、以下のエラーが出力される場合があります。

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.

そのため、以下の手順で root volume のサイズを拡張しておきます。

storage aggregate add-disks -aggregate aggr0_cl_01 -diskcount 3
run -node cl-01 vol size vol0 +1g
storage aggregate show -node cl-01 -root true
volume show -node cl-01 -aggregate aggr0_cl_01

※2018.12.09 追記
なお、運用中に上記エラーがでた際は、以下の方法で vol0 のサイズを拡張することが可能です。

> node run local
> vol size vol0 +1g

SVM 作成~LIF(CIFS 用)作成

vserver create -vserver vs -aggregate aggr1
network interface create -vserver vs -lif lif-cifs -role data -data-protocol cifs -home-node cl-01 -home-port e0a -address 10.1.1.21 -netmask 255.255.255.0

ライセンス登録~volume 作成

license add -license-code "License Code"
volume create -vserver vs -volume vol1 -aggregate aggr1 -size 10g -security-style ntfs -space-guarantee none -junction-path /vol1

時刻設定~CIFS 設定

timezone Asia/Tokyo
system date modify -dateandtime 201810201926.48
vserver services dns create -vserver vs -domains example.com -name-servers 10.1.1.120
cifs create -cifs-server cifs -domain example.com -vserver vs
Enter the user name: Administrator
Enter the password:
vserver cifs share create -vserver vs -share-name vol1 -path /vol1

重複排除設定と効率の確認

volume efficiency on -vserver vs -volume vol1

効率化によるスペース削減量の表示(出力結果抜粋)

volume show -vserver vs -volume vol1
<...snip...>
Space Saved by Deduplication: 119.6MB	<---重複排除によって節約された領域
Percentage Saved by Deduplication: 2%	<---重複排除によって節約された割合
<...snip...>

重複排除効率の監視

NetApp PowerShell Toolkit Installerとタスクスケジューラを使用して、重複排除効率化の定期的な監視を行うことができそうです。以下のファイルを実行してインストールします。

NetApp_PowerShell_Toolkit_4.6.0.msi 

PowerShell スクリプトを利用して重複排除効率を確認可能です。
スクリプト例

$netapp = "192.168.1.21"
$user = "admin"
$pass = "password"
$volname = "vol1"

#-------------------------------------------------------------------------
# function Efficiency-Status
#-------------------------------------------------------------------------
function Efficiency-Status()
{
   $outfile = "C:\Efficiency_status.log"
   $logdata = "Efficiency_Status"
   $logdata | out-file $outfile -append
   Get-Date -Format g >> $outfile
   Get-NcVol $volname | select @{Name="Volume"    ; Exp={$_.name}}, 
               @{Name="Total(MB)" ; Exp={[math]::Truncate(($_ | Get-NcVol).TotalSize/1MB)}},
               @{Name="Used(%)"   ; Exp={($_ | Get-NcVol).Used}},
               @{Name="Avail(MB)" ; Exp={[math]::Truncate(($_ | Get-NcVol).Available/1MB)}},
               @{Name="Saved(MB)" ; Exp={[math]::Round(($_ | Get-NcEfficiency $volname).Returns.Dedupe/1MB)}} | Format-Table -autosize >> $outfile
   write-output ""`n >> $outfile
}

#-------------------------------------------------------------------------
# Do-Initialize
#-------------------------------------------------------------------------
$password = ConvertTo-SecureString $pass -asplaintext -force
$cred = New-Object System.Management.Automation.PsCredential $user,$password

Import-Module DataOnTap
Connect-NaController $netapp -cred $cred 

#-------------------------------------------------------------------------
# Main Application Logic
#-------------------------------------------------------------------------
Efficiency-Status

参考書籍

以上