Quantcast
Channel: netapp - NETWORK ENGINEER BLOG
Viewing all 55 articles
Browse latest View live

NetApp SnapMirror の設定

$
0
0
NetApp SnapMirror とは

遠隔地へ高速にデータを転送し、筐体間レプリケーションを実現するテクノロジです。初回転送時は、全データをコピーし、次回以降は Snapshot によって取得された変更データブロックのみを転送します。
出典:NetApp Inc,

f:id:FriendsNow:20121127212422j:plain:w600

SnapMirror 送信元設定

コピー元ボリューム"vol_test"を aggr1 に 100g で作成します。オプションを適当に設定します。

Src> vol create vol_test -s none aggr1 100g
Src> vol options vol_test nosnap on
Src> vol options vol_test fractional_reserve 100
Src> vol options vol_test create_ucode on
Src> vol options vol_test convert_ucode on
Src> snap reserve vol_test 0
Src> snap sched vol_test 0 0 0
SnapMirror 送信先設定

コピー先ボリュームを作成します。基本的にコピー元の構成と合わせます。

Dst> vol create vol_test -s none aggr1 100g
Dst> vol options vol_test nosnap on
Dst> vol options vol_test fractional_reserve 100
Dst> vol options vol_test create_ucode on
Dst> vol options vol_test convert_ucode on
Dst> snap reserve vol_test 0
Dst> snap sched vol_test 0 0 0

コピー先ボリュームを"restricted mode"に指定します。

Dst> vol restrict vol_test
Volume 'vol_test' is now restricted.

Dst> vol status vol_test
         Volume State           Status            Options
  vol_test restricted      raid_dp, flex     
		Containing aggregate: 'aggr1'

SnapMirror Initialize を実行します。

Dst> snapmirror initialize -S Src:vol_test Dst:vol_test
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.

Dst> snapmirror status
Snapmirror is on.

Source                   Destination               State          Lag        Status
Src:vol_test             Dst:vol_test              Snapmirrored   00:00:28   Idle

NetApp Data ONTAP アップデート手順

$
0
0

FAS3210A クラスタモデルでのソフトウェアアップデート例になります。

Data ONTAP のダウンロード

下記 URL からソフトウェアをダウンロードします。
http://support.netapp.com/NOW/cgi-bin/software/

Web Server の準備

本例では、mongoose を使用して、端末を Web Server とします。
http://code.google.com/p/mongoose/
mongoose では、c:\ がデフォルトの Web Root folder になります。

Filer への Data ONTAP ダウンロード

"software get"コマンドを使用して、Data ONTAP をダウンロードします。

head1> software get http://192.168.1.100/736P5_setup_q.exe 736P5_setup_q.exe

正常にダウンロードした事を確認します。

head1> software list
736P5_setup_q.exe

head1> priv set advanced
head1*> ls /etc/software
.   
..   
736P5_setup_q.exe   

head1> priv set
Filer の Data ONTAP アップデート

バージョン情報を確認します。

head1> sysconfig
	NetApp Release 7.3.5.1P5: Wed Jun 15 15:37:59 PDT 2011
	System ID: ******* (head1); partner ID: ******* (head2)
<...snip...>

クラスタ状態を確認します。

head1> cf status
Cluster enabled, head2 is up.
Negotiated failover enabled (network_interface).
Interconnect status: up.

raid.back オプションを無効にしておきます。

head1> options raid.back
raid.background_disk_fw_update.enable on   (value might be overwritten in takeover)

head1> option raid.background_disk_fw_update.enable off
You are changing option raid.background_disk_fw_update.enable which applies to both members of the cluster in takeover mode.
This value must be the same in both cluster members prior to any takeover or giveback, or that next takeover/giveback may not work correctly.

head1> options raid.back
raid.background_disk_fw_update.enable off  (value might be overwritten in takeover)

"software update"コマンドを使用して、Data ONTAP をアップデートします。

head1> software update 736P5_setup_q.exe -r
software: You can cancel this operation by hitting Ctrl-C in the next 6 seconds.
software: Depending on system load, it may take many minutes
software: to complete this operation. Until it finishes, you will
software: not be able to use the console.
software: installing software, this could take a few minutes...
software: Data ONTAP(R) Package Manager Verifier 1
software: Validating metadata entries in /etc/boot/NPM_METADATA.txt
software: Checking sha1 checksum of file checksum file: /etc/boot/NPM_FCSUM-x86-64.sha1.asc
software: Checking sha1 file checksums in /etc/boot/NPM_FCSUM-x86-64.sha1.asc
software: installation of 736P5_setup_q.exe completed.
software: Reminder: upgrade both the nodes in the Cluster
software: Reminder: You may need to upgrade Volume SnapMirror source filers
software: associated with this filer. Volume SnapMirror can not mirror if the
software: version of ONTAP on the source filer is newer than that on the
software: destination filer.
download: Downloading boot device
download: If upgrading from a version of Data ONTAP prior to 7.3, please ensure
download: there is at least 3% of available space on each aggregate before
download: upgrading.  Additional information can be found in the release notes.
download: Downloading boot device (Service Area)
.................
Please type "reboot" for the changes to take effect.

バージョンが更新されている事を確認します。

head1> version -b
1:/x86_64/kernel/primary.krn: OS 7.3.6P5
1:/backup/x86_64/kernel/primary.krn: OS 7.3.5.1P5
1:/x86_64/diag/diag.krn:  5.5.2
1:/x86_64/firmware/excelsio/firmware.img: Firmware 1.9.0
1:/x86_64/firmware/DrWho/firmware.img: Firmware 2.5.0
1:/x86_64/firmware/SB_XV/firmware.img: Firmware 4.4.0
1:/x86_64/firmware/SB_XVI/firmware.img: Firmware 5.1.1
1:/boot/loader: Loader 1.8
1:/x86_64/freebsd/image1/kernel: OS 8.0.3P1
1:/common/firmware/zdi/zdi_fw.zpk: Flash Cache Firmware 2.2 (Build 0x201012201350)
1:/common/firmware/zdi/zdi_fw.zpk: PAM II Firmware 1.10 (Build 0x201012200653)
1:/common/firmware/zdi/zdi_fw.zpk: X1936A FPGA Configuration PROM 1.0 (Build 0x200706131558)

"cf takeover"コマンドを使用して、takeover します。
※takeover: head2 で head1 を引き継ぎます。実行はクラスタペアで行います。

head2> cf takeover
cf: takeover initiated by operator

head2 が head1 を正常に引き継いでいる(takeover している)事を確認します。

head2(takeover)> cf status
head2 has taken over head1.
head1 is ready for giveback.
Takeover due to negotiated failover, reason: operator initiated cf takeover

"cf giveback"コマンドを使用して、giveback します。
※giveback: head2 から head1 へ返還します。実行はクラスタペアで行います。

head2(takeover)> cf giveback

head2> cf status
Cluster enabled, head1 is up.
Negotiated failover enabled (network_interface).
Interconnect status: up.

Data ONTAP が更新している事を確認して完了です。

head1> sysconfig
	NetApp Release 7.3.5.1P5: Wed Jun 15 15:37:59 PDT 2011
	System ID: ******* (head1); partner ID: ******* (head2)
<...snip...>

NetApp トラブルシューティング用のログ取得例

$
0
0

NetApp のトラブルシューティングに必要な主なログとして、以下の3つがあります。

  • SP ログ
  • savecore ログ
  • ssram ログ

SP ログについては、SP ポート経由で取得し、savecore 及び、ssram については、CIFS 経由で取得する必要があります。CIFS のセットアップ方法ついては、後述します。
なお、クラスタヘッド構成の場合、takeover 中でも head を切替えて、ログを取得する事が可能です。
head の切替は、partner コマンドを使用します。

head2(takeover)> partner
Login to partner shell: head1
Thu Dec 25 12:25:00 JST [head2 (takeover): cf.partner.login:notice]: Login to partner shell: head1

head1/head2>

再度 partner コマンドを実行する事で、元に戻ります。

head1/head2> partner
Logoff from partner shell: head1
head2(takeover)> 
Thu Dec 25 12:25:00 JST [head2 (takeover): cf.partner.logoff:notice]: Logoff from partner shell: head1
SP ログの取得手順

SSH でアクセスします。ユーザー ID は naroot、パスワードは、root パスワードになります。

head1> events all

head1> system log

head1> sp status -d
SP ポートについて

The Service Processor(SP)ポートは、32xx 及び 62xx に実装されるリモート管理デバイスで、遠隔でトラブルシューティングを実行する事が可能です。SP ポートの主な機能は以下のとおりです。

  • 遠隔からのシステムの診断、シャットダウン、再起動等をサポートします。
  • 管理ホストから SSH を使用して、SP へアクセスし、SP CLI を使用できます。

詳細については、こちらをご参照ください。

savecore ログの取得手順

core が出力されていれば、core.xxxxxxxxx.2012-12-25.XX_XX_XX.nz というファイルが存在します。

head1> savecore -l

/etc/crash 配下に出力されます。

ssram ログの取得手順

/vol/vol0/etc/log/ssram ディレクトリ配下全てが対象です。

前述の通り、savecore 及び、ssram については、CIFS でアクセスし、取得する必要があります。
なお、CIFS プロトコルに関してはライセンスが無くても cifs setup と vol0 へのアクセスが可能です。

CIFS セットアップ手順

wafl.nt_admin_priv_map_to_root オプションを on にします。

head1> options wafl.nt_admin_priv_map_to_root on

cifs setup コマンドを実行します。

head1> cifs setup
This process will enable CIFS access to the filer from a Windows(R) system.
Use "?" for help at any prompt and Ctrl-C to exit without committing changes.

        Your filer does not have WINS configured and is visible only to
        clients on the same subnet.
Do you want to make the system visible via WINS? [n]:
        A filer can be configured for multiprotocol access, or as an NTFS-only
        filer. Since multiple protocols are currently licensed on this filer,
        we recommend that you configure this filer as a multiprotocol filer

(1) Multiprotocol filer
(2) NTFS-only filer

Selection (1-2)? [1]: ★1を選択
CIFS requires local /etc/passwd and /etc/group files and default files
        will be created.  The default passwd file contains entries for 'root',
        'pcuser', and 'nobody'.
Enter the password for the root user []: ★ root の既存パスワードを入力
Retype the password: ★root の既存パスワードを入力
        The default name for this CIFS server is 'XXXX'.
Would you like to change this name? [n]: ★そのまま enter
        Data ONTAP CIFS services support four styles of user authentication.
        Choose the one from the list below that best suits your situation.

(1) Active Directory domain authentication (Active Directory domains only)
(2) Windows NT 4 domain authentication (Windows NT or Active Directory domains)
(3) Windows Workgroup authentication using the filer's local user accounts
(4) /etc/passwd and/or NIS/LDAP authentication

Selection (1-4)? [1]: 3 ★3を選択
What is the name of the Workgroup? [WORKGROUP]: ★そのまま enter
        CIFS - Starting SMB protocol...
        It is recommended that you create the local administrator account
        (V3140A\administrator) for this filer.
Do you want to create the XXXXA\administrator account? [y]: ★そのまま enter

Enter the new password for XXXXX\administrator: ★administrator のパスワードを入力
Retype the password: ★administrator のパスワードを入力

Welcome to the WORKGROUP Windows(R) workgroup

CIFS local server is running.

CIFS セッションを確認します。

head1> cifs sessions
CIFS partially enabled
Server Registers as 'XXXX' in workgroup 'WORKGROUP'
Root volume language is not set. Use vol lang.
Using Local Users authentication
====================================================
PC IP(PC Name) (user)           #shares   #files

作成した local administrator ユーザーを確認します。

head1> useradmin user list administrator
Name: administrator
Info: Built-in account for administering the filer
Rid: 500
Groups: Administrators
Full Name:
Allowed Capabilities: login-*,cli-*,api-*,security-* Password min/max age in days: 0/4294967295
Status: enabled
Linux Client による CIFS アクセス

作成した NetApp local administrator で vol0(共有名 C$) に CIFS 接続します。

# mount -t cifs -o user=administrator //192.168.1.100/C$ /mnt
Password:

core ファイルを確認し、必要に応じて取得します。

# cd /mnt/etc/crash

ssram ディレクトリを確認し、必要に応じて全てのファイルを取得します。

