Quantcast
Channel: NETWORK ENGINEER BLOG
Viewing all 266 articles
Browse latest View live

BIG-IP 設定初期化手順

0
0

BIG-IP の設定を初期化する手順になります。一部の設定は下記のとおり維持されます。
出典:sol13127: Restoring the BIG-IP configuration to factory default settings (11.x)

  • 削除される設定
    • 全ての Local Traffic 設定
    • 全ての Network 設定
    • システムメンテナンスアカウント以外のアカウント

  • 維持される設定
    • Management IP アドレス
    • システムメンテナンスアカウント/パスワード(root and admin)
    • ライセンスファイル etc.

Traffic Management Shell(tmsh)へログインします。

# tmsh

設定を初期化します。

(tmos)# load sys config default
Reset the system configuration to factory defaults? (y/n) y
Loading system configuration...
  /defaults/app_template_base.conf
  /defaults/config_base.conf
  /config/low_profile_base.conf
  /defaults/wam_base.conf
  /usr/share/monitors/base_monitors.conf
  /config/daemon.conf
  /config/profile_base.conf
  /defaults/fullarmor_gpo_base.conf
  /usr/share/monitors/gtm_base_monitors.conf
  /usr/local/gtm/include/gtm_base_region_isp.conf
Loading configuration...
  /defaults/defaults.scf
Resetting trust domain...

設定を保存します。

save sys config

CentOS5.6 EPEL リポジトリ追加

0
0

外部リポジトリを追加する事で、標準パッケージに含まれないパッケージを yum でインストールする事が可能となります。以下は EPEL リポジトリの追加手順です。

EPEL パッケージをダウンロードします。

# wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm

EPEL パッケージをインストールします。

# rpm -ihv epel-release-5-4.noarch.rpm

必要に応じて EPEL リポジトリを使用するように設定します。

# vi /etc/yum.repos.d/epel.repo
[epel]
enabled=0

Python2.6 を標準リポジトリを使用して yum search を実行してみます。

# yum search python26
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.nara.wide.ad.jp
 * extras: ftp.nara.wide.ad.jp
 * updates: ftp.nara.wide.ad.jp
Warning: No matches found for: python26
No Matches found

標準リポジトリでは見つかりませんでした。

次に EPEL リポジトリを使用して yum search を実行します。

# yum search python26 --enablerepo=epel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fairway.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: mirror.fairway.ne.jp
 * updates: mirror.fairway.ne.jp
epel
dpm-python26.x86_64 : Disk Pool Manager (DPM) python bindings
gfal-python26.x86_64 : Python26 bindings for gfal 1.0
lcg-util-python26.x86_64 : Python 2.6 bindings for lcg-util
lfc-python26.x86_64 : LCG File Catalog (LFC) python bindings
nordugrid-arc-python26.x86_64 : ARC Python wrapper
<...snip...>

Python26 がインストール可能な事を確認できました。

CentOS5.6 へ Python2.6 をインストール

0
0

Python2.6 と関連パッケージをインストールします。

# yum -y install python26 --enablerepo=epel
# yum -y install python26* --enablerepo=epel

Python2.6 を実行してみます。