# cd /mnt/etc/log/ssram
CIFS の無効化手順

Linux Client 側で下記ファイルを削除します。必ず mount した NetApp /vol/vol0/etc 配下で実施します。

# pwd
/mnt/etc

"passwd""group""cifs*""usermap.cfg"ファイルを削除します。

# rm passwd group cifs* usermap.cfg

アンマウントします。

# cd /
# umount -l /mnt

Netapp 側で CIFS を無効化します。CIFS をシャットダウンします。

head1> cifs terminate
CIFS local server is shutting down...

CIFS local server has shut down...

wafl.nt_admin_priv_map_to_root オプションを off にします。

head1> options wafl.nt_admin_priv_map_to_root off

CIFS を再起動できない事を確認します。

head1> cifs restart
CIFS not configured.  Use "cifs setup" to configure

Windows PowerShell で NetApp を制御

$
0
0

NetApp を Windows PowerShell により制御する事が可能です。
詳細は NetApp PowerShell Survival Guide をご参照ください。

検証環境
  • Windows Server 2008R2 Datacenter
  • Ontap Data ONTAP 8.1.0 Simulator
  • VMware Workstation 9.0.1 build-894247
PowerShell Library のダウンロード

Now にアクセスし[DataONTAP.ZIP]をダウンロードします。ファイルを展開後、以下に配置します。

C:\Windows\System32\WindowsPowerShell\v1.0\Modules\DataONTAP
実行ポリシーの変更

PowerShell スクリプトの実行ポリシーを変更します。

> Set-ExecutionPolicy RemoteSigned

実行ポリシーの変更
実行ポリシーは、信頼されていないスクリプトからの保護に役立ちます。実行ポリ
のヘルプ トピックで説明されているセキュリティ上の危険にさらされる可能性があ
[Y] はい(Y)  [N] いいえ(N)  [S] 中断(S)  [?] ヘルプ (既定値は "Y"): y
Data ONTAP モジュールのインストール

モジュールファイルをインストールします。

> Import-Module DataOnTap

Data ONTAP モジュールが正常にロードされた事を確認します。

> get-module

ModuleType Name                      ExportedCommands
---------- ----                      ----------------
Manifest   DataOnTap                 {Invoke-NaSnapmirrorThrottle, Resume-NcJob, Get-NaSystemInfo, Add-NaLice...
NetApp の制御

NetApp コントローラーに接続します。

> Connect-NaController 192.168.1.51 -cred root

Name                 Address           Ontapi   Version
----                 -------           ------   -------
192.168.1.51         192.168.1.51      1.17     NetApp Release 8.1.1X34 7-Mode: Thu May 31 21:30:59 PDT 2012

アグリゲートの状態を確認します。

> Get-NaAggr

Name            State       TotalSize  Used  Available Disks RaidType RaidSize MirrorStatus     FilesUsed FilesTotal
----            -----       ---------  ----  --------- ----- -------- -------- ------------     --------- ----------
aggr0           online       900.0 MB   99%     6.2 MB   3   raid_dp     16    unmirrored              96        30k
aggr1           online         2.6 GB    0%     2.6 GB   5   raid_dp     16    unmirrored              96        31k

ボリュームの状態を確認します。

> Get-NaVol

Name                      State       TotalSize  Used  Available Dedupe  FilesUsed FilesTotal Aggregate
----                      -----       ---------  ----  --------- ------  --------- ---------- ---------
vol0                      online       808.9 MB   17%   669.9 MB  True          5k        26k aggr0
vol1                      online       100.0 MB    0%    99.8 MB  True          96         3k aggr1
vol2                      online       100.0 MB    0%    99.8 MB  True          96         3k aggr1

各ボリュームの重複排除効果を確認します。

> get-navolsis | Format-table -autosize

CompressSaved DedupSaved LastOperationBegin           LastOperationEnd             LastOperationError LastOperationSize PercentageSaved PercentCompressSaved PercentDedupSaved PercentTotalSaved
------------- ---------- ------------------           ----------------             ------------------ ----------------- --------------- -------------------- ----------------- -----------------
            0    6926336 Thu Jan 24 14:17:29 JST 2013 Thu Jan 24 14:21:58 JST 2013                            147582976               4                    0                 4                 4
            0          0 Thu Jan 24 15:23:56 JST 2013 Thu Jan 24 15:24:43 JST 2013                                    0               0                    0                 0                 0
            0          0 Thu Jan 24 15:24:00 JST 2013 Thu Jan 24 15:24:56 JST 2013                                    0               0                    0                 0                 0
スクリプトによる自動化

各ボリュームの重複排除効果を出力するスクリプト例になります。

$netapp = "192.168.1.51"
$user = "root"
$pass = "password"

#-------------------------------------------------------------------------
# function Sis-Status
#-------------------------------------------------------------------------
function Sis-Status()
{
   $outfile = "C:\logs\sis_status.log"
   $logdata = "Get-NaSis"
   $logdata | out-file $outfile -append
   Get-Date -Format g >> $outfile
   Get-NaVol | select @{Name="Volume"    ; Exp={$_.name}}, 
                      @{Name="Total(MB)" ; Exp={[math]::Truncate(($_ | Get-NaVol).TotalSize/1MB)}},
                      @{Name="Used(%)"   ; Exp={($_ | Get-NaVol).Used}},
                      @{Name="Avail(MB)" ; Exp={[math]::Truncate(($_ | Get-NaVol).Available/1MB)}},
                      @{Name="Saved(MB)" ; Exp={[math]::Round(($_ | Get-NaVolSis).SizeSaved/1MB,2)}},
                      @{Name="Saved(%)"  ; Exp={($_ | Get-NaVolSis).PercentTotalSaved}} | 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
#-------------------------------------------------------------------------
Sis-Status

タスクスケジューラに登録する事で、定期的に自動で実行可能です。
プログラム/スクリプトと引数を下記のとおり指定します。

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

-file "C:\scripts\get_sis_status.ps1"

タスクスケジューラの具体的な登録手順については、こちらをご参照頂ければ幸いです。

NetApp ディスクの手動 fail について

$
0
0

NetApp では disk を明示的に fail する事が可能です。システム上は問題ないと判断されている disk において、何らかの不具合が懸念される場合等に有効です。本例では、仮想ディスク[v5.18]を fail してみます。

ディスクの手動 fail

仮想ディスク[v5.18]が aggr0 で使用している事を確認します。

node1> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)
  Plex /aggr0/plex0 (online, normal, active)
    RAID group /aggr0/plex0/rg0 (normal, block checksums)

      RAID Disk Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
      --------- ------  ------------- ---- ---- ---- ----- --------------    --------------
      dparity   v5.16   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      parity    v5.17   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      data      v5.18   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

Spare disks

RAID Disk       Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------       ------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare           v5.19   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.20   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.21   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.22   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.24   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.25   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.26   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.27   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.28   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.29   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.32   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

"disk fail"コマンドにより[v5.18]を手動 fail します。

node1> disk fail v5.18
*** You are about to prefail the following file system disk, ***
*** which will eventually result in it being failed ***
  Disk /aggr0/plex0/rg0/v5.18

      RAID Disk Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
      --------- ------  ------------- ---- ---- ---- ----- --------------    --------------
      data      v5.18   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
***
Really prefail disk v5.18? y
disk fail: The following disk was prefailed: v5.18
Disk v5.18 has been prefailed.  Its contents will be copied to a
replacement disk, and the prefailed disk will be failed out.

コマンドを実行すると[v5.18]のデータが、spare disk[v5.19]にコピーされます。

node1> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)
  Plex /aggr0/plex0 (online, normal, active)
    RAID group /aggr0/plex0/rg0 (normal, block checksums)

      RAID Disk Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
      --------- ------  ------------- ---- ---- ---- ----- --------------    --------------
      dparity   v5.16   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      parity    v5.17   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      data      v5.18   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448 (prefail, copy in progress)
      -> copy   v5.19   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448 (copy 1% completed)

Spare disks

RAID Disk       Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------       ------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare           v5.20   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.21   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.22   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.24   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.25   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.26   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.27   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.28   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.29   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.32   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

コピーが完了すると[v5.19]が aggr0 に参加[v5.18]は Broken disk として認識されます。

node1> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)
  Plex /aggr0/plex0 (online, normal, active)
    RAID group /aggr0/plex0/rg0 (normal, block checksums)

      RAID Disk Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
      --------- ------  ------------- ---- ---- ---- ----- --------------    --------------
      dparity   v5.16   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      parity    v5.17   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      data      v5.19   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

Spare disks

RAID Disk       Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------       ------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare           v5.20   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.21   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.22   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.24   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.25   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.26   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.27   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.28   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.29   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.32   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

Broken disks

RAID Disk       Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------       ------  ------------- ---- ---- ---- ----- --------------    --------------
admin failed    v5.18   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
ディスクの unfaill

advance mode へ移行します。

node1> priv set advanced
Warning: These advanced commands are potentially dangerous; use them only when directed to do so by NetApp personnel.

unfail は "disk unfail"コマンドにより行います。

node2*> disk unfail v5.18
disk unfail: unfailing disk v5.18...

non-advanced mode へ復帰します。

node2*> priv set

[v5.18]が spare ディスクとして認識されます。

node1> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)
  Plex /aggr0/plex0 (online, normal, active)
    RAID group /aggr0/plex0/rg0 (normal, block checksums)

      RAID Disk Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
      --------- ------  ------------- ---- ---- ---- ----- --------------    --------------
      dparity   v5.16   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      parity    v5.17   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      data      v5.19   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

Spare disks

RAID Disk       Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------       ------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare           v5.18   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448 (not zeroed)
spare           v5.20   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.21   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.22   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.24   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.25   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.26   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.27   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.28   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.29   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.32   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

必要に応じてディスクの zeroing を実行します。

node1> disk zero spares

node1> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)
  Plex /aggr0/plex0 (online, normal, active)
    RAID group /aggr0/plex0/rg0 (normal, block checksums)

      RAID Disk Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
      --------- ------  ------------- ---- ---- ---- ----- --------------    --------------
      dparity   v5.16   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      parity    v5.17   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
      data      v5.19   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

Spare disks

RAID Disk       Device  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------       ------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare           v5.18   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448 (zeroing, 3% done)
spare           v5.20   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.21   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.22   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.24   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.25   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.26   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.27   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.28   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.29   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448
spare           v5.32   v5    ?   ?   FC:B   -  FCAL 15000 1020/2089984      1027/2104448

Ontap シュミレーターで SnapDrive for Windows を試す

$
0
0

SnapDrive とは

仮想ディスクの追加、削除、マッピング等を、Netapp からではなく、Windows サーバーから対話形式のウィザードで行う事が可能です。そのため、NetApp の操作方法を知らなくても、ストレージ管理を容易に実施する事が可能となります。

SnapDrive インストール

Windows Server 2008R2 へ、SnapDrive6.4.2_x64 をインストールする際のポイントになります。

Windows Server 2008R2

インストーラー[SnapDrive6.4.2_x64.exe]を使用してインストールします。
license type は[Per Storage System]を指定します。

f:id:FriendsNow:20130414071015p:plain:w500

サーバーのローカルアカウントを[Domain Name\User Name]の形式で指定します。
f:id:FriendsNow:20130414071025p:plain:w500

Transport Protocol を HTTP に指定します。NetApp の root パスワードを指定します。
f:id:FriendsNow:20130414071031p:plain:w500

Ontap シュミレーター

Ontap シュミレーターで License を登録し、HTTP アクセスを有効にします。

snapmanagerexchange のライセンスを有効にします。

> license add XXXXXXX

同時に snapdrive_windows が有効になります。

> license
<...snip...>
   snapdrive_windows ENABLED
   snapmanagerexchange site XXXXXXX
<...snip...>

HTTP アクセスを有効にします。

ontap> options httpd.admin.enable on
ontap> options httpd.admin

SnapDrive による仮想ディスクの作成

SnapDrive を使用して、仮想ディスクを作成してみます。

SnapDrive

左ペインから Disks を選択後、右の操作ペインから[Create Disk]をクリックします。
f:id:FriendsNow:20130414071141p:plain:w500

[Next]をクリックします。
f:id:FriendsNow:20130414071152p:plain:w500

Storage System(Ontap シュミレータ)を指定し[Add]をクリックします。
f:id:FriendsNow:20130414071158p:plain:w500

Lun Name を設定し[Next]をクリックします。※既存の Lun Name は設定できません。
f:id:FriendsNow:20130414071207p:plain:w500

Lun Type を選択し[Next]をクリックします。
f:id:FriendsNow:20130414071214p:plain:w500

各種パラメータを指定し[Next]をクリックします。
f:id:FriendsNow:20130414071228p:plain:w500

iSCSI イニシエーターを選択し[Next]をクリックします。
f:id:FriendsNow:20130414071237p:plain:w500

iGroup の登録方法を選択し[Next]をクリックします。
f:id:FriendsNow:20130414071245p:plain:w500

内容を確認後[Finish]をクリックします。
f:id:FriendsNow:20130414071253p:plain:w500

LUN が NetApp 上に作成されます。
f:id:FriendsNow:20130414071536p:plain:w500

Windows Server 上にローカルディスク(E:)が追加されます。
f:id:FriendsNow:20130414071543p:plain:w500

Ontap シュミレーター

lun3 が作成されている事を確認します。

> lun show /vol/vol2/lun3
        /vol/vol2/lun3              70.6m (74027520)      (r/w, online, mapped)

igroup が作成されている事を確認します。

> igroup show
    viaRPC.iqn.1991-05.com.microsoft:vcenter4 (iSCSI) (ostype: windows):
        iqn.1991-05.com.microsoft:vcenter4 (logged in on: e0a)

igroup が lun3 に紐づいている事を確認します。

> lun show -m
LUN path                            Mapped to          LUN ID  Protocol
-----------------------------------------------------------------------
/vol/vol2/lun3                      viaRPC.iqn.1991-05.com.microsoft:vcenter4        0     iSCSI

Space reservation を無効化します。

> lun set reservation /vol/vol2/lun3 disable

Space reservation の状態を確認します。

> lun set reservation /vol/vol2/lun3
Space Reservation for LUN /vol/vol2/lun3 (inode 11424): disabled

SnapDrive のトラブルシューティング

以下、SnapDrive 使用時のトラブル事例と対処方法になります。

LUN を作成できない場合の対処方法

LUN を作成する際、下記エラーが出力される場合があります。

Transport Protocol is not set to connect the storage system "strorage system".

f:id:FriendsNow:20130414071612p:plain:w500

Transport Protocol Settings の Default を定義すると解決する可能性があります。
f:id:FriendsNow:20130414071601p:plain:w500

LUN に接続できない場合の対処方法

SnapDrive で一度 Disconnect した Lun を Re-Connect する際、下記エラーが出力される場合があります。

The LUN has SCSI reservation but has not been mapped. 
You can clear the SCSI reservation by using command 'lun persistent_resv clear' at storage system. 

対処方法として、メッセージにあるように Persistent をクリアします。

> priv set advanced
*> lun persistent_resv clear /vol/vol2/lun3
*> lun persistent_resv show /vol/vol2/lun3
 No reservations found for this lun

解決しない場合は、対象の lun を抱えている vol の offline/online で解決する可能性があります。
※注意が必要です。実施前にベンダ等への確認をお勧めします。

> vol offline vol2
Volume 'vol2' is now offline.

> vol online vol2
Volume 'vol2' is now online.

(参考)
https://communities.netapp.com/message/96768

NetApp SNMP Traphost 設定方法

$
0
0

例えば、重複排除処理が失敗した場合、AutoSupport では失敗を通知する事はできませんが、SNMP の TRAP で通知する事は可能です。以下、SNMP の設定手順になります。

SNMP を有効にします。

> options snmp.enable on

SNMP コミュニティを設定します。

> snmp community add ro "コミュニティ名"

SNMP Traphost を設定します。

> snmp traphost add "SNMP Traphost"

Authentication Trap コマンドの使用を有効にします。

> snmp authtrap 1

SNMP Daemon を有効にします。※実行したタイミングで Cold Start が Trap されます。

> snmp init 1

設定内容を確認します。

> snmp
contact:

location:

authtrap:
        1
init:
        1
traphosts:
        192.168.1.100 (192.168.1.100) <192.168.1.100>
community:
        ro public

Autosupport を送信したタイミングで Trap するため Trap を試験する時に便利です。

> options autosupport.doit TRAP-TEST

ONTAP 8.2 シュミレーター(Cluster-Mode)初期セットアップ

$
0
0

ONTAP 8.2 シュミレーターがリリースされていたので試してみました。
今回は、汎用性の高い仕様に変更され、注目が高まっている Cluster-Mode を使用します。
7-Mode の初期セットアップ方法については、こちらをご参照頂けますと幸いです。

7-Mode と Cluster-Mode の違い
  • 7-Mode
    • スケールアップ型のアーキテクチャ
    • コントローラーとディスクを搭載したシェルフが分離した構造が前提。
    • パフォーマンスを強化する場合は、より高速なコントローラーに「スケールアップ」する。*1
  • Cluster-Mode
    • スケールアウト型のアーキテクチャ
    • コントローラーを「スケールアウト」し、パフォーマンスを強化する事が可能。
    • 新旧のモデル(旧モデルは、2世代前までを推奨)をクラスターに同居させることが可能。
First Node のセットアップ(例)

初期 boot の手順は、7-Modeと同様になります。

クラスタを作成します。

Welcome to the cluster setup wizard.
You can enter the following commands at any time:
"help" or "?" - if you want to have a question clarified,
"back" - if you want to change previously answered questions, and
"exit" or "quit" - if you want to quit the cluster setup wizard.
Any changes you made before quitting will be saved.
You can return to cluster setup at any time by typing "cluster setup".
To accept a default or omit a question, do not enter a value.
Do you want to create a new cluster or join an existing cluster?
{create}: create

デフォルトの値を使用するため、Enter を実行します。

System Defaults:
Private cluster network ports [e0a].
Cluster port MTU values will be set to 1500.
Cluster interface IP addresses will be automatically generated.
Do you want to use these defaults? {yes, no} [yes]: <Enter>

クラスタ名[cluster1]を設定します。

It can take several minutes to create cluster interfaces...
Step 1 of 5: Create a Cluster
You can type "back", "exit", or "help" at any question.
Enter the cluster name: cluster1

license key を入力し実行します。*2

Enter the cluster base license key: 

クラスタ管理ポート及び、アドレスを設定します。

Enter the cluster management interface port [e0c]: e0c
Enter the cluster management interface IP address: 192.168.1.50
Enter the cluster management interface netmask: 255.255.255.0
Enter the cluster management interface default gateway: 192.168.1.2
A cluster management interface on port e0c with IP address 192.168.1.50 has been created.
You can use this address to connect to and manager the cluster.
Enter the DNS domain names: <Enter>

SFO(Storage Failover)情報であるロケーション[lab]を設定します。

Where is the controller located []: lab

ノード管理ポート及び、アドレスを設定します。

Enter the node management interface port [e0c]: <Enter>
Enter the node management interface IP address: 192.168.1.53
Enter the node management interface netmask: 255.255.255.0
Enter the node management interface default gateway: <Enter>
A node management interface on port e0c with IP address 192.168.1.53
has been created.

以上でセットアップは完了です。

You can access your cluster to complete these tasks by:
1) Using the NetApp System Manager to manage cluster cluster1 at 192.168.1.50.
NetApp System Manager must be at version 2.0 or above.
You can download System Manager from http://support.netapp.com
2) Logging in to the cluster by using SSH (secure shell) from your work station:
ssh admin@192.168.1.50

"cluster show"コマンドで、クラスタ情報を確認します。

cluster1::> cluster show
Node                  Health  Eligibility
--------------------- ------- ------------
cluster1-01           true    true

下記コマンドで、使用可能なディスクをノードに追加します。

cluster1::> storage disk assign -all true -node cluster1-01
Second Node セットアップ(例)

Serial Number 及び、System ID を変更します。*3

[シリアルポート]の[Named Pipe]を \\.\pipe\vsim-cm-N2-cons へ変更します。
f:id:FriendsNow:20130707235031p:plain:w500

[シリアルポート2]の[Named Pipe]を \\.\pipe\vsim-cm-N2-gdb へ変更します。
f:id:FriendsNow:20130707235039p:plain:w500

ONTAP を起動後即時に Space key を押下し、VLOADER>プロンプトを確認します。

Serial Number 及び System ID を変更します。

VLOADER> setenv SYS_SERIAL_NUM 4034389-06-2
VLOADER> setenv bootarg.nvram.sysid 4034389062

Serial Number 及び System ID を確認します。

VLOADER> printenv SYS_SERIAL_NUM
VLOADER> printenv bootarg.nvram.sysid

新しい Serial Number 及び System ID で起動します。

VLOADER> boot

初期 boot の手順は、7-Modeと同様になります。

First Node セットアップ時に作成したクラスタ[Cluster1]へ join します。

Welcome to the cluster setup wizard.
You can enter the following commands at any time:
"help" or "?" - if you want to have a question clarified,
"back" - if you want to change previously answered questions, and
"exit" or "quit" - if you want to quit the cluster setup wizard.
Any changes you made before quitting will be saved.
You can return to cluster setup at any time by typing "cluster setup".
To accept a default or omit a question, do not enter a value.
Do you want to create a new cluster or join an existing cluster?
{join}: join

デフォルトの値を使用するため、Enter を実行します。

System Defaults:
Private cluster network ports [e0a].
Cluster port MTU values will be set to 1500.
Cluster interface IP addresses will be automatically generated.
Do you want to use these defaults? {yes, no} [yes]: <Enter>

join するクラスタを選択し Enter を実行します。

It can take several minutes to create cluster interfaces...
Step 1 of 3: Join an Existing Cluster
You can type "back", "exit", or "help" at any question.
Enter the name of the cluster you would like to join [cluster1]:
<Enter>

ノード管理ポート及び、アドレスを設定します。

Step 3 of 3: Set Up the Node
You can type "back", "exit", or "help" at any question.
Enter the node management interface port [e0c]: <Enter>
Enter the node management interface IP address: 192.168.1.54
Enter the node management interface netmask [255.255.255.0]: <Enter>
Enter the node management interface default gateway: <Enter>

以上でセットアップは完了です。

A node management interface on port e0c with IP address 192.168.1.54 has been created.
Cluster setup is now complete.
To begin storing and serving data on this cluster, you must complete the following additional tasks if they have not already been completed:
1) Join additional nodes to the cluster by running "cluster setup" on those nodes.
2) If in a HA configuration, verify that storage failover is enabled by running the "storage failover show" command.
3) Create a Vserver by running the "vserver setup" command.
You can access your cluster to complete these tasks by:
1) Using the NetApp System Manager to manage cluster cluster1 at 192.168.1.54.
NetApp System Manager must be at version 2.0 or above.
You can download System Manager from http://support.netapp.com
2) Logging in to the cluster by using SSH (secure shell) from your work station:
ssh admin@192.168.1.50

"cluster show"コマンドで、クラスタ情報を確認します。

cluster1::> cluster show
Node                  Health  Eligibility
--------------------- ------- ------------
cluster1-01           true    true
cluster1-02           true    true
2 entries were displayed.

下記コマンドで、使用可能なディスクをノードに追加します。

cluster1::> storage disk assign -all true -node cluster1-01

*1:容量を増やす場合は、シェルフを追加し対応する。

*2:シュミレーターをダウンロードする URL にあります。

*3:Serial Number と System ID はクラスタ内の各ノードでユニークである必要があります。


NetApp の Config バックアップ・リストアについて

$
0
0

システム障害によるデータ損失に備え、volume 内のデータは SnapMirror 等でバックアップを取りますが、コントローラー及び、volume の一部の設定情報については、config コマンドでバックアップ・リストアが可能です。
(参考)PROFESSIONAL SERVICE TECH NOTE #034

なお、下記の情報については対象外となりますのでご注意ください。

  • vol options
ignore_inconsistent, guarantee, svo_enable, svo_checksum, svo_allow_rman, svo_reject_errors
fractional_reserve, try_first, snapshot_clone_dependency, dlog_hole_reserve, nbu_archival_snap
  • etc 配下の下記ファイル
asup_content.conf, asuptriggers.conf, asuptriggers.sample, filersid.cfg, krb5関連ファイル
qual_devices, rlm_config_to_filer, services, rmtab, snmppersist.conf
バックアップ手順

config dump -v "任意のファイル名"で、設定ファイルを保存します。