# python26
Python 2.6.8 (unknown, Nov  7 2012, 14:47:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Exscript をダウンロードします。

# wget --no-check-certificate -O knipknap-exscript-v2.1-388-g65e7e55.tar.gz https://github.com/knipknap/exscript/tarball/master

Exscript をインストールします。

# easy_install-2.6 knipknap-exscript-v2.1-388-g65e7e55.tar.gz

下記の script(cisco.py) を実行してみます。

from Exscript.util.interact import read_login
from Exscript.protocols import SSH2

account = read_login()
conn = SSH2()
conn.connect('192.168.1.1')
conn.login(account)

conn.execute('terminal length 0')

conn.execute('show version')
print conn.response

conn.send('exit\r')
conn.close()

C181X へアクセスし show version を取得する事ができました。

# python26 cisco.py
Please enter your user name [root]: cisco
Please enter your password:
show version
Cisco IOS Software, C181X Software (C181X-ADVENTERPRISEK9-M), Version 15.1(3)T4, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Thu 24-May-12 07:09 by prod_rel_team
ROM: System Bootstrap, Version 12.3(8r)YH9, RELEASE SOFTWARE (fc1)
myrouter uptime is 4 weeks, 17 hours, 21 minutes
System returned to ROM by reload at 00:36:43 JST Sat Mar 9 2013
System image file is "flash:c181x-adventerprisek9-mz.151-3.T4.bin"
Last reload type: Normal Reload
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 1812-J (MPC8500) processor (revision 0x400) with 354304K/38912K bytes of memory.
Processor board ID FHKxxxxxxSN, with hardware revision 0000
10 FastEthernet interfaces
1 ISDN Basic Rate interface
1 Virtual Private Network (VPN) Module
62720K bytes of ATA CompactFlash (Read/Write)
License Info:
License UDI:
-------------------------------------------------
Device#   PID                   SN
-------------------------------------------------
*0        CISCO1812-J/K9        FHKxxxxxxSN
Configuration register is 0x2102

(参考)
https://github.com/knipknap/exscript/issues/15
http://stackoverflow.com/questions/7140817/python-ssh-into-cisco-device-and-run-show-commands

BIG-IP の UCS ファイルを作成・取得するスクリプト

0
0

BIG-IP の UCS(設定ファイル)を作成し・取得するスクリプトになります。
タスクスケジューラを使用する事で自動化が可能です。

使用する引数は下記の 3 つです。

  • list: Archive List の一覧を表示します。
  • save: UCS を任意の名前で作成します。
  • download: 存在する UCS をダウンロードします。
ISE 実行例

.\ConfigBackup.ps1 192.168.1.101 admin password list

> .\ConfigBackup.ps1 192.168.1.101 admin password list
Available Configuration Files
-----------------------------
-> backup.ucs (Tue Apr  9 05:11:28 2013)

.\ConfigBackup.ps1 192.168.1.101 admin password save backup.ucs

> .\ConfigBackup.ps1 192.168.1.101 admin password save backup.ucs
Saving Configuration to file backup.ucs
Available Configuration Files
-----------------------------
-> backup.ucs (Tue Apr  9 05:29:36 2013)

.\ConfigBackup.ps1 192.168.1.101 admin password download backup.ucs

> .\ConfigBackup.ps1 192.168.1.101 admin password download backup.ucs
Downloading Configuration file backup.ucs
Bytes Transferred: 65536
Bytes Transferred: 131072
Bytes Transferred: 196608
Bytes Transferred: 262144
Bytes Transferred: 327680
Bytes Transferred: 345804
Script

ConfigBackup.ps1 の内容は下記のとおりです。

#----------------------------------------------------------------------------
# The contents of this file are subject to the "END USER LICENSE AGREEMENT FOR F5
# Software Development Kit for iControl"; you may not use this file except in
# compliance with the License. The License is included in the iControl
# Software Development Kit.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is iControl Code and related documentation
# distributed by F5.
#
# The Initial Developer of the Original Code is F5 Networks,
# Inc. Seattle, WA, USA. Portions created by F5 are Copyright (C) 1996-2007 F5 Networks,
# Inc. All Rights Reserved.  iControl (TM) is a registered trademark of F5 Networks, Inc.
#
# Alternatively, the contents of this file may be used under the terms
# of the GNU General Public License (the "GPL"), in which case the
# provisions of GPL are applicable instead of those above.  If you wish
# to allow use of your version of this file only under the terms of the
# GPL and not to allow others to use your version of this file under the
# License, indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by the GPL.
# If you do not delete the provisions above, a recipient may use your
# version of this file under either the License or the GPL.
#----------------------------------------------------------------------------
param (
  $g_bigip = $null,
  $g_uid = $null,
  $g_pwd = $null,
  $g_cmd = $null,
  $g_name = $null
);

$DEFAULT_CHUNK_SIZE = (64*1024);

Set-PSDebug -strict;

#-------------------------------------------------------------------------
# function Write-Usage
#-------------------------------------------------------------------------
function Write-Usage()
{
  Write-Host "Usage: ConfigArchive.ps1 host uid pwd [list|save|download [name]]";
  exit;
}

#-------------------------------------------------------------------------
#
#-------------------------------------------------------------------------
function Generate-ConfigName()
{
  $now = [DateTime]::Now;
  $year = $now.year;
  $month = $now.month; if ($month -lt 10) { $month = "0${month}" }
  $day = $now.day; if ( $day -lt 10 ) { $day = "0${day}" }
  $hour = $now.hour; if ( $hour -lt 10 ) { $hour = "0${hour}" }
  $minute = $now.minute; if ( $minute -lt 10 ) { $minute = "0${minute}" }
  $second = $now.second; if ( $second -lt 10 ) { $second = "0${second}" }
  $config_name = "${g_bigip}-${year}${month}${day}-${hour}${minute}${second}.ucs"
  return $config_name;
}

#-------------------------------------------------------------------------
#
#-------------------------------------------------------------------------
function Get-ConfigList()
{
  $ConfigFileEntryList = (Get-F5.iControl).SystemConfigSync.get_configuration_list();
  Write-Host "Available Configuration Files";
  Write-Host "-----------------------------";
  foreach ($ConfigFileEntry in $ConfigFileEntryList)
  {
    $file_name = $ConfigFileEntry.file_name;
    $file_datetime = $ConfigFileEntry.file_datetime;
    
    Write-Host "-> $file_name ($file_datetime)";
  }
}

#-------------------------------------------------------------------------
#
#-------------------------------------------------------------------------
function Save-Configuration()
{
  param($config_name = $null);
  if ( $config_name -eq $null )
  {
    $config_name = Generate-ConfigName;
  }
  Write-Host "Saving Configuration to file $config_name"
  (Get-F5.iControl).SystemConfigSync.save_configuration($config_name, "SAVE_FULL");
  
  Get-ConfigList;
}

#-------------------------------------------------------------------------
#
#-------------------------------------------------------------------------
function Download-Configuration()
{
  param($config_name);
  
  Write-Host "Downloading Configuration file $config_name"
  
  $loc = Get-Location
  $local_file = "$loc\$config_name";
  
  $ctx = New-Object -TypeName iControl.SystemConfigSyncFileTransferContext;
  $chunk_size = $DEFAULT_CHUNK_SIZE;
  $file_offset = 0;
  $bContinue = 1;
  $mode = [System.IO.FileMode]::CreateNew;
  if ( Test-Path $local_file )
  {
    $mode = [System.IO.FileMode]::Truncate;
  }
  
  $fs = New-Object -TypeName System.IO.FileStream -argumentList ($local_file, $mode);
  $w = New-Object -TypeName System.IO.BinaryWriter -argumentList ($fs);
  
  while($bContinue -eq 1)
  {
    $ctx = (Get-F5.iControl).SystemConfigSync.download_configuration($config_name, $chunk_size, [ref]$file_offset);
    $w.Write($ctx.file_data, 0, $ctx.file_data.Length);

    Write-Host "Bytes Transferred: $file_offset";
    if ( ($ctx.chain_type -eq "FILE_LAST") -or ($ctx.chain_type -eq "FILE_FIRST_AND_LAST") )
    {
      $bContinue = 0;
    }
  }
  $w.Close()
  $fs.Close()
}

#-------------------------------------------------------------------------
# Do-Initialize
#-------------------------------------------------------------------------
function Do-Initialize()
{
  if ( (Get-PSSnapin | Where-Object { $_.Name -eq "iControlSnapIn"}) -eq $null )
  {
    Add-PSSnapIn iControlSnapIn
  }
  $success = Initialize-F5.iControl -HostName $g_bigip -Username $g_uid -Password $g_pwd;
  
  return $success;
}

#-------------------------------------------------------------------------
# Main Application Logic
#-------------------------------------------------------------------------
if ( ($g_bigip -eq $null) -or ($g_uid -eq $null) -or ($g_pwd -eq $null) -or ($g_cmd -eq $null) )
{
  Write-Usage;
}

if ( Do-Initialize )
{
  switch ($g_cmd.ToLower())
  {
    "list" {
      Get-ConfigList;
    }
    "save" {
      Save-Configuration $g_name;
    }
    "download" {
      Download-Configuration $g_name;
    }
    default {
      Write-Usage;
    }
  }
}
else
{
  Write-Error "ERROR: iControl subsystem not initialized"
}

(参考)
https://devcentral.f5.com/wiki/icontrol.psconfigarchiving.ashx
https://devcentral.f5.com/tech-tips/articles/icontrol-apps-06-configuration-archiving#.UWKnnFeF-FD

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

仮想環境における CPU パフォーマンス管理について

0
0

仮想環境における CPU パフォーマンス管理のポイントとして、CPU 使用率に加えて、CPU の競合状態を把握する事が挙げられます。一般的に CPU を起因とするパフォーマンスの劣化が発生した場合は、以下の要因が考えられます。

  • ホストのサイジングの問題:仮想マシンに割り当てている CPU の個数が適当ではない。
  • ゲストのサイジングの問題:仮想マシンに割り当てている vCPU の個数が適当ではない。

以上の問題を判断するために必要な CPU パフォーマンスの指標(参考値)は下記のとおりです。

  • ホスト:75% 程度
  • ゲスト:システムに依存

上記及び、ゲストにおける Steal の発生率、CPU Ready 等でシステムのパフォーマンスを確認します。

Steal とは

ゲスト OS がリソース要求を行ったにも関わらず CPU リソースを割当ててもらえなかった時間の割合を示します。Steal が 0% でない場合は、CPU 制限が適用されているか、他のゲストと「取り合い」をして競合状態になっている可能性があり、ホストを増設する等の対応が求めれます。Steal は、top コマンド or vmstat コマンドで確認できます。

top コマンドの実行例*1

# top
top - 19:29:10 up 4 min,  3 users,  load average: 0.24, 0.23, 0.10
Tasks: 128 total,   2 running, 126 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1023924k total,   606252k used,   417672k free,    30820k buffers
Swap:  2064344k total,        0k used,  2064344k free,   374476k cached

vmstat 実行例(2秒間隔)*2

# vmstat 2
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 417680  30888 374472    0    0  1223   122 1056  338  3  3 87  7  0
 0  0      0 417680  30888 374500    0    0     0     0  977  177  0  0 100  0  0
 0  0      0 417680  30888 374500    0    0     0     0  976  180  0  0 100  0  0
CPU Ready とは

物理 CPU コアが別の仮想マシンで使用される事で、競合が発生し、ESXi でスケジューリングされた vCPU が待ちを強いられている時間を示します。steal との違いは、具体的な時間[ms]を確認できる点です。vCPU あたり 20秒の累積の参考値として 2000-4000ms 程度が指標となるようです。CPU Ready の確認は、vSphere のパフォーマンスチャートから確認します。

CPU Ready 確認方法

ゲストを選択しパフォーマンスタブの[切替先:]で CPU を選択します。
f:id:FriendsNow:20130513194604p:plain:w500

チャートオプションをクリックします。
f:id:FriendsNow:20130513194612p:plain:w500

CPU のカウンタで[準備完了]にチェックし[適用]をクリックします。
f:id:FriendsNow:20130513194620p:plain:w500

CPU Ready(準備完了)を確認します。
f:id:FriendsNow:20130513194626p:plain:w500

*1:%st が steal 発生率を示します。

*2:st が steal 発生率を示します。

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

Juniper SNMP エージェント設定方法

0
0

Junos での SNMP エージェントの設定方法です。詳細は以下をご参照ください。
http://www.juniper.net/techpubs/en_US/junos12.3/topics/example/snmp-config-cli-qfx-series.html

SNMP System name を設定します。

# set snmp name “snmp qfabric” 

SNMP Community を作成し Community にアクセス可能な Client を定義します。

# set snmp community public clients 192.168.1.100

SNMP 通知を送信する trap-group[qf-traps]を作成し Target を指定します。

# set snmp trap-group qf-traps targets 192.168.1.100

転送する Trap Category の特定のサブセットを定義します。

# set snmp trap-group public categories chassis
# set snmp trap-group public categories link
# set snmp trap-group public categories routing
# set snmp trap-group public categories startup
# set snmp trap-group public categories services

設定を保存します。

# commit

SNMP 通知を明示的に送信する事が可能です。Trap を試験する際に便利です。

> request snmp spoof-trap jnxFanOK

上記を実行すると[FAN OK]の Trap を送信します。


Pacemaker のリソースフェイルオーバーについて

0
0

Pacemaker で想定される故障は、start[起動失敗], monitor[監視による検出], stop[停止失敗]の3パターンがあります。故障が発生した際は、on-fail の設定に応じた動作を行います。on-fail を指定しない場合は、デフォルトの restart が適用されます。on-fail で指定可能な設定値は下記のとおりです。

  • ignore : 何の処理も行わない。
  • block : 故障したリソースの管理を停止し、待機する。
  • fence : リソース故障が発生したサーバーを STONITH によって再起動し、フェイルオーバーする。
  • restart : 故障したリソースを、他のサーバへフェイルオーバーする。(デフォルト)

以前書いた記事の環境を使って、あらためてフェイルオーバーをテストしてみます。

リソースフェイルオーバーの確認

pm01 の設定を確認します。

# crm configure show
node $id="420126ea-1e1e-4632-b4fb-eaa2a8915909" pm02 \
        attributes standby="off"
node $id="ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9" pm01 \
        attributes standby="off"
primitive apache lsb:httpd \
        op start interval="0s" timeout="60s" on-fail="restart" \
        op monitor interval="30s" timeout="60s" on-fail="restart" \
        op stop interval="0s" timeout="60s" on-fail="fence"
primitive mnt_fs ocf:heartbeat:Filesystem \
        params device="/dev/sdb2" directory="/data" fstype="ext3" \
        op monitor interval="20s" timeout="40s" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive pingd ocf:pacemaker:pingd \
        params name="default_ping_set" host_list="192.168.1.2" interval="10" timeout="10" attempts="5" multiplier="100" \
        op start interval="0" timeout="90" on-fail="restart" \
        op monitor interval="10" timeout="20" on-fail="restart" start-delay="1m" debug="true" \
        op stop interval="0" timeout="100" on-fail="block"
primitive vip ocf:heartbeat:IPaddr2 \
        params ip="192.168.1.103" cidr_netmask="24" nic="eth0" iflabel="0" \
        op start interval="0s" timeout="60s" on-fail="restart" \
        op monitor interval="10s" timeout="60s" on-fail="restart" \
        op stop interval="0s" timeout="60s" on-fail="block"
group Cluster vip mnt_fs apache
clone clone_ping pingd
location vip_location vip \
        rule $id="vip_location-rule" -inf: not_defined default_ping_set or default_ping_set lt 100
property $id="cib-bootstrap-options" \
        dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \
        cluster-infrastructure="Heartbeat" \
        stonith-enabled="false" \
        no-quorum-policy="ignore"
rsc_defaults $id="rsc-options" \
        resource-stickiness="INFINITY" \
        migration-threshold="3"

リソース故障が1回発生するとフェイルオーバーするように設定を変更します。

# crm configure edit<...snip...>
rsc_defaults $id="rsc-options" \
        resource-stickiness="INFINITY" \
        migration-threshold="1"※値を 3 から 1 に変更します。

リソースの状況を確認します。※-f オプション故障状況を確認できます。

# crm_mon -f
============
Last updated: Tue May 28 03:37:46 2013
Stack: Heartbeat
Current DC: pm01 (ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9) - partition with quorum
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87
2 Nodes configured, unknown expected votes
2 Resources configured.
============

Online: [ pm02 pm01 ]

 Resource Group: Cluster
     vip        (ocf::heartbeat:IPaddr2):       Started pm01
     mnt_fs     (ocf::heartbeat:Filesystem):    Started pm01
     apache     (lsb:httpd):    Started pm01
 Clone Set: clone_ping
     Started: [ pm02 pm01 ]

Migration summary:
* Node pm02:
* Node pm01:

プロセス故障を想定し、リソース[apache]を kill します。

# ps -ef | grep apache
apache    7438  7436  0 03:44 ?        00:00:00 /usr/sbin/httpd
# kill -9 7436

リソース故障を検知しプロセスの再起動を試みます。再起動に成功すると、fail-count が加算されます。
fail-count の合計が migration-threshold を超過すると、リソースをフェイルオーバーします。
再起動に失敗した場合は、fail-count は INFINITY となり、即時フェイルオーバします。
本例では、migration-threshold を 1 に指定しているので、pm02 へフェイルオーバします。

# crm_mon -f
============
Last updated: Tue May 28 03:47:47 2013
Stack: Heartbeat
Current DC: pm01 (ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9) - partition with quorum
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87
2 Nodes configured, unknown expected votes
2 Resources configured.
============

Online: [ pm02 pm01 ]

 Resource Group: Cluster
     vip        (ocf::heartbeat:IPaddr2):       Started pm02
     mnt_fs     (ocf::heartbeat:Filesystem):    Started pm02
     apache     (lsb:httpd):    Started pm02
 Clone Set: clone_ping
     Started: [ pm02 pm01 ]

Migration summary:
* Node pm02:
* Node pm01:
   apache: migration-threshold=1 fail-count=1 ※ fail-count がカウントされています。

Failed actions:
    apache_monitor_30000 (node=pm01, call=22, rc=7, status=complete): not running

fail-count がカウントされているノードは、リソースを管理する事ができません。
当該ノードへリソースを移行するためには、fail-count をクリアする必要があります。

リソースの設定状況を確認します。

# crm resource show
 Resource Group: Cluster
     vip        (ocf::heartbeat:IPaddr2) Started
     mnt_fs     (ocf::heartbeat:Filesystem) Started
     apache     (lsb:httpd) Started
 Clone Set: clone_ping
     Started: [ pm02 pm01 ]

リソース[apache]の fail-count を確認します。

# crm resource failcount apache show pm01
scope=status  name=fail-count-apache value=1

リソース[apache]の fail-count をクリアします。

# crm resource failcount apache delete pm01

リソース[apache]の fail-count がクリアされ、値が 0 となります。

# crm resource failcount apache show pm01
scope=status  name=fail-count-apache value=0

fail-count はクリアされましたが、故障履歴[Faied actions]が残っています。

# crm_mon -f
============
Last updated: Tue May 28 04:03:35 2013
Stack: Heartbeat
Current DC: pm01 (ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9) - partition with quorum
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87
2 Nodes configured, unknown expected votes
2 Resources configured.
============

Online: [ pm02 pm01 ]

 Resource Group: Cluster
     vip        (ocf::heartbeat:IPaddr2):       Started pm02
     mnt_fs     (ocf::heartbeat:Filesystem):    Started pm02
     apache     (lsb:httpd):    Started pm02
 Clone Set: clone_ping
     Started: [ pm02 pm01 ]

Migration summary:
* Node pm02:
* Node pm01:

Failed actions:
    apache_start_0 (node=pm01, call=36, rc=1, status=complete): unknown error

故障履歴[Faied actions]をクリアします。

# crm resource cleanup apache pm01
Cleaning up apache on pm01
Waiting for 2 replies from the CRMd..

fail-count 及び Faied actions がクリアされました。

# crm_mon -f
============
Last updated: Tue May 28 04:07:18 2013
Stack: Heartbeat
Current DC: pm01 (ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9) - partition with quorum
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87
2 Nodes configured, unknown expected votes
2 Resources configured.
============

Online: [ pm02 pm01 ]

 Resource Group: Cluster
     vip        (ocf::heartbeat:IPaddr2):       Started pm02
     mnt_fs     (ocf::heartbeat:Filesystem):    Started pm02
     apache     (lsb:httpd):    Started pm02
 Clone Set: clone_ping
     Started: [ pm02 pm01 ]

Migration summary:
* Node pm02:
* Node pm01:
リソーススイッチバックの確認

pm02 へ resource move を実行しリソースを pm01 へ戻します。

# crm resource move Cluster pm01 force
WARNING: Creating rsc_location constraint 'cli-standby-Cluster' with a score of -INFINITY for resource Cluster on pm02.
        This will prevent Cluster from running on pm02 until the constraint is removed using the 'crm_resource -U' command or manually with cibadmin
        This will be the case even if pm02 is the last node in the cluster
        This message can be disabled with -Q

pm01 へリソースが移動します。

# crm_mon -f
============
Last updated: Tue May 28 04:57:08 2013
Stack: Heartbeat
Current DC: pm02 (420126ea-1e1e-4632-b4fb-eaa2a8915909) - partition with quorum
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87
2 Nodes configured, unknown expected votes
2 Resources configured.
============

Online: [ pm02 pm01 ]

 Resource Group: Cluster
     vip        (ocf::heartbeat:IPaddr2):       Started pm01
     mnt_fs     (ocf::heartbeat:Filesystem):    Started pm01
     apache     (lsb:httpd):    Started pm01
 Clone Set: clone_ping
     Started: [ pm02 pm01 ]

Migration summary:
* Node pm02:
* Node pm01:

同時に移動元に移動禁止フラグがたちます。

# crm configure show
node $id="420126ea-1e1e-4632-b4fb-eaa2a8915909" pm02 \
        attributes standby="off"
node $id="ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9" pm01 \
        attributes standby="off"
primitive apache lsb:httpd \
        op start interval="0s" timeout="60s" on-fail="restart" \
        op monitor interval="30s" timeout="60s" on-fail="restart" \
        op stop interval="0s" timeout="60s" on-fail="fence"
primitive mnt_fs ocf:heartbeat:Filesystem \
        params device="/dev/sdb2" directory="/data" fstype="ext3" \
        op monitor interval="20s" timeout="40s" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive pingd ocf:pacemaker:pingd \
        params name="default_ping_set" host_list="192.168.1.2" interval="10" timeout="10" attempts="5" multiplier="100" \
        op start interval="0" timeout="90" on-fail="restart" \
        op monitor interval="10" timeout="20" on-fail="restart" start-delay="1m" debug="true" \
        op stop interval="0" timeout="100" on-fail="block"
primitive vip ocf:heartbeat:IPaddr2 \
        params ip="192.168.1.103" cidr_netmask="24" nic="eth0" iflabel="0" \
        op start interval="0s" timeout="60s" on-fail="restart" \
        op monitor interval="10s" timeout="60s" on-fail="restart" \
        op stop interval="0s" timeout="60s" on-fail="block"
group Cluster vip mnt_fs apache
clone clone_ping pingd
location cli-prefer-Cluster Cluster \
        rule $id="cli-prefer-rule-Cluster" inf: #uname eq pm01      ※移動禁止フラグ
location cli-standby-Cluster Cluster \
        rule $id="cli-standby-rule-Cluster" -inf: #uname eq pm02    ※移動禁止フラグ
location vip_location vip \
        rule $id="vip_location-rule" -inf: not_defined default_ping_set or default_ping_set lt 100
property $id="cib-bootstrap-options" \
        dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \
        cluster-infrastructure="Heartbeat" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
        last-lrm-refresh="1369683385"
rsc_defaults $id="rsc-options" \
        resource-stickiness="INFINITY" \
        migration-threshold="1"

移動禁止フラグが立つと pm02 へフェイルオーバーできないためクリアします。

# crm resource unmove Cluster

移動禁止フラグが削除されます。

# crm configure show
node $id="420126ea-1e1e-4632-b4fb-eaa2a8915909" pm02 \
        attributes standby="off"
node $id="ca3de0e0-dff2-4d13-a126-b9fbee7e3ec9" pm01 \
        attributes standby="off"
primitive apache lsb:httpd \
        op start interval="0s" timeout="60s" on-fail="restart" \
        op monitor interval="30s" timeout="60s" on-fail="restart" \
        op stop interval="0s" timeout="60s" on-fail="fence"
primitive mnt_fs ocf:heartbeat:Filesystem \
        params device="/dev/sdb2" directory="/data" fstype="ext3" \
        op monitor interval="20s" timeout="40s" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive pingd ocf:pacemaker:pingd \
        params name="default_ping_set" host_list="192.168.1.2" interval="10" timeout="10" attempts="5" multiplier="100" \
        op start interval="0" timeout="90" on-fail="restart" \
        op monitor interval="10" timeout="20" on-fail="restart" start-delay="1m" debug="true" \
        op stop interval="0" timeout="100" on-fail="block"
primitive vip ocf:heartbeat:IPaddr2 \
        params ip="192.168.1.103" cidr_netmask="24" nic="eth0" iflabel="0" \
        op start interval="0s" timeout="60s" on-fail="restart" \
        op monitor interval="10s" timeout="60s" on-fail="restart" \
        op stop interval="0s" timeout="60s" on-fail="block"
group Cluster vip mnt_fs apache
clone clone_ping pingd
location vip_location vip \
        rule $id="vip_location-rule" -inf: not_defined default_ping_set or default_ping_set lt 100
property $id="cib-bootstrap-options" \
        dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \
        cluster-infrastructure="Heartbeat" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
        last-lrm-refresh="1369683385"
rsc_defaults $id="rsc-options" \
        resource-stickiness="INFINITY" \
        migration-threshold="1"

Cisco L2TPv3 を不定アドレスで構築

0
0

例えばインターネット上で、L2TPv3 を使用したい場合、対向がダイナミックなアドレス(以下、不定アドレス)を使用している可能性があります。Cisco の L2TPv3 では、Peer のアドレスに固定アドレスを要求するため、通常の設定では対応できません。ですが、不定アドレスを解決可能な DMVPN 等を併用する事で、これに対応した L2TPv3 を構成する事が可能です。

検証環境

f:id:FriendsNow:20130603195621p:plain:w600

設定例

L2TPv3 の Peer を WAN アドレスではなく、専用の Loopback インターフェースを用いて構築する点がポイントになります。WAN アドレスは、NHRP で解決し、Loopback のネットワークを DMVPN 経由のダイナミックルーティング(本例では EIGRP)で通知します。

R1(WAN 側固定アドレス)

hostname R1
!
vrf definition Mgmt-intf
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family
!
pseudowire-class l2tpv3
 encapsulation l2tpv3
 ip local interface Loopback1
!
crypto isakmp policy 1
 authentication pre-share
crypto isakmp key cisco address 0.0.0.0
!
crypto ipsec transform-set tfset esp-aes esp-sha-hmac
 mode transport
!
crypto ipsec profile profile
 set transform-set tfset
!
interface Loopback1
 ip address 1.1.1.1 255.255.255.0
!
interface Tunnel1
 ip address 10.0.0.1 255.255.255.252
 no ip redirects
 ip mtu 1436
 no ip split-horizon eigrp 1
 ip nhrp authentication poc
 ip nhrp map multicast dynamic
 ip nhrp network-id 100000
 ip nhrp holdtime 10
 tunnel source GigabitEthernet1
 tunnel mode gre multipoint
 tunnel key 100000
 tunnel protection ipsec profile profile
!
interface GigabitEthernet1
 ip address 10.1.1.1 255.255.255.0
 negotiation auto
!
interface GigabitEthernet2
 no ip address
 negotiation auto
 no keepalive
 xconnect 2.2.2.2 1 encapsulation l2tpv3 pw-class l2tpv3
!
interface GigabitEthernet0
 vrf forwarding Mgmt-intf
 ip address 192.168.1.61 255.255.255.0
 negotiation auto
!
router eigrp 1
 network 1.1.1.0 0.0.0.255
 network 10.0.0.0 0.0.0.255
!
ip route 0.0.0.0 0.0.0.0 10.1.1.254
!
end

R2(WAN 側不定アドレス)

hostname R2
!
vrf definition Mgmt-intf
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family
!
pseudowire-class l2tpv3
 encapsulation l2tpv3
 ip local interface Loopback1
!
crypto isakmp policy 1
 authentication pre-share
crypto isakmp key cisco address 0.0.0.0
!
crypto ipsec transform-set tfset esp-aes esp-sha-hmac
 mode transport
!
crypto map dmvpn local-address GigabitEthernet1
crypto map dmvpn 1 ipsec-isakmp
 set peer 10.1.1.1
 set security-association level per-host
 set transform-set tfset
 match address 101
!
interface Loopback1
 ip address 2.2.2.2 255.255.255.0
!
interface Tunnel1
 ip address 10.0.0.2 255.255.255.252
 ip mtu 1436
 ip nhrp authentication poc
 ip nhrp map 10.0.0.1 10.1.1.1
 ip nhrp network-id 100000
 ip nhrp holdtime 10
 ip nhrp nhs 10.0.0.1
 tunnel source GigabitEthernet1
 tunnel destination 10.1.1.1
 tunnel key 100000
 crypto map dmvpn
!
interface GigabitEthernet1
 ip address dhcp hostname R2
 negotiation auto
 crypto map dmvpn
!
interface GigabitEthernet2
 no ip address
 negotiation auto
 no keepalive
 xconnect 1.1.1.1 1 encapsulation l2tpv3 pw-class l2tpv3
!
interface GigabitEthernet0
 vrf forwarding Mgmt-intf
 ip address 192.168.1.62 255.255.255.0
 negotiation auto
!
router eigrp 1
 network 2.2.2.0 0.0.0.255
 network 10.0.0.0 0.0.0.255
!
ip route 0.0.0.0 0.0.0.0 10.1.2.254
!
access-list 101 permit gre any host 10.1.1.1
!
end

R3(網内ルータ想定)

hostname R3
!
vrf definition Mgmt-intf
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family
!
ip dhcp excluded-address 10.1.2.254
!
ip dhcp pool R2
 network 10.1.2.0 255.255.255.0
!
interface GigabitEthernet1
 ip address 10.1.1.254 255.255.255.0
 negotiation auto
!
interface GigabitEthernet2
 ip address 10.1.2.254 255.255.255.0
 negotiation auto
!
interface GigabitEthernet0
 vrf forwarding Mgmt-intf
 ip address 192.168.1.63 255.255.255.0
 negotiation auto
!
end
確認例

R1 が NHRP により、R2 の WAN 側アドレスをダイナミックに解決しています。

R1#show ip nhrp
10.0.0.2/32 via 10.0.0.2
   Tunnel1 created 00:22:10, expire 00:00:07
   Type: dynamic, Flags: unique registered used
   NBMA address: 10.1.2.1

ISAKMP SA を NHRP で解決したアドレスで確立しています。

R1#show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst             src             state          conn-id status
10.1.1.1        10.1.2.1        QM_IDLE           1001 ACTIVE

IPv6 Crypto ISAKMP SA

対向の Loopback ネットワーク[2.2.2.2]を Tunnel 経由の EIGRP で学習しています。

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 10.1.1.254 to network 0.0.0.0

S*    0.0.0.0/0 [1/0] via 10.1.1.254
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback1
L        1.1.1.1/32 is directly connected, Loopback1
      2.0.0.0/24 is subnetted, 1 subnets
D        2.2.2.0 [90/27008000] via 10.0.0.2, 00:30:12, Tunnel1
      10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
C        10.0.0.0/30 is directly connected, Tunnel1
L        10.0.0.1/32 is directly connected, Tunnel1
C        10.1.1.0/24 is directly connected, GigabitEthernet1
L        10.1.1.1/32 is directly connected, GigabitEthernet1

Loopback インターフェースを使用して、L2TPv3 が確立されます。

R1#show l2tp session

L2TP Session Information Total tunnels 1 sessions 1

LocID      RemID      TunID      Username, Intf/      State  Last Chg Uniq ID
                                 Vcid, Circuit
3381341951 1248987571 4250176163 1, Gi2               est    00:23:48 0

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 はクラスタ内の各ノードでユニークである必要があります。

Squid 設定ファイルの Reload について

0
0

squid.conf を編集した際、設定ファイルを reload する事で、既存セッションに影響を与える事なく、設定を反映させる事が可能です。下記は HUP*1シグナルを使用して、設定ファイルを reload する例になります。

# /usr/local/squid/sbin/squid -k reconfigure

reload コマンドで代用可能です。

# /etc/rc.d/init.d/squid reload

下記のとおり、既存セッションは維持されます。

# netstat -lanput | grep squid | grep -i ESTABLISHED | wc -l
123

*1:Hang Up Signal

Cisco L2TPv3 の冗長化

0
0

L2TPv3 の Peer に Loopback インターフェースを指定し、当該ネットワークを OSPF 等のダイナミックルーティングで解決させる事で冗長化が可能です。切替時間は、ダイナミックルーティングの収束時間に依存します。

検証環境

f:id:FriendsNow:20130817160554p:plain:w600

設定例

メイン及び、バックアップ回線は、マルチキャストを透過しない WAN(地域 IP 網等)を想定します。
L2TPv3 用の Peer ネットワーク(Loopback)を、GRE over OSPF でメイン回線へアドバタイズし、バックアップ回線向けの Floating Static を定義します。

R1: csr1000v-packages-adventerprisek9.03.09.01.S.153-2.S1

hostname R1
!
pseudowire-class l2tpv3
 encapsulation l2tpv3
 ip local interface Loopback1
!
interface Loopback1
 ip address 1.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface Tunnel1
 ip address 172.16.11.1 255.255.255.252
 tunnel source GigabitEthernet2
 tunnel destination 172.16.1.2
!
interface Tunnel2
 ip address 172.16.12.1 255.255.255.252
 tunnel source GigabitEthernet3
 tunnel destination 172.16.2.2
!
interface GigabitEthernet1
 no ip address
 negotiation auto
 no keepalive
 xconnect 2.2.2.2 1 encapsulation l2tpv3 pw-class l2tpv3
!
interface GigabitEthernet2
 ip address 172.16.1.1 255.255.255.0
 shutdown
 negotiation auto
!
interface GigabitEthernet3
 ip address 172.16.2.1 255.255.255.0
 negotiation auto
!
router ospf 1
 network 1.1.1.0 0.0.0.255 area 0
 network 172.16.11.0 0.0.0.3 area 0
!
ip route 2.2.2.0 255.255.255.0 Tunnel2 200
!
end

R2: csr1000v-packages-adventerprisek9.03.09.01.S.153-2.S1

hostname R2
!
pseudowire-class l2tpv3
 encapsulation l2tpv3
 ip local interface Loopback1

interface Loopback1
 ip address 2.2.2.2 255.255.255.0
 ip ospf network point-to-point
!
interface Tunnel1
 ip address 172.16.11.2 255.255.255.252
 tunnel source GigabitEthernet2
 tunnel destination 172.16.1.1
!
interface Tunnel2
 ip address 172.16.12.2 255.255.255.252
 tunnel source GigabitEthernet3
 tunnel destination 172.16.2.1
!
interface GigabitEthernet1
 no ip address
 negotiation auto
 no keepalive
 xconnect 1.1.1.1 1 encapsulation l2tpv3 pw-class l2tpv3
!
interface GigabitEthernet2
 ip address 172.16.1.2 255.255.255.0
 negotiation auto
!
interface GigabitEthernet3
 ip address 172.16.2.2 255.255.255.0
 negotiation auto
!
router ospf 1
 network 2.2.2.0 0.0.0.255 area 0
 network 172.16.11.0 0.0.0.3 area 0
!
ip route 1.1.1.0 255.255.255.0 Tunnel2 200
!
end

R3: csr1000v-packages-universalk9.03.10.00.S.153-3.S

hostname R3
!
interface GigabitEthernet1
 no ip address
 negotiation auto
 service instance 1 ethernet
  encapsulation untagged
  bridge-domain 1
!
interface GigabitEthernet2
 no ip address
 negotiation auto
 service instance 1 ethernet
  encapsulation untagged
  bridge-domain 1
!
end
確認例

L2TPv3 を Loopback インターフェースで確立しています。

R1#show l2tp tunnel transport

L2TP Tunnel Information Total tunnels 1 sessions 1

LocTunID   Type Prot  Local Address   Port  Remote Address  Port
3886356642 IP   115   1.1.1.1         0     2.2.2.2         0

正常時、対向の Loopback は OSPF で学習しています。

R1#sh ip route 2.2.2.2
Routing entry for 2.2.2.0/24
  Known via "ospf 1", distance 110, metric 1001, type intra area
  Last update from 172.16.11.2 on Tunnel1, 01:20:40 ago
  Routing Descriptor Blocks:
  * 172.16.11.2, from 2.2.2.2, 01:20:40 ago, via Tunnel1
      Route metric is 1001, traffic share count is 1

R2-R3 間で障害発生時は、Floating Static により、Backup 経路を使用します。

R1#show ip route 2.2.2.2
Routing entry for 2.2.2.0/24
  Known via "static", distance 200, metric 0 (connected)
  Routing Descriptor Blocks:
  * directly connected, via Tunnel2
      Route metric is 0, traffic share count is 1

L2TPv3 は新しい経路で再確立します。

R1#show l2tp session all

L2TP Session Information Total tunnels 1 sessions 1

Session id 2380820166 is up, logical session id 32777, tunnel id 3886356642
  Remote session id is 375499793, remote tunnel id 303422462
  Locally initiated session
  Unique ID is 0
Session Layer 2 circuit, type is Ethernet, name is GigabitEthernet1
  Session vcid is 1
  Circuit state is UP
    Local circuit state is UP
    Remote circuit state is UP
Call serial number is 2047900001
Remote tunnel name is R2
  Internet address is 2.2.2.2
Local tunnel name is R1
  Internet address is 1.1.1.1
IP protocol 115
  Session is L2TP signaled
  Session state is established, time since change 01:28:06
    0 Packets sent, 0 received
    0 Bytes sent, 0 received
  Last clearing of counters never
  Counters, ignoring last clear:
    0 Packets sent, 0 received
    0 Bytes sent, 0 received
    Receive packets dropped:
      out-of-order:             0
      other:                    0
      total:                    0
    Send packets dropped:
      exceeded session MTU:     0
      other:                    0
      total:                    0
  DF bit off, ToS reflect disabled, ToS value 0, TTL value 255
  Sending UDP checksums are disabled
  Received UDP checksums are verified
  No session cookie information available
  FS cached header information:
    encap size = 24 bytes
    45000014 00000000 ff73b571 01010101
    02020202 1661ac11
  Sequencing is off
  Conditional debugging is disabled
  SSM switch id is 4096, SSM segment id is 12300

OSPF で Neighbor を確立できない原因

0
0

OSPF で Neighbor を確立できない要因は様々ですが、その中に「パラメータのミスマッチ」があります。
Neighbor を確立するために、対向で合わせる必要があるパラメータをいくつか紹介致します。

Network Type

Cisco は下記の Network type をサポートしています。

  • Non Broadcast Multi Access (NBMA) - RFC 2328 Standard
  • Broadcast - Cisco Proprietary
  • Point-to-Multipoint - RFC Standard
  • Point-to-Multipoint, Non-Broadcast - Cisco Proprietary
  • Point-to-Point - Cisco Standard
  • Loopback - Cisco Standard

Network Type は show ip ospf interface コマンドで確認します。

Router#show ip ospf interface
GigabitEthernet2 is up, line protocol is up
  Internet Address 100.64.1.2/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 100.64.1.2, Network Type NON_BROADCAST, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 100.64.1.2, Interface address 100.64.1.2
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:06
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Can be protected by per-prefix Loop-Free FastReroute
  Can be used for per-prefix Loop-Free FastReroute repair paths
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
OSPF Area Type

Cisco は下記の Area Type をサポートしています。

  • Backbone area (area 0)
  • Standard area
  • Stub area
  • Totally stubby area
  • Not-so-stubby area (NSSA)

Area Type は show ip ospf コマンドで確認します。

Router#show ip ospf
 Routing Process "ospf 1" with ID 100.64.1.2
 Start time: 02:42:47.473, Time elapsed: 04:13:37.263
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Supports NSSA (compatible with RFC 3101)
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 Router is not originating router-LSAs with maximum metric
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Incremental-SPF disabled
 Minimum LSA interval 5 secs
 Minimum LSA arrival 1000 msecs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 0 normal 1 stub 0 nssa
 Number of areas transit capable is 0
 External flood list length 0
 IETF NSF helper support enabled
 Cisco NSF helper support enabled
 Reference bandwidth unit is 100 mbps
    Area 1
        Number of interfaces in this area is 1
        It is a stub area
        Area has no authentication
        SPF algorithm last executed 00:14:46.179 ago
        SPF algorithm executed 3 times
        Area ranges are
        Number of LSA 3. Checksum Sum 0x0095DE
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

Area Type が対向で異なる場合、debug ip ospf hello で下記エラーを検出します。

OSPF-1 HELLO Gi2: Rcv hello from 100.64.1.1 area 1 100.64.1.1
OSPF-1 HELLO Gi2: Hello from 100.64.1.1 with mismatched NSSA option bit
Hello/Dead Interval

Hello/Dead Interval のデフォルトは下記のとおりです。

  • Non Broadcast Multi Access (NBMA) - Hello 30sec / Dead 120sec
  • Broadcast- Hello 10sec / Dead 40sec
  • Point-to-Multipoint - Hello 30sec / Dead 120sec
  • Point-to-Multipoint, Non-Broadcast - Hello 30sec / Dead 120sec
  • Point-to-Point - Hello 10sec / Dead 40sec
  • Loopback - N/A|

Hello/Dead Interval は show ip ospf interface コマンドで確認します。

Router#show ip ospf interface
GigabitEthernet2 is up, line protocol is up
  Internet Address 100.64.1.2/24, Area 1, Attached via Network Statement
  Process ID 1, Router ID 100.64.1.2, Network Type BROADCAST, Cost: 1
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           1         no          no            Base
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 100.64.1.2, Interface address 100.64.1.2
  No backup designated router on this network
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:08
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Can be protected by per-prefix Loop-Free FastReroute
  Can be used for per-prefix Loop-Free FastReroute repair paths
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)