> config dump -v config01.cfg

設定ファイルは、/etc/cofnigs 配下へ保存されます。

> priv set advanced
> ls /etc/configs
.
..
config_saved
config01.cfg
config02.cfg

必要に応じてサーバで vol0 をマウントし、生成されたファイルを取得します。

# mount -t nfs 192.168.1.51:/vol/vol0 /mnt
# cp -p /mnt/etc/configs/config*.cfg /tmp

設定ファイルを複数保存した場合、config diff コマンドで差分を確認できます。

> config diff config01.cfg config02.cfg
## changed
< file.contents.exports=\\
/vol/vol0       -sec=sys,rw,anon=0,nosuid
/vol/vol1       -sec=sys,rw,nosuid
/vol/vol2       -sec=sys,rw,nosuid
/vol/vol0/home  -sec=sys,rw,nosuid
\\
---
> file.contents.exports=\\
/vol/vol0/home  -sec=sys,rw,nosuid
\\
リストア手順

config dump -v "保存ファイル名"で、設定をリストアします。

> config dump -v config01.cfg

TeraTerm マクロ例

$
0
0

踏み台サーバー(192.168.1.100)を経由して、複数の NetApp の aggregate と volume の使用量を収集するマクロです。任意の Host(192.168.1.101-105)に、巡回アクセスして "df -Ag"と "df -h"を実行します。

connect '192.168.1.100 /ssh /auth=password /user=root /passwd=default'
wait '$'

;================ logopen ================
getdir DIR
getdate DATE
gettime TIME
strcopy TIME 1 2 HH
strcopy TIME 4 2 MM
strcopy TIME 7 2 SS
LOG = DIR
strconcat LOG '\'
strconcat LOG DATE
strconcat LOG '_'
strconcat LOG HH
strconcat LOG MM
strconcat LOG SS
strconcat LOG '_'
strconcat LOG 'netapp.log'
logopen LOG 0 1

;================ login ================
sendln
wait '$'
for i 1 1           ※192.168.1.101 でのみ実行したい場合
;for i 1 5          ※192.168.1.101-105 で実行したい場合
  if i =  1 then
    HOST = '192.168.1.101'
  elseif i =  2 then
    HOST = '192.168.1.102'
  elseif i =  3 then
    HOST = '192.168.1.103'
  elseif i =  4 then
    HOST = '192.168.1.104'
  elseif i =  5 then
    HOST = '192.168.1.105'
  endif
  PR = HOST
  strconcat PR '> '
  sendln 'ssh -l root ' HOST
  wait 'password:'
  sendln 'default'
  wait PR
;================ command ================
  sendln 'df -Ag'
  wait PR
  sendln 'df -h' 
  wait PR
;================ logout =================
  sendln 'logout telnet'
  wait '$'
next

;================ logclose ================
logclose
sendln 'exit'

NetApp sysstat コマンドについて

$
0
0
sysstat とは
  • DataONTAP 標準の性能関連情報表示コマンド
    • CPU 使用率、プロトコル毎の統計情報、Network Throughput、Disk Read/Write、CP 等を表示する。
    • FAS の利用状況の概要を確認する事が可能。
>sysstat -x <interval(sec)>
  • マルチプロセッサ CPU の使用率の統計を下記コマンドで出力可能
    • 1つ以上の CPU がビジ―状態である時間の割合及び、平均値と各プロセッサの個別の状況を表示する。
>sysstat -m <interval(sec)>
sysstat -x 1 の出力例
  • Disk Util
    • アクセス率の最も高いディスクの利用率(%)
    • 70%-80% 超えが連続する場合は Disk ボトルネックの兆候
  • CPU
    • Interval 内で1つ以上の CPU が busy であった割合(マルチプロセッサの場合は、最も busy な CPU 値)
    • 常時90%以上の場合は、CPU ボトルネックの可能性大
  • cache hit
    • 要求したデータブロックがキャッシュ内に存在した割合(90%以上であれば問題なし)
    • アプリケーション特性に依存
> sysstat -x 1
 CPU    NFS   CIFS   HTTP   Total     Net   kB/s    Disk   kB/s    Tape   kB/s  Cache  Cache    CP  CP  Disk   OTHER    FCP  iSCSI     FCP   kB/s   iSCSI   kB/s
                                       in    out    read  write    read  write    age    hit  time  ty  util                            in    out      in    out
  1%      0      0      0       5       0      1       0      0       0      0   >60    100%    0%  -     0%       5      0      0       0      0       0      0
  1%      0      0      0       0       0      0       0      0       0      0   >60    100%    0%  -     0%       0      0      0       0      0       0      0
 33%      0      0      0       0       0      0     505    569       0      0   >60    100%   66%  T    88%       0      0      0       0      0       0      0
CP(Consistency Point)とは
  • NVRAM に書き込み待機されているデータを Disk へ書き込む(フラッシュ)処理
  • CP ty とは
    • CP 要求のトリガー、10秒間隔で定期的に実行し、Interval に処理が完了したか等を表示。
    • CP 処理が滞るとユーザーサービスに影響がでてくる可能性がある。
    • 連続した CP は NVRAM 容量の不足ではなく、書き込み先 Disk がボトルネックである可能性がある。
CP ty 処理出力表示説明
  • 「-」:取得間隔内に CP の開始がなかった場合
  • 「Number」: 取得間隔内に複数の CP が開始された場合の数を表示*1
  • 「B」: 連続 CP - 1つ目の CP が完了する前にもう一方の NVRAM からの CP が発生*2
  • 「b」: 保留された連続 CP - 更新されたバッファが少なかったため、連続 CP を延期*3
  • 「F」: NVlog がフル状態になることによって発生した CP*4
  • 「H」: 書き込みの集中により、メモリにキャッシュされたデータ量が閾値を上回り発生した CP
  • 「L」: メモリの内の使用可能な領域が閾値を下回り発生した CP
  • 「S」: Snapshot 作成によって発生した CP
  • 「T」: タイマーによって発生した CP(デフォルトでは、10秒で1回発生)
  • 「U」: フラッシュによって発生した CP
  • 「Z」: 内部同期により発生した CP
  • 「V」: 仮想バッファ低下により発生した CP
  • 「M」: メモリバッファがなくなるのを防ぐために発生した CP
  • 「D」: Datavecs 低下により発生した CP
  • 「:」: 前回の計測期間より継続された CP*5
  • 「#」: 前回の計測期間より CP が継続し、次の CP のための NVLog がフルの状態(次回の CP は必ず B)*6

出力されたタイプを示す文字の後には、サンプリング期間終了時の CP のフェーズを示す文字が表示される。
サンプリング期間中に CP が完了している場合は、この 2番目の文字は空白となる。

  • 「0」: 初期化中
  • 「n」: 通常ファイルの処理中
  • 「s」: 特殊ファイルの処理中(bitmap ファイル等)
  • 「q」: クォータ・ファイルの処理中
  • 「f」: 変更データのディスクへのフラッシュを実施中
  • 「v」: 変更されたスーパーブロックのディスクへのフラッシュを実施中

*1:CP が頻発しているため負荷状況を確認

*2:1つ目の CP が完了し、NVRAM の内容がクリアされるまで、書き込み処理が保留された状態(遅延の可能性あり)

*3:連続 CP 発生寸前の状態

*4:連続して発生すると処理に対して NVRAM 容量が不足していると判断できる。

*5:連続して発生する場合、ディスクへの書き込みがボトルネック

*6:継続 CP が完了し、NVRAM の内容がクリアされるまで、書き込み処理が保留された状態(遅延の可能性あり)

NetApp Route 設定について

$
0
0

NetApp へ Route を設定/削除する際の手順になります。

Static Route 追加

> route add net 192.168.1.0/24 10.1.1.254 1

Static Route 削除

> route delete 192.168.1.0

Default Route 設定

> route add default 172.16.1.254 1

Default Route 削除

> route delete default

ルーティングテーブル確認

> route -s
Routing tables

Internet:
Destination      Gateway            Flags     Refs     Use  Interface
default          172.16.1.254       UGS         3       31  e0a
10.1.1/24        link#1             UC          0        0  e0a
systemname       0:50:56:95:45:f    UHL         2       83  lo
10.1.1.254       link#1             UHL         1        0  e0a
localhost        localhost          UH          0        0  lo
192.168.1        10.1.1.254         UGS         0        0  e0a

再起動した際に設定が維持されるように、起動スクリプトへの登録も必要です。

> rdfile /etc/rc
#Auto-generated by setup Tue May 21 08:16:54 GMT 2013
hostname head01
ifconfig e0a `hostname`-e0a mediatype auto flowcontrol full netmask 255.255.255.0 mtusize 1500
route add default 172.16.1.254 1
route add net 192.168.1.0/24 10.1.1.254 1
routed on
options dns.enable off
options nis.enable off
savecore

NetApp Perfstat ツールについて

$
0
0
Perfstat とは
  • Perfstat は、FAS の詳細なパフォーマンスデータを取得する事が可能なスクリプトです。
  • NOWからダウンロードし、クライアントホスト上で実行します。
  • Data ONTAP 7G/7-Mode 用の Perfstat7 と、Cluster-Mode 用の Perfstat Converged の 2種類があります。
  • 要件として、Perfstat を実施するクライアントと FAS 間で、RSH/SSH 接続が可能である必要があります。
Perfstat 利用準備

FAS で RSH を有効化します。

> options rsh.enable
rsh.enable                   on

RSH 接続要求クライアントを定義します。

> options rsh.access
rsh.access                   all

クライアントで、rsh コマンドを実行し結果が正常に取得可能か確認します。

# rsh 192.168.1.100 -l root:password df -gs
Perfstat オプションスイッチについて
  • 「-f」:取得対象の FAS の IP アドレスまたは、ホスト名を指定します。
  • 「-p」:パフォーマンスデータのみ取得します。(構成情報は取得しません。)
  • 「-F」:ローカルホストの情報を取得しないようにします。
  • 「-t」:取得間隔(分)を指定します。
  • 「-i」:繰り返し回数を指定します。
  • 「-l」:ログイン ID 及びパスワードを指定しています。
Perfstat の実行例

クライアントホストが Linux の場合の実行例は下記のとおりです。

# ./perfstat7_20130425.sh -f 192.168.1.100 -l root:password -p -F -t 5 -i 12 > perfstat.log    

RSH 接続が FAS 側の許容量を超えている場合、下記のエラーが出力されます。

Perfstat: Filer only mode
Perfstat: Perfstat v7.39 (4-2013)
Perfstat: Verify filer rsh access
Perfstat: Filer 192.168.1.100 fails rsh test
Perfstat: Verify connectivity using: ' rsh 192.168.1.100 -n -l root:password "version"' from host

この場合、RSH のセッションを終了させる必要があります。まず、セッション情報を確認します。

> rshstat -a

Advanced モードへ移行します。

> priv set advanced
Warning: These advanced commands are potentially dangerous; use them only when directed to do so by NetApp personnel.

任意の RSH プロセスを終了します。

*> rshkill 0
rshkill: rsh session 0 was closed successfully.

NetApp ディスクボトルネックの対処方法について

$
0
0
はじめに

一般的に、HDD においては、フォーマットした状態に書き込みしていく場合、シーケンシャルな書き込みが行われますが、消去作業が繰り返されるうちに、領域が分断され、ランダムアクセスせざるを得ない状態となります。また、ヘッドを物理的に様々に移動する必要が多発するランダム I/O は、シーケンシャル I/O より性能が劣る傾向があります。*1

  • ランダムアクセスとは
    • 非連続のファイルデータの配置情報をインデックスから割出し、直接アクセスする方法

  • シーケンシャルアクセスとは
    • データを先頭から順番に記録し、読み出す場合も、先頭から順番に読み出していく方法

ランダムアクセスは、一般的にストレージに対して大きな負荷となりますが、NetApp は独自技術により、ランダム I/O をシーケンシャル I/O に変換します。具体的には、一端 NVRAM 上にデータを溜めておき、一定の間隔(デフォルト10秒)で、一気に RAID グループにストライプ書き込みを行います。そのため、ディスク上から読み込む無駄な I/O を削減する事ができ、一般的なストレージより高速な書き込みが可能となっています。