Hello/Dead Interval が対向で異なる場合、debug ip ospf hello で下記エラーを検出します。

OSPF-1 HELLO Gi2: Rcv hello from 100.64.1.1 area 1 100.64.1.1
OSPF-1 HELLO Gi2: Mismatched hello parameters from 100.64.1.1
OSPF-1 HELLO Gi2: Dead R 30 C 40, Hello R 10 C 10 Mask R 255.255.255.0 C 255.255.255.0

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'

Exchange コマンドメモ

0
0

Exchange のトラブルシューティングで、よく使用するコマンドメモ

HUB サーバー

全 HUB サーバーで滞留しているキューの合計情報を出力します。
例)システム名: HUB001-005 で滞留しているキューを出力する場合

[PS] C:\> Get-ExchangeServer hub* | Get-Queue | Where-Object {$_.MessageCount -ne 0}| Measure-Object -Property MessageCount -sum
 
Count    : 9
Average  :
Sum      : 16
Maximum  :
Minimum  :
Property : MessageCount
MBX サーバー

全 MBX サーバーで滞留している DAG データーベースのコピー/リプレイキューの情報を出力します。
例)システム名:MBX001-005 が抱えている DB001-003 のコピー/リプレイキューを出力する場合

[PS] C:\> Get-MailboxDatabaseCopyStatus db* | sort name | ft name,status,copyqueuelength,replayqueuelength -AutoSize

Name          Status CopyQueueLength ReplayQueueLength
----          ------ --------------- -----------------
DB001\MBX001 Mounted               0                 0
DB001\MBX002 Healthy               0                 1
DB001\MBX003 Healthy               0                 1
DB002\MBX002 Mounted               0                 0
DB002\MBX003 Healthy               0                 1
DB002\MBX004 Healthy               0                 1
DB003\MBX003 Mounted               0                 0
DB003\MBX004 Healthy               0                 0
DB003\MBX005 Healthy               1                 0

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

Juniper SRX の基本操作について

0
0

IP アドレスの設定

root# set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.1/24

インターフェースに対して Ping を許可*1

root# set security zones security-zone untrust interfaces ge-0/0/1 host-inbound-traffic system-services ping

OSPF の設定

root# set security zones security-zone untrust interfaces ge-0/0/1 host-inbound-traffic protocols all
root# set protocols ospf area 0 interface ge-0/0/1
root# set protocols ospf area 0 interface lo0

OSPF Neighbor の確認

root# run show ospf neighbor
Address          Interface              State     ID               Pri  Dead
10.1.1.1         ge-0/0/1.0             Full      1.1.1.1          128    34

OSPF Interface の確認

root# run show ospf interface
Interface           State   Area            DR ID           BDR ID          Nbrs
ge-0/0/1.0          DR      0.0.0.0         2.2.2.2         1.1.1.1            1
lo0.0               DR      0.0.0.0         2.2.2.2         0.0.0.0            0

OSPF Database の確認

root# run show ospf database

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router   1.1.1.1          1.1.1.1          0x80000004   123  0x22 0x5095  60
Router  *2.2.2.2          2.2.2.2          0x80000005   117  0x22 0xc212  60
Network *10.1.1.2         2.2.2.2          0x80000001   122  0x22 0x2ceb  32

OSPF 経由で学習したルート情報の確認

root# run show route protocol ospf

inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.0/24         *[OSPF/10] 00:02:02, metric 1
                    > to 10.1.1.1 via ge-0/0/1.0
1.1.1.1/32         *[OSPF/10] 00:02:02, metric 1
                    > to 10.1.1.1 via ge-0/0/1.0
224.0.0.5/32       *[OSPF/10] 00:05:46, metric 1
                      MultiRecv

初期化(工場出荷状態)

root# load factory-default
warning: activating factory configuration

root# set system root-authentication plain-text-password
New password:
Retype new password:

シャットダウン

root# run request system halt
Halt the system ? [yes,no] (no) yes	

*1:デフォルトは拒否となっています。

Viewing all 266 articles
Browse latest View live




Latest Images