ディスクボトルネックの原因
  • ディスクの処理性能限界
    • クライアントからのディスク書き込み要求に対して、書き込める処理能力が追い付いていない状態。この場合、Back-to-Back CP が発生し、システム全体の基本性能が低下する可能性があります。具体的には、NetApp の場合、NVRAM にデータが入った時点でクライアント側へ書き込み応答をしますが、ディスクボトルネックにより、NVRAM が解放されず、ディスクボトルネックが発生していないディスク上へのアクセス要求についても待たされます。

  • 空き領域の断片化
    • ディスクに対して書き込みと削除が繰り返された結果、連続した空き領域が少なくなった状態。NVRAM からディスクへのランダムアクセスが発生し、ストレージの負荷が増加します。

  • ミスアライメント
    • WAFL*2のブロックサイズは、4KB ですが、クライアントからの要求 I/O サイズが 4KB に満たない場合。この場合、Read I/O については、ストレージから2ブロック読み出す必要がある事から2倍、Write I/O については該当ブロックを(2ブロック)を読みだした後、これをマージして、2ブロックへ部分書き込み(Partial Write)するため、4倍の負荷がかかります。
ボトルネックの確認方法
  • ディスクの性能不足
    • IOPS の実測値を、Perfstat 等で確認し、ディスクの性能を超過していないか確認します。ディスク性能についてはこちら が参考になります。ランダムアクセス前提の一例として、SAS:175 IOPS(ディスク一本あたり)とあります。これに、ディスクの本数を掛けた値がシステムで処理可能な IOPS になります。

  • 空き領域の断片化状態
    • 下記のコマンドでを確認可能です。10段階評価で、10が最も断片化が進行している状態になります。
> reallocate measure -o /vol/vol1
Reallocation scan will be started on '/vol/vol1'.
Monitor the system log for results.
> [netapp:wafl.scan.start:info]: Starting WAFL layout measurement on volume vol1.
  [netapp:wafl.reallocate.check.value:info]: Allocation measurement check on '/vol/vol1' is 1.
  • Partial Write の確認
    • perfstat の "wp.partial_write"で発生回数を確認する事が可能です。また、wafl_susp -r の "WAFL_WRITE"の Normal file の Read 回数が、All messages を占める割合で判断します。
*> wafl_susp -r
Blocks read per message type:
----------------------------
All messages:
         normal file:           283            46             4             0
<...snip...>         
WAFL_WRITE:
         normal file:           275            38             0             0
ディスクボトルネックの対策
  • ディスクの増設
    • ディスクを増設し I/O を十分に確保する事で Back-to-Back CP 発生に至るまでの負荷限界が高くなり、システム全体の基本性能が向上します。

  • リアロケート(デフラグ)処理の実施
    • 断片化が進行しているボリュームに対して、リアロケートを実施する事で新規のディスクに対しての負荷を分散します。
> reallocate start /vol/vol2
Reallocation scan will be started on '/vol/vol2'.
Monitor the system log for results.
> [netapp:wafl.scan.start:info]: Starting WAFL layout measurement on volume vol2.

> reallocate status -v
Reallocation scans are on
/vol/vol2:
        State: Checking: public inode 9474 of 32781, block 0
        Flags: whole_vol,maybe_realloc,repeat
    Threshold: 4
     Schedule: n/a
     Interval: 1 day
 Optimization: n/a
  • ブロックのズレを解消
    • 下記、パーティション開始オフセットサイズの確認方法の一例になります。
      • ESX 上から NetApp が提供する MBRtools を使って確認(scan コマンド)
      • vCenter 上から NetApp が提供する VSC を使って確認(Optimization and Migration 機能から scan)
      • 仮想マシン上の Windows OS から msinfo32.exe を実行(C:\ の開始オフセットサイズを確認)

*1:SSD ではその差がないと言われています

*2:NetApp のファイルシステム

HA コントローラ構成における NVRAM について

$
0
0

NetApp のコントローラを HA で構成した場合、各コントローラ上の NVRAM の半分がパートナーデータのミラー用として、リザーブされます。(使用できる NVRAM が 非 HA 構成と比較し 1/2 になります。)
Takeover 発生時、残ったコントローラは、このミラー用の NVRAM を使用して、ダウンコントローラの Read/Write を処理します。つまり、Takeover が発生した際には、NVRAM は縮退せず、CPU /Memory のみ縮退するという事になります。

NVRAM During Normal Mode

f:id:FriendsNow:20140111124925p:plain:w400


Clustered ONTAP の基本操作について

$
0
0
ライセンスの有効化

必要に応じてライセンスを追加します。*1

cluster1::> license add -license-code "License Code"
Aggregate の操作

Raid サイズ、Disk 数を指定して Aggregate を作成します。

cluster1::> storage aggregate create -aggregate aggr1 -raidtype raid_dp -diskcount 5 -nodes cluster1-01 -maxraidsize 22

aggr1 が作成されている事を確認します。

cluster1::> storage aggregate show
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0       5.27GB    4.44GB   16% online       1 cluster1-01      raid_dp,
                                                                   normal
aggr0_cluster1_02_0
             900MB   43.54MB   95% online       1 cluster1-02      raid_dp,
                                                                   normal
aggr1       2.64GB    2.64GB    0% online       0 cluster1-01      raid_dp,
                                                                   normal
3 entries were displayed.

disk が aggr1 にアサインされている事を確認します。

cluster1::> disk show -aggregate aggr1
                     Usable           Container
Disk                   Size Shelf Bay Type        Position   Aggregate Owner
---------------- ---------- ----- --- ----------- ---------- --------- --------
cluster1-01:v4.21    1020MB     -   - aggregate   dparity    aggr1     cluster1-01
cluster1-01:v4.22    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v4.24    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v5.19    1020MB     -   - aggregate   parity     aggr1     cluster1-01
cluster1-01:v5.20    1020MB     -   - aggregate   data       aggr1     cluster1-01
5 entries were displayed.

aggr1 に disk を1本追加します。

cluster1::> storage aggregate add-disks -aggregate aggr1 -disklist cluster1-01:v4.25

disk が追加され、aggr1 の容量が増加している事を確認する。

cluster1::> storage aggregate show
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0       5.27GB    4.44GB   16% online       1 cluster1-01      raid_dp,
                                                                   normal
aggr0_cluster1_02_0
             900MB   43.54MB   95% online       1 cluster1-02      raid_dp,
                                                                   normal
aggr1       3.52GB    3.51GB    0% online       0 cluster1-01      raid_dp,
                                                                   normal
3 entries were displayed.

disk(cluster1-01:v4.25)が aggr1 にアサインされている事を確認します。

cluster1::> disk show -aggregate aggr1
                     Usable           Container
Disk                   Size Shelf Bay Type        Position   Aggregate Owner
---------------- ---------- ----- --- ----------- ---------- --------- --------
cluster1-01:v4.21    1020MB     -   - aggregate   dparity    aggr1     cluster1-01
cluster1-01:v4.22    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v4.24    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v4.25    1020MB     -   - aggregate   data       aggr1     cluster1-01
cluster1-01:v5.19    1020MB     -   - aggregate   parity     aggr1     cluster1-01
cluster1-01:v5.20    1020MB     -   - aggregate   data       aggr1     cluster1-01
6 entries were displayed.
インターフェースグループの作成

インターフェースグループを作成します。

cluster1::> network port ifgrp create -node cluster1-01 -ifgrp a0a -distr-func ip -mode multimode
cluster1::> network port ifgrp create -node cluster1-02 -ifgrp a0a -distr-func ip -mode multimode

インターフェースグループが作成された事を確認します。

cluster1::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster1-01
         a0a        ip           02:0c:29:c4:aa:e4 none    -
cluster1-02
         a0a        ip           02:0c:29:c0:8c:8a none    -

インターフェースグループにポートを追加します。

cluster1::> network port ifgrp add-port -node cluster1-01 -ifgrp a0a -port e0d
cluster1::> network port ifgrp add-port -node cluster1-02 -ifgrp a0a -port e0d

インターフェースグループにポートが追加された事を確認します。

cluster1::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster1-01
         a0a        ip           02:0c:29:c4:aa:e4 full    e0d
cluster1-02
         a0a        ip           02:0c:29:c0:8c:8a full    e0d
2 entries were displayed.
VLAN 作成

VLAN を作成します。

cluster1::> network port vlan create -node cluster1-01 -vlan-name a0a-10
cluster1::> network port vlan create -node cluster1-02 -vlan-name a0a-10

VLAN が作成された事を確認します。

cluster1::> network port vlan show
                 Network Network
Node   VLAN Name Port    VLAN ID  MAC Address
------ --------- ------- -------- -----------------
cluster1-01
       a0a-10    a0a     10       02:0c:29:c4:aa:e4
cluster1-02
       a0a-10    a0a     10       02:0c:29:c0:8c:8a
2 entries were displayed.
フェイルオーバーグループ作成

フェイルオーバーグループを作成します。

cluster1::> network interface failover-groups create -failover-group failovergroup -node cluster1-01 -port a0a-10
cluster1::> network interface failover-groups create -failover-group failovergroup -node cluster1-02 -port a0a-10

フェイルオーバーグループが作成された事を確認します。

cluster1::> network interface failover-groups show
Failover
Group               Node              Port
------------------- ----------------- ----------
clusterwide
                    cluster1-01       a0a
                    cluster1-01       e0c
                    cluster1-02       a0a
                    cluster1-02       e0c
failovergroup
                    cluster1-01       a0a-10
                    cluster1-02       a0a-10
6 entries were displayed.
SVM(Server Virtual Machine)作成

vserver setup コマンドで SVM を作成します。

cluster1::> vserver setup
Welcome to the Vserver Setup Wizard, which will lead you through
the steps to create a virtual storage server that serves data to clients.

You can enter the following commands at any time:
"help" or "?" if you want to have a question clarified,
"back" if you want to change your answers to previous questions, and
"exit" if you want to quit the Vserver Setup Wizard. Any changes
you made before typing "exit" will be applied.

You can restart the Vserver Setup Wizard by typing "vserver setup". To accept a default
or omit a question, do not enter a value.

Vserver Setup wizard creates and configures only data Vservers.
If you want to create a Vserver with Infinite Volume use the vserver create command.

Step 1. Create a Vserver.
You can type "back", "exit", or "help" at any question.

Enter the Vserver name: svm-01
Choose the Vserver data protocols to be configured {nfs, cifs, fcp, iscsi, ndmp}: nfs, cifs, fcp, iscsi, ndmp
Choose the Vserver client services to be configured {ldap, nis, dns}: dns
Enter the Vserver's root volume aggregate [aggr1]: aggr1
Enter the Vserver language setting, or "help" to see all languages [C]:
Enter the Vserver root volume's security style {mixed, ntfs, unix} [unix]:
Vserver creation might take some time to finish....

Vserver svm-01 with language set to C created.  The permitted protocols are nfs,cifs,fcp,iscsi,ndmp.

Step 2: Create a data volume
You can type "back", "exit", or "help" at any question.

Do you want to create a data volume? {yes, no} [yes]: no

Step 3: Create a logical interface.
You can type "back", "exit", or "help" at any question.

Do you want to create a logical interface? {yes, no} [yes]: no

Step 4: Configure DNS (Domain Name Service).
You can type "back", "exit", or "help" at any question.

Do you want to configure DNS? {yes, no} [yes]: no
Error: Failed to create NFS. Reason: You do not have a valid license for "NFS". Reason: Package "NFS" is not licensed in the cluster.

Step 5: Configure NFS.
You can type "back", "exit", or "help" at any question.

Step 6: Configure CIFS.
You can type "back", "exit", or "help" at any question.

Do you want to configure CIFS? {yes, no} [yes]: no

Step 7: Configure iSCSI.
You can type "back", "exit", or "help" at any question.

Do you want to configure iSCSI? {yes, no} [yes]: no

Step 8: Configure FCP.
You can type "back", "exit", or "help" at any question.

Do you want to configure FCP? {yes, no} [yes]: no

Vserver svm-01 has been configured successfully.

SVM が作成されている事を確認します。

cluster1::> vserver show
                    Admin     Root                  Name    Name
Vserver     Type    State     Volume     Aggregate  Service Mapping
----------- ------- --------- ---------- ---------- ------- -------
cluster1    admin   -         -          -          -       -
cluster1-01 node    -         -          -          -       -
cluster1-02 node    -         -          -          -       -
svm-01      data    running   rootvol    aggr1      file    file
4 entries were displayed.
LIF(Logical Interface) 作成
  • role について
    • クラスタネットワークで使用する LIF は、cluster を定義します。
    • データ通信で使用する LIF は、data を定義します。通常、SVM 上に作成する LIF です。
    • ノード管理で使用する LIF は、node-mgmt を定義します。
    • Intercluster SnapMirror で使用する LIF は、intercluster を定義します。
    • クラスタ管理に使用する LIF は、cluster-mgmt を定義します。

iSCSI 用の LIF を作成します。

cluster1::> network interface create -vserver svm-01 -lif lif-iscsi01 -role data -data-protocol iscsi -home-node cluster1-01 -home-port a0a-10 -address 172.16.10.11 -netmask 255.255.255.0
cluster1::> network interface create -vserver svm-01 -lif lif-iscsi02 -role data -data-protocol iscsi -home-node cluster1-02 -home-port a0a-10 -address 172.16.10.12 -netmask 255.255.255.0

iSCSI 用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-iscsi01,lif-iscsi02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-iscsi01  up/up    172.16.10.11/24    cluster1-01   a0a-10  true
            lif-iscsi02  up/up    172.16.10.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

NFS 用の LIF を作成します。NFS の LIF はマイグレートが可能です。

cluster1::> network interface create -vserver svm-01 -lif lif-nfs01 -role data -data-protocol nfs -home-node cluster1-01 -home-port a0a-10 -address 172.16.20.11 -netmask 255.255.255.0 -failover-group failovergroup
cluster1::> network interface create -vserver svm-01 -lif lif-nfs02 -role data -data-protocol nfs -home-node cluster1-02 -home-port a0a-10 -address 172.16.20.12 -netmask 255.255.255.0 -failover-group failovergroup

NFS 用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-10  true
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

LIF の詳細情報を確認する際は、-instance オプションを使用します。

cluster1::> network interface show -lif lif-iscsi01 -instance

                    Vserver Name: svm-01
          Logical Interface Name: lif-iscsi01
                            Role: data
                   Data Protocol: iscsi
                       Home Node: cluster1-01
                       Home Port: a0a-10
                    Current Node: cluster1-01
                    Current Port: a0a-10
              Operational Status: up
                 Extended Status: -
                         Is Home: true
                 Network Address: 172.16.10.11
                         Netmask: 255.255.255.0
             Bits in the Netmask: 24
                 IPv4 Link Local: -
              Routing Group Name: d172.16.99.0/24
           Administrative Status: up
                 Failover Policy: disabled
                 Firewall Policy: data
                     Auto Revert: false
   Fully Qualified DNS Zone Name: none
         DNS Query Listen Enable: false
             Failover Group Name:
                        FCP WWPN: -
                  Address family: ipv4
                         Comment: -

LIF の設定を変更する際は、modefy コマンドを使用します。

cluster1::> network interface modify -vserver svm-01 -lif lif-iscsi01 -address 172.16.100.11

CIFS 用の LIF を作成します。

cluster1::> network interface create -vserver svm-01 -lif lif-cifs01 -role data -data-protocol cifs -home-node cluster1-01 -home-port a0a-10 -address 172.16.30.11 -netmask 255.255.255.0
cluster1::> network interface create -vserver svm-01 -lif lif-cifs02 -role data -data-protocol cifs -home-node cluster1-02 -home-port a0a-10 -address 172.16.30.12 -netmask 255.255.255.0

CIFS 用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-cifs01,lif-cifs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-cifs01   up/up    172.16.30.11/24    cluster1-01   a0a-10  true
            lif-cifs02   up/up    172.16.30.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

LIF をマイグレート*2します。
※iSCSI の LIF では、マイグレートをサポートしていません。

cluster1::> network interface migrate -vserver svm-01 -lif lif-nfs01 -dest-node cluster1-02 -dest-port a0a-10

lif-nfs01 の Home Node が cluster1-01 から cluster1-02 へ移行した事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-02   a0a-10  false
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

LIF をリバート*3します。

cluster1::> network interface revert -vserver svm-01 -lif lif-nfs01

lif-nfs01 の Home Node が cluster1-02 から cluster1-01 へ戻った事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-10  true
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  true
2 entries were displayed.

SVM 上の全ての LIF を Home Port に戻す際は、lif_name を指定せず * を入力します。

cluster1::> network interface revert -vserver svm-01 *
LIF に適用している VLAN の変更

VLAN-id 20 を定義します。

cluster1::> network port vlan create -node cluster1-01 -vlan-name a0a-20
cluster1::> network port vlan create -node cluster1-02 -vlan-name a0a-20

VLAN が作成された事を確認します。

cluster1::> network port vlan show
                 Network Network
Node   VLAN Name Port    VLAN ID  MAC Address
------ --------- ------- -------- -----------------
cluster1-01
       a0a-10    a0a     10       02:0c:29:c4:aa:e4
       a0a-20    a0a     20       02:0c:29:c4:aa:e4
cluster1-02
       a0a-10    a0a     10       02:0c:29:c0:8c:8a
       a0a-20    a0a     20       02:0c:29:c0:8c:8a
4 entries were displayed.

LIF(lif-nfs)の home-port を VLAN 20 に指定します。

cluster1::> network interface modify -vserver svm-01 -lif lif-nfs01 -home-node cluster1-01 -home-port a0a-20
cluster1::> network interface modify -vserver svm-01 -lif lif-nfs02 -home-node cluster1-02 -home-port a0a-20

現状は、home-port が VLAN 10 となっている事を確認します。

cluster1::> network interface show -lif lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-10  false
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-10  false
2 entries were displayed.

home-port を VLAN20 へ移行します。

cluster1::> network interface migrate -vserver svm-01 -lif lif-nfs01 -dest-node cluster1-01 -dest-port a0a-20
cluster1::> network interface migrate -vserver svm-01 -lif lif-nfs02 -dest-node cluster1-02 -dest-port a0a-20

home-port が VLAN20 へ移行した事を確認します。

cluster1::> network interface show lif-nfs01,lif-nfs02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
svm-01
            lif-nfs01    up/up    172.16.20.11/24    cluster1-01   a0a-20  true
            lif-nfs02    up/up    172.16.20.12/24    cluster1-02   a0a-20  true
2 entries were displayed.
ルーティング設定*4

SVM-01 にデフォルトルートを設定します。

cluster1::> network routing-groups route create -vserver svm-01 -routing-group d172.16.10.0/24 -destination 0.0.0.0/0 -gateway 172.16.10.254

SVM-01 のルーティングテーブルを確認します。

cluster1::> network routing-groups route show
          Routing
Vserver   Group     Destination     Gateway         Metric
--------- --------- --------------- --------------- ------
cluster1
          c192.168.1.0/24
                    0.0.0.0/0       192.168.1.2     20
cluster1-01
          n192.168.1.0/24
                    0.0.0.0/0       192.168.1.2     10
cluster1-02
          n192.168.1.0/24
                    0.0.0.0/0       192.168.1.2     10
svm-01
          d172.16.10.0/24
                    0.0.0.0/0       172.16.10.254   20
4 entries were displayed.

ルーティングテーブルから、ルートを削除する場合は、route delete コマンドを使用します。

cluster1::> network routing-groups route delete -vserver svm-01 -routing-group d172.16.99.0/24 -destination 0.0.0.0/0
Volume の操作

volume を作成します。*5

cluster1::> volume create -vserver svm-01 -volume vol_nfs01 -aggregate aggr1 -size 2g -security-style unix -space-guarantee none -junction-path /vol_nfs01

volume が作成された事を確認します。

cluster1::> volume show
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cluster1-01
          vol0         aggr0        online     RW      851.5MB    486.3MB   42%
cluster1-02
          vol0         aggr0_cluster1_02_0
                                    online     RW      851.5MB    519.5MB   38%
svm-01    rootvol      aggr1        online     RW          2GB     1.90GB    5%
svm-01    vol_nfs01    aggr1        online     RW          2GB     1.50GB   24%
4 entries were displayed.

volume サイズを変更する場合は、volume size コマンドを使用します。

cluster1::> volume size -vserver svm-01 -volume vol_nfs01 -new-size 3g

volume サイズが変更された事を確認します。

cluster1::> volume show vol_nfs01
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm-01    vol_nfs01    aggr1        online     RW          3GB     1.50GB   49%

volume 作成時に junction-path を指定しなかった場合は、個別にマウントします。

cluster1::> volume mount -vserver svm-01 -volume vol_nfs01 -junction-path /vol_nfs01
LUN の操作

iSCSI ターゲットを作成します。

cluster1::cluster> vserver iscsi create -vserver svm-01

iSCSI ターゲットが作成された事を確認します。

cluster1::cluster> vserver iscsi show
           Target                           Target                       Status
Vserver    Name                             Alias                        Admin
---------- -------------------------------- ---------------------------- ------
svm-01     iqn.1992-08.com.netapp:sn.a74d0e3b00ef11e4918d123478563412:vs.3
                                            svm-01                       up

igroup を作成します。

clluster1::cluster> lun igroup create -vserver svm-01 -igroup igroup01 -protocol iscsi -ostype vmware

igroup が作成された事を確認します。

cluster1::cluster> lun igroup show
Vserver   Igroup       Protocol OS Type  Initiators
--------- ------------ -------- -------- ------------------------------------
svm-01    igroup01     iscsi    vmware   -

igroup にサーバの initiator を追加します。

cluster1::cluster> lun igroup add -vserver svm-01 -igroup igroup01 -initiator iqn.1998-01.com.vmware:localhost-0a162bb4

igroup に initiator が追加された事を確認します。

cluster1::cluster> igroup show
Vserver   Igroup       Protocol OS Type  Initiators
--------- ------------ -------- -------- ------------------------------------
svm-01    igroup01     iscsi    vmware   iqn.1998-01.com.vmware:localhost-0a162bb4

LUN を作成します。

cluster1::cluster> lun create -vserver svm-01 -path /vol/vol_iscsi01/lun_iscsi01 -size 2g -ostype vmware -space-reserve disabled

LUN が作成された事を確認します。

cluster1::cluster> lun show
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
svm-01    /vol/vol_iscsi01/lun_iscsi01    online  unmapped vmware        2GB


LUN に igroup をマッピングします。

cluster1::cluster> lun map -vserver svm-01 -path /vol/vol_iscsi01/lun_iscsi01 -igroup igroup01

LUN に igroup がマッピングされた事を確認します。

cluster1::cluster> lun mapped show
Vserver    Path                                      Igroup   LUN ID  Protocol
---------- ----------------------------------------  -------  ------  --------
svm-01     /vol/vol_iscsi01/lun_iscsi01              igroup01      0  iscsi

lun サイズを変更する場合は、lun resize コマンドを使用します。

cluster1::> lun resize -vserver svm-01 -path /vol/vol_iscsi01/lun_iscsi01 -size  2.5g

lun サイズが変更された事を確認します。

cluster1::> lun show
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
svm-01    /vol/vol_iscsi01/lun_iscsi01    online  mapped   vmware     2.50GB
NFS 設定

NFS を有効化します。

cluster1::> nfs on -vserver svm-01

NFS が有効になっている事を確認します。

cluster1::> nfs status -vserver svm-01
The NFS server is running.

export-policy を作成します。

cluster1::> vserver export-policy create -vserver svm-01 -policyname export01

export-policy が作成された事を確認します。

cluster1::> vserver export-policy show
Vserver          Policy Name
---------------  -------------------
svm-01           default
svm-01           export01
2 entries were displayed.

export-policy に rule を設定します。

cluster1::> vserver export-policy rule create -vserver svm-01 -policyname export01 -clientmatch 0.0.0.0/0 -anon 0 -rorule any -rwrule any

export-policy に rule が設定された事を確認します。

cluster1::> vserver export-policy rule show
             Policy          Rule    Access   Client                RO
Vserver      Name            Index   Protocol Match                 Rule
------------ --------------- ------  -------- --------------------- ---------
svm-01       export01        1       any      0.0.0.0/0             any

export する volume に export-policy を適用します。

cluster1::> volume modify -vserver svm-01 -volume vol_nfs01 -policy export01

volume に export-policy が適用された事を確認します。

cluster1::> volume show -fields policy
vserver     volume policy
----------- ------ ------
cluster1-01 vol0   -
cluster1-02 vol0   -
svm-01      rootvol
                   default
svm-01      vol_iscsi01
                   default
svm-01      vol_nfs01
                   export01
5 entries were displayed.
CIFS 設定

DNS サーバを設定します。

cluster1::> vserver services dns create -vserver svm-01 -domains example.com -name-servers 192.168.1.99

DNS サーバが設定された事を確認します。

cluster1::> vserver services dns show
                                                              Name
Vserver         State     Domains                             Servers
--------------- --------- ----------------------------------- ----------------
svm-01          enabled   example.com                         192.168.1.99

CIFS サーバを作成し、ドメインに参加します。

cluster1::> cifs create -cifs-server svm-01_cifs -domain example.com -vserver svm-01

In order to create an Active Directory machine account for the CIFS server, you must supply the name and password of a
Windows account with sufficient privileges to add computers to the "CN=Computers" container within the "example.com"
domain.

Enter the user name: Administrator

Enter the password:

CIFS が作成された事を確認します。

cluster1::> vserver cifs show
            Server          Status    Domain/Workgroup Authentication
Vserver     Name            Admin     Name             Style
----------- --------------- --------- ---------------- --------------
svm-01      SVM-01_CIFS     up        EXAMPLE          domain

volume を CIFS 共有します。
※volume の -security-style は ntfs である事が必須です。

cluster1::> vserver cifs share create -vserver svm-01 -share-name vol_cifs01 -path /vol_cifs01

volume が CIFS 共有された事を確認します。

cluster1::> vserver cifs share show
Vserver        Share         Path              Properties Comment  ACL
-------------- ------------- ----------------- ---------- -------- -----------
svm-01         admin$        /                 browsable  -        -
svm-01         ipc$          /                 browsable  -        -
svm-01         vol_cifs01    /vol_cifs01       oplocks    -        Everyone / Full Control
                                               browsable
                                               changenotify
3 entries were displayed.

CIFS サーバのローカルユーザを作成します。

cluster1::> vserver cifs users-and-groups local-user create -user-name testuser -vserver svm-01

Enter the password:
Confirm the password:

ローカルユーザが作成された事を確認します。

cluster1::> vserver cifs users-and-groups local-user show
Vserver      User Name                   Full Name            Description
------------ --------------------------- -------------------- -------------
svm-01       SVM-01_CIFS\Administrator                        Built-in administrator account
svm-01       SVM-01_CIFS\testuser        -                    -
2 entries were displayed.

CIFS ACL を設定します。

cluster1::> vserver cifs share access-control create -vserver svm-01 -share vol_cifs01 -user-or-group testuser -permission read

CIFS ACL が設定された事を確認します。

cluster1::> vserver cifs share access-control show
               Share       User/Group                  Access
Vserver        Name        Name                        Permission
-------------- ----------- --------------------------- -----------
svm-01         vol_cifs01  Everyone                    Full_Control
svm-01         vol_cifs01  testuser                    Read
2 entries were displayed.

CIFS ACL が対象のユーザに適用された事を確認します。

cluster1::> vserver cifs share show
Vserver        Share         Path              Properties Comment  ACL
-------------- ------------- ----------------- ---------- -------- -----------
svm-01         admin$        /                 browsable  -        -
svm-01         ipc$          /                 browsable  -        -
svm-01         vol_cifs01    /vol_cifs01       oplocks    -        Everyone / Full Control
                                               browsable           testuser / Read
                                               changenotify
3 entries were displayed.
Snapshot の操作

Snapshot を手動で取得します。

cluster1::> volume snapshot create -vserver svm-01 -volume vol_nfs01 -snapshot ss01

Snapshot が取得された事を確認します。

cluster1::> volume snapshot show -vserver svm-01 -volume vol_nfs01
                                                                   ---Blocks---
Vserver  Volume  Snapshot                        State        Size Total% Used%
-------- ------- ------------------------------- -------- -------- ------ -----
svm-01   vol_nfs01
                 ss01                            valid        80KB     0%   31%

Snapshot を削除します。

cluster1::> volume snapshot delete -vserver svm-01 -volume vol_nfs01 -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 "ss01" for volume "vol_nfs01" in Vserver "svm-01" ?
          {y|n}: y
1 entry was acted on.

Snapshot を取得するジョブスケジュールを作成します。

cluster1::> job schedule cron create -name job01 -hour 1 -minute 0

Snapshot のジョブが作成された事を確認します。

cluster1::> job schedule show -name job01

Schedule Name: job01
Schedule Type: cron
  Description: @1:00

Snapshot ポリシー*6を作成します。

cluster1::> volume snapshot policy create -policy sspolicy01 -enabled true -vserver svm-01 -schedule1 job01 -count1 2 -prefix1 job01

Snapshot ポリシーが作成された事を確認します。

cluster1::> volume snapshot policy show -policy sspolicy01
Vserver: svm-01
                         Number of Is
Policy Name              Schedules Enabled Comment
------------------------ --------- ------- ----------------------------------
sspolicy01                       1 true    -
    Schedule               Count     Prefix                 SnapMirror Label
    ---------------------- -----     ---------------------- -------------------
    job01                      2     job01                  -

Snapshot ポリシーを volume に適用します。

cluster1::> volume modify -vserver svm-01 -volume vol_nfs01 -snapshot-policy sspolicy01

Snapshot ポリシーが volume に適用された事を確認します。

cluster1::> volume show -fields snapshot-policy -volume vol_nfs01
vserver volume    snapshot-policy
------- --------- ---------------
svm-01  vol_nfs01 sspolicy01

*1:シミュレーターのライセンスはNowからダウンロード可能です。

*2:LIF を Home Node の Home Port から、異なる Node・Port に移行します。

*3:LIF を Home Node の Home Port へ戻します。

*4:ルーティングは、SVM 単位で設定します。

*5:CIFS で共有する volume については、-security-style を ntfs にします。

*6:スケジュールの紐づけ及び、保持世代数を定義します。

Load Sharing SnapMirror について

$
0
0

クアライアントからの Read(読み取り)要求を分散して、スループットを向上させる機能になります。
具体的には、Root を含む任意の Volume のコピー(読み取り専用)を、マスターとは別の Aggregate に作成し、クライアントからの Read 要求を分散します。*1書き込みについては、マスターにのみ行われ、分散されません。

注意点

マスターからコピーに対し、リアルタイムミラーリングが行われないため、マスターで更新されたデータを、読み取れるようにするには、LS ミラーをアップデートする必要があります。これに関連して、Root volume をコピーした際、Root 配下に新たな Volume を作成しても、(LS ミラーをアップデートするまで、コピー先の、Junction Path が更新されないため)当該 Volume にアクセスできない事に注意してください。

SnapMirror 送信先の Volume を作成します。

cluster1::> volume create -vserver svm-01 -volume rootvol_ls -aggregate aggr2 -type DP

送信先の Volume が作成された事を確認します。

cluster1::> volume show -volume rootvol_ls
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm-01    rootvol_ls   aggr2        online     DP         20MB    19.89MB    0%

LS SnapMirror を作成します。

cluster1::> snapmirror create -source-path svm-01:rootvol -destination-path svm-01:rootvol_ls -type LS

LS SnapMirror が作成された事を確認します。

cluster1::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
cluster1://svm-01/rootvol
            LS   cluster1://svm-01/rootvol_ls
                              Uninitialized
                                      Idle           -         -       -

LS SnapMirror の Initialize を行います。

cluster1::> snapmirror initialize-ls-set -source-path svm-01:rootvol

Initialize が完了した事を確認します。

cluster1::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
cluster1://svm-01/rootvol
            LS   cluster1://svm-01/rootvol_ls
                              Snapmirrored
                                      Idle           -         true    -

Volume サイズが、マスターと同様となっている事を確認します。

cluster1::> volume show -volume rootvol,rootvol_ls
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm-01    rootvol      aggr1        online     RW          2GB     1.90GB    5%
svm-01    rootvol_ls   aggr2        online     LS          2GB     1.90GB    5%
2 entries were displayed.

新規の Volume を作成すると、下記のとおり、留意事項が通知されます。

cluster1::> volume create -vserver svm-01 -volume vol_nfs02 -aggregate aggr1 -size 1g -security-style unix -space-guarantee none -junction-path /vol_nfs02
[Job 82] Job succeeded: Successful

Notice: Volume vol_nfs02 now has a mount point from volume rootvol.  The load sharing (LS) mirrors of volume
        rootvol have no replication schedule.  Volume vol_nfs02 will not be visible in the global namespace until
        the LS mirrors of volume rootvol have been updated.
        現状、LS SnapMirror スケジュールが設定されていないため、アップデートされるまで、クライントからアクセスできません。

LS SnapMirror をアップデートします。

cluster1::> snapmirror update-ls-set -source-path svm-01:rootvol

LS SnapMirror がアップデートされた事を確認します。

cluster1::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
cluster1://svm-01/rootvol
            LS   cluster1://svm-01/rootvol_ls
                              Snapmirrored
                                      Idle           -         true    -

LS SnapMirror のスケジュールを作成します。

cluster1::> job schedule cron create -name sched01 -hour 1 -minute 0

LS SnapMirror にスケジュールを適用します。

cluster1::> snapmirror modify -destination-path svm-01:rootvol_ls -schedule sched01

LS SnapMirror にスケジュールが設定されている事を確認します。

cluster1::> snapmirror show -fields schedule
source-path               destination-path             schedule
------------------------- ---------------------------- --------
cluster1://svm-01/rootvol cluster1://svm-01/rootvol_ls sched01

*1:クライアントからの Read 要求は、全てコピーされた Volume に向けられます。

Data Protection SnapMirror について

$
0
0

従来のデータ保護を目的とした、クラスタ内/クラスタ間のミラーリング機能になります。

  • クラスタ内 SnapMirror
    • Cluster Network を使用して、ローカルクラスタ上で、SnapMirror を行う。
    • ターゲットボリュームは、Source と同じ SVM でも、異なる SVM でも良い。
  • クラスタ間 SnapMirror
    • 異なるクラスタに存在するボリューム間で、SnapMirror を行う。
    • クラスタ間の Intercluster LIF を使用する。
Source 側の設定

Cluster 間通信用の VLAN を定義します。

cluster1::> network port vlan create -node cluster1-01 -vlan-name a0a-99
cluster1::> network port vlan create -node cluster1-02 -vlan-name a0a-99

Cluster 間通信用の VLAN が定義された事を確認します。

cluster1::> network port vlan show
                 Network Network
Node   VLAN Name Port    VLAN ID  MAC Address
------ --------- ------- -------- -----------------
cluster1-01
       a0a-10    a0a     10       02:0c:29:c4:aa:e4
       a0a-20    a0a     20       02:0c:29:c4:aa:e4
       a0a-30    a0a     30       02:0c:29:c4:aa:e4
       a0a-99    a0a     99       02:0c:29:c4:aa:e4
cluster1-02
       a0a-10    a0a     10       02:0c:29:c0:8c:8a
       a0a-20    a0a     20       02:0c:29:c0:8c:8a
       a0a-30    a0a     30       02:0c:29:c0:8c:8a
       a0a-99    a0a     99       02:0c:29:c0:8c:8a
8 entries were displayed.

Cluster 間通信用の FailoverGroup を定義します。

cluster1::> network interface failover-groups create -failover-group failovergroup -node cluster1-01 -port a0a-99
cluster1::> network interface failover-groups create -failover-group failovergroup -node cluster1-02 -port a0a-99

Cluster 間通信用の FailoverGroup を定義された事を確認します。

cluster1::> network interface failover-groups show
Failover
Group               Node              Port
------------------- ----------------- ----------
clusterwide
                    cluster1-01       a0a
                    cluster1-01       e0c
                    cluster1-02       a0a
                    cluster1-02       e0c
failovergroup
                    cluster1-01       a0a-10
                    cluster1-01       a0a-99
                    cluster1-02       a0a-10
                    cluster1-02       a0a-99
8 entries were displayed.

Cluster 間通信用の LIF を作成します。

cluster1::> network interface create -vserver cluster1-01 -lif lif-cluster01 -role intercluster -home-node cluster1-01 -home-port a0a-99 -address 172.16.99.11 -netmask 255.255.255.0
cluster1::> network interface create -vserver cluster1-02 -lif lif-cluster02 -role intercluster -home-node cluster1-02 -home-port a0a-99 -address 172.16.99.12 -netmask 255.255.255.0

Cluster 間通信用の LIF が作成されている事を確認します。

cluster1::> network interface show lif-cluster01,lif-cluster02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
cluster1-01
            lif-cluster01
                         up/up    172.16.99.11/24    cluster1-01   a0a-99  true
cluster1-02
            lif-cluster02
                         up/up    172.16.99.12/24    cluster1-02   a0a-99  true
2 entries were displayed.
Destination 側の設定

インターフェースグループを作成します。

cluster2::>  network port ifgrp create -node cluster2-01 -ifgrp a0a -distr-func ip -mode multimode
cluster2::>  network port ifgrp create -node cluster2-02 -ifgrp a0a -distr-func ip -mode multimode

インターフェースグループが作成された事を確認します。

cluster2::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster2-01
         a0a        ip           02:0c:29:af:99:db none    -
cluster2-02
         a0a        ip           02:0c:29:96:f8:e7 none    -
2 entries were displayed.

インターフェースグループにポートを追加します。

cluster2::> network port ifgrp add-port -node cluster2-01 -ifgrp a0a -port e0d
cluster2::> network port ifgrp add-port -node cluster2-02 -ifgrp a0a -port e0d

インターフェースグループにポートが追加された事を確認します。

cluster2::> network port ifgrp show
         Port       Distribution                   Active
Node     IfGrp      Function     MAC Address       Ports   Ports
-------- ---------- ------------ ----------------- ------- -------------------
cluster2-01
         a0a        ip           02:0c:29:af:99:db full    e0d
cluster2-02
         a0a        ip           02:0c:29:96:f8:e7 full    e0d
2 entries were displayed.

Cluster 間通信用の VLAN を定義します。

cluster2::> network port vlan create -node cluster2-01 -vlan-name a0a-99
cluster2::> network port vlan create -node cluster2-02 -vlan-name a0a-99

Cluster 間通信用の VLAN が定義された事を確認します。

cluster2::> network port vlan show
                 Network Network
Node   VLAN Name Port    VLAN ID  MAC Address
------ --------- ------- -------- -----------------
cluster2-01
       a0a-99    a0a     99       02:0c:29:af:99:db
cluster2-02
       a0a-99    a0a     99       02:0c:29:96:f8:e7
2 entries were displayed.

Cluster 間通信用の FailoverGroup を定義します。

cluster2::> network interface failover-groups create -failover-group failovergroup -node cluster2-01 -port a0a-99
cluster2::> network interface failover-groups create -failover-group failovergroup -node cluster2-02 -port a0a-99

Cluster 間通信用の FailoverGroup を定義された事を確認します。

cluster2::> network interface failover-groups show
Failover
Group               Node              Port
------------------- ----------------- ----------
clusterwide
                    cluster2-02       a0a
                    cluster2-02       e0c
                    cluster2-01       a0a
                    cluster2-01       e0c
failovergroup
                    cluster2-02       a0a-99
                    cluster2-01       a0a-99
6 entries were displayed.

vserver setup コマンドで SVM を作成します。

cluster2::> vserver setup
Welcome to the Vserver Setup Wizard, which will lead you through
the steps to create a virtual storage server that serves data to clients.

You can enter the following commands at any time:
"help" or "?" if you want to have a question clarified,
"back" if you want to change your answers to previous questions, and
"exit" if you want to quit the Vserver Setup Wizard. Any changes
you made before typing "exit" will be applied.

You can restart the Vserver Setup Wizard by typing "vserver setup". To accept a default
or omit a question, do not enter a value.

Vserver Setup wizard creates and configures only data Vservers.
If you want to create a Vserver with Infinite Volume use the vserver create command.

Step 1. Create a Vserver.
You can type "back", "exit", or "help" at any question.

Enter the Vserver name: bsvm-01
Choose the Vserver data protocols to be configured {nfs, cifs, fcp, iscsi, ndmp}:  nfs, cifs, fcp, iscsi, ndmp
Choose the Vserver client services to be configured {ldap, nis, dns}: dns
Enter the Vserver's root volume aggregate [aggr1]: aggr1
Enter the Vserver language setting, or "help" to see all languages [C.UTF-8]: C
Enter the Vserver root volume's security style {mixed, ntfs, unix} [unix]: unix
Vserver creation might take some time to finish....

Vserver bsvm-01 with language set to C created.  The permitted protocols are nfs,cifs,fcp,iscsi,ndmp.

Step 2: Create a data volume
You can type "back", "exit", or "help" at any question.

Do you want to create a data volume? {yes, no} [yes]: no

Step 3: Create a logical interface.
You can type "back", "exit", or "help" at any question.

Do you want to create a logical interface? {yes, no} [yes]: no

Step 4: Configure DNS (Domain Name Service).
You can type "back", "exit", or "help" at any question.

Do you want to configure DNS? {yes, no} [yes]: no
Error: Failed to create NFS. Reason: You do not have a valid license for "NFS". Reason: Package "NFS" is not licensed in the cluster.

Step 5: Configure NFS.
You can type "back", "exit", or "help" at any question.

Step 6: Configure CIFS.
You can type "back", "exit", or "help" at any question.

Do you want to configure CIFS? {yes, no} [yes]: no

Step 7: Configure iSCSI.
You can type "back", "exit", or "help" at any question.

Do you want to configure iSCSI? {yes, no} [yes]: no

Step 8: Configure FCP.
You can type "back", "exit", or "help" at any question.

Do you want to configure FCP? {yes, no} [yes]: no

Vserver bsvm-01 has been configured successfully.

Cluster 間通信用の LIF を作成します。

cluster2::> network interface create -vserver cluster2-01 -lif lif-cluster01 -role intercluster -home-node cluster2-01 -home-port a0a-99 -address 172.16.99.21 -netmask 255.255.255.0
cluster2::> network interface create -vserver cluster2-02 -lif lif-cluster02 -role intercluster -home-node cluster2-02 -home-port a0a-99 -address 172.16.99.22 -netmask 255.255.255.0

Cluster 間通信用の LIF が作成されている事を確認します。

cluster2::> network interface show lif-cluster01,lif-cluster02
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
cluster2-01
            lif-cluster01
                         up/up    172.16.99.21/24    cluster2-01   a0a-99  true
cluster2-02
            lif-cluster02
                         up/up    172.16.99.22/24    cluster2-02   a0a-99  true
2 entries were displayed.

Cluster Peer を作成します。

cluster2::> cluster peer create -peer-addrs 172.16.99.11,172.16.99.12 -username admin
Remote Password:

Cluster Peer が作成されている事を確認します。

cluster2::> cluster peer show -instance

            Peer Cluster Name: cluster1
Remote Intercluster Addresses: 172.16.99.11, 172.16.99.12
                 Availability: Available
          Remote Cluster Name: cluster1
          Active IP Addresses: 172.16.99.11, 172.16.99.12
        Cluster Serial Number: 1-80-000008

Vserver Peer を作成します。

cluster2::> vserver peer create -vserver bsvm-01 -peer-vserver svm-01 -applications snapmirror -peer-cluster cluster1

Vserver Peer が作成されている事を確認します。※この時点では、まだ承認されていません。

cluster2::> vserver peer show
            Peer        Peer
Vserver     Vserver     State
----------- ----------- ------------
bsvm-01     svm-01      initiated

Source 側で、destination 側の Vserver Peer を承認します。

cluster1::> vserver peer accept -vserver svm-01 -peer-vserver bsvm-01

Vserver Peer が承認されている事を確認します

cluster2::> vserver peer show
            Peer        Peer
Vserver     Vserver     State
----------- ----------- ------------
bsvm-01     svm-01      peered

SnapMirror 送信先の Volume を作成します。

cluster2::> volume create -vserver bsvm-01 -volume rootvol_is -aggregate aggr1 -type DP

送信先の Volume が作成された事を確認します。

cluster2::> volume show -volume rootvol_is
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
bsvm-01   rootvol_is   aggr1        online     DP         20MB    19.89MB    0%

InterCluster SnapMirror を作成します。

cluster2::> snapmirror create -source-path cluster1://svm-01/rootvol bsvm-01:rootvol_is -type DP

InterCluster SnapMirror が作成された事を確認します。

cluster2::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
svm-01:rootvol
            DP   bsvm-01:rootvol_is
                              Uninitialized
                                      Idle           -         true    -

InterCluste SnapMirror の Initialize を行います。

cluster2::> snapmirror initialize -source-path cluster1://svm-01/rootvol bsvm-01:rootvol_is

Initialize が完了した事を確認します。

cluster1::> snapmirror show
                                                                       Progress
Source            Destination  Mirror  Relationship  Total             Last
Path        Type  Path         State   Status        Progress  Healthy Updated
----------- ---- ------------ ------- -------------- --------- ------- --------
svm-01:rootvol
            DP   bsvm-01:rootvol_is
                              Snapmirrored
                                      Idle           -         true    -

sdw_cl_vol について

$
0
0

SnapManager for Exchange (SME) 等のベリファイ時に、ミラー先で生成されるボリュームです。
ベリファイ成功時は自動で削除されますが、失敗時は残留する場合があります。
これが残留していると、対象の Snapshot が busy 状態となり、次回のベリファイも失敗する可能性があります。

ボリューム名は、sdw_cl_[volname]_0 で生成されます。

> df -h
Filesystem               total       used      avail capacity  Mounted on
/vol/sdw_cl_testvol_0/      100GB       50GB      50GB      50%  /vol/sdw_cl_testvol_0/
/vol/sdw_cl_testvol_0/.snapshot        0KB    1000KB        0KB     ---%  /vol/sdw_cl_testvol_0/.snapshot

対象ボリュームの Snapshot 状況を確認すると、busy 状態の Snapshot が存在します。

> snap list testvol
Volume testvol
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
  0% ( 0%)    0% ( 0%)  Jan 16 06:12  netapp(0151729559)_testvol.1747
  0% ( 0%)    0% ( 0%)  Jan 16 06:12  @snapmir@{93F9293E-17BB-4AF5-91D6-FBEFBDCFCCFE}
  0% ( 0%)    0% ( 0%)  Jan 16 06:01  exchsnap__exchange_01-01-2015_06.00.46 (busy,snapmirror,vclone)

以下のコマンドで、sdw_cl_vol を削除します。

> vol offline sdw_cl_testvol_0
> vol destroy sdw_cl_testvol_0

対象ボリュームの Snapshot 状況を確認すると、busy 状態の Snapshot が削除されています。

> snap list testvol
Volume testvol
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
  0% ( 0%)    0% ( 0%)  Jan 16 06:12  netapp(0151729559)_testvol.1747
  0% ( 0%)    0% ( 0%)  Jan 16 06:12  @snapmir@{93F9293E-17BB-4AF5-91D6-FBEFBDCFCCFE}

busy,LUNs 状態の Snapshot について

$
0
0

SnapManager for Exchange (SME) 等のベリファイ処理失敗時に、残存する Snapshot になります。
以下の手順で削除する事が可能です。

snap list コマンドで busy 状態の Snapshot を確認します。

> snap list testvol
Volume testvol
working...

  %/used       %/total  date          name
----------  ----------  ------------  --------
<...snip...>
 56% (12%)   26% ( 3%)  Dec 18 05:01  exchsnap__exchange_02-23-2009_05.00.40 (busy,LUNs)

Snapmirror の送信元/送信先で Clone LUN が存在する事を確認します。

> lun show
<...snip...>
/vol/testvol/{3fd1acat-346c-216d-b6e4-bdf90a52801f}.rws

Snapmirror 送信先で snapmirror break を実行します。

> snapmirror break testvol

Snapmirror 送信先で lun offline/lun destroy を実行します。

> lun offline /vol/testvol/{3fd1acat-346c-216d-b6e4-bdf90a52801f}.rws
> lun destroy /vol/testvol/{3fd1acat-346c-216d-b6e4-bdf90a52801f}.rws

SnapDrive にて、Clone LUN をマウントしている場合は、Disconnect Disk を実行します。

Snapmirror 送信元で不要な Snapshot を削除します。

> snap delete testvol exchsnap__exchange_02-23-2009_05.00.40

Snapmirror resync を実行します。

> snapmirror resync -S [Sorce]:testvol testvol
Viewing all 55 articles
Browse latest View live