NetApp SNMP関連設定

NetAppのSNMP関連の備忘録

SNMP Polling

> options snmp
snmp.access                  host=xx.xx.xx.xx,xx.xx.xx.xx
snmp.enable                  on

SNMP Trap

コミュニティ設定

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

Traphost設定

追加する場合
> snmp traphost add [Trap送信先IP]

削除する場合
> snmp traphost delete [Trap送信先IP]

SNMP Daemonの有効化。

> snmp init 1
※実行したタイミングでCold StartのTrapが送信される

確認

> snmp
contact:
        ****
location:
        ****
authtrap:
        0
init:
        1
traphosts:
        **** (****) 
        **** (****) 
        **** (****) 
        **** (****) 
community:
        ro ****

NetApp cifs domainまわりの設定

頻繁に触ることはないので、備忘録を兼ねて。
ADサーバの参照先をを変更したりしました。

> cifs domaininfo
NetBios Domain:           ****
Windows 2003 Domain Name: *****.ad.jp
Type:                     Windows ****
Filer AD Site:            ****

Current Connected DCs:    \\****
Total DC addresses found: 4
Preferred Addresses:
                          xx.xx.xx.xx     ****             PDC
                          xx.xx.xx.xx                      PDC
                          xx.xx.xx.xx                      PDC
                          xx.xx.xx.xx                      PDC
Favored Addresses:
                          None
Other Addresses:
                          None

Connected AD LDAP Server: \\****.ad.jp
Preferred Addresses:
                          xx.xx.xx.xx
                           ****.ad.jp
                          xx.xx.xx.xx

                          xx.xx.xx.xx

                          xx.xx.xx.xx

Favored Addresses:
                          None
Other Addresses:
                          None

アドレスを変更する場合は…

> cifs prefdc add [ドメイン名] xx.xx.xx.xx xx.xx.xx.xx xx.xx.xx.xx xx.xx.xx.xx (参照先IPを並べる)

設定反映を確認

> cifs prefdc print
Preferred DC ordering per domain:

 ****:
        1. xx.xx.xx.xx
        2. xx.xx.xx.xx
        3. xx.xx.xx.xx
        4. xx.xx.xx.xx

resetdcで接続しに行く

> cifs resetdc

HP iLO Standalone Remote Console

iLOまわりで調べてたら、こんなのを見つけたので備忘と紹介

2015/7/6時点でのダウンロードURL

HP Lights-Outスタンド アロン リモート コンソール for Windows
Drivers & Software - HP Support Center.

インストールして起動。iLOページを経由しなくてもコンソールが使える。

CentOS yum updateエラー

yumコマンドで操作してもエラーが出てうまく動かない様子だったので調査

# yum check-update
Loaded plugins: fastestmirror, security
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. 6.5 is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6.5/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

# cat /etc/redhat-release
CentOS release 6.5 (Final)

この中で、

Eg. 6.5 is not a valid and current release or hasnt been released yet

が気になって調べてみた結果、

# rm /etc/yum/vars/releasever

でいけた。ちなみに何が書いていたかというと、

# cat /etc/yum/vars/releasever
6.5

だった

Juniper SSG セッション関連

Firewall使ってると、ちゃんとトラフィックが流れているか見たくなるのでメモ。

コマンドメモ

get session ?
 >                    redirect output
 |                    match output
 
 dst-ip               destination ip address
 dst-mac              destination mac address
 dst-port             destination port number or range
 id                   show sessions with id
 ike-nat              show ike-nat ALG info
 info                 show sessions summary info
 ipsec-nat            show ipsec pinhole ALG info
 policy-id            policy id
 protocol             protocol number or range
 rm                   show sessions for resource management
 service              show sessions with service type
 src-ip               source ip address
 src-mac              source mac address
 src-port             source port number or range
 tunnel               show tunnel sessions
 vsd-id               get vsd-id specified sessions

get session

alloc 15432/max 256064, alloc failed 0, mcast alloc 0, di alloc failed 0
total reserved 0, free sessions in shared pool 240632
id 127878/s**,vsys 0,flag 00000000/0000/0001/0000,policy 20,time 6, dip 10 module 0
 if 0(nspflag 800801):xx.xx.xx.xx/59269->xx.xx.xx.xx/161,17,02e052fe4664,sess token 16,vlan 0,tun 0,vsd 0,route 8
 if 5(nspflag 10800800):xx.xx.xx.xx/50328<-xx.xx.xx.xx/161,17,00005e000104,sess token 17,vlan 0,tun 0,vsd 0,route 11
(以下略)

Src/DstなどでFilter

Filterして必要な物だけ見る。

get session src-ip xx.xx.xx.xx dst-ip xx.xx.xx.xx dst-port 23
alloc 15801/max 256064, alloc failed 0, mcast alloc 0, di alloc failed 0
total reserved 0, free sessions in shared pool 240263
Total 1 sessions according filtering criteria.
id 232969/s**,vsys 0,flag 0c000000/0000/0001/0000,policy 92,time 4320, dip 0 module 0
 if 0(nspflag 801801):xx.xx.xx.xx/53168->xx.xx.xx.xx/23,6,02e052fe4664,sess token 16,vlan 0,tun 0,vsd 0,route 8,wsf 0
 if 5(nspflag 801800):xx.xx.xx.xx/53168<-xx.xx.xx.xx/23,6,00005e000104,sess token 17,vlan 0,tun 0,vsd 0,route 11,wsf 7

Juniper SRX セッション関連

Firewall使ってると、ちゃんとトラフィックが流れているか見たくなるのでメモ。

コマンドメモ

show security flow session
Possible completions:
  <[Enter]>            Execute this command
  application          Application protocol name
  application-firewall  Show application-firewall sessions
  application-firewall-rule-set  Show application-firewall session by rule-set
  brief                Show brief output (default)
  destination-port     Destination port (1..65535)
  destination-prefix   Destination IP prefix or address
  dynamic-application  Dynamic application name
  dynamic-application-group  Dynamic application group name
  extensive            Show detailed output
  family               Protocol family
  idp                  IDP sessions
  interface            Name of incoming or outgoing interface
  nat                  Sessions with network address translation
  protocol             IP protocol number
  resource-manager     Sessions with resource manager
  session-identifier   Show session with specified session identifier
  source-port          Source port (1..65535)
  source-prefix        Source IP prefix or address
  summary              Show output summary
  tunnel               Tunnel sessions
  |                    Pipe through a command

show security flow session

 node0:
 --------------------------------------------------------------------------

Session ID: 115, Policy name: xxxxx, State: Active, Timeout: 1766, Valid
  In: xx.xx.xx.xx/57050 --> xx.xx.xx.xx/5073;tcp, If: reth0.0, Pkts: 106939, Bytes: 9412714
  Out: xx.xx.xx.xx/5073 --> xx.xx.xx.xx/57050;tcp, If: reth1.0, Pkts: 92082, Bytes: 71627805

Session ID: 118, Policy name: xxxxx, State: Active, Timeout: 8, Valid
  In: xx.xx.xx.xx/37123 --> xx.xx.xx.xx/161;udp, If: reth0.0, Pkts: 52, Bytes: 7354
  Out: xx.xx.xx.xx/161 --> xx.xx.xx.xx/59284;udp, If: reth1.0, Pkts: 52, Bytes: 8221
(以下略)

Src/DstなどでFilter

Filterして必要な物だけ見る。

show security flow session source-prefix xx.xx.xx.xx destination-prefix xx.xx.xx.xx
 node0:
 --------------------------------------------------------------------------

Session ID: 447495, Policy name: xxxxx, State: Active, Timeout: 16, Valid
  In: xx.xx.xx.xx/48291 --> xx.xx.xx.xx/80;tcp, If: reth0.0, Pkts: 2, Bytes: 120
  Out: xx.xx.xx.xx/80 --> xx.xx.xx.xx/48291;tcp, If: reth1.0, Pkts: 0, Bytes: 0
Total sessions: 1

 node1:
 --------------------------------------------------------------------------

Session ID: 19666, Policy name: xxxxx/39, State: Backup, Timeout: 14400, Valid
  In: xx.xx.xx.xx/48291 --> xx.xx.xx.xx/80;tcp, If: reth0.0, Pkts: 0, Bytes: 0
  Out: xx.xx.xx.xx/80 --> xx.xx.xx.xx/48291;tcp, If: reth1.0, Pkts: 0, Bytes: 0
Total sessions: 1

NetApp volumeの拡張方法(SnapMirror環境下)

NetAppのvolumeは柔軟に拡張(縮小)ができる。
拡張時の備忘録。

Aggregateのサイズ確認

df -Ah
Aggregate                total       used      avail capacity
aggr0                   xxxxGB     xxxxGB     xxxxGB      xx%
aggr0/.snapshot            xGB       xxGB        xGB     ---%

Aggregateの容量を確認し、拡張に必要な空き容量があるか確認。

volume容量確認

df -h
Filesystem               total       used      avail capacity  Mounted on
/vol/vol0/               xxxGB     xxxxMB      xxxGB       x%  /vol/vol0/
/vol/vol0/.snapshot      xxxGB     xxxxMB      xxxGB       x%  /vol/vol0/.snapshot
/vol/vol1/               xxxGB      xxxGB       xxGB      xx%  /vol/vol1/
/vol/vol1/.snapshot      xxxGB       xxGB       xxGB      xx%  /vol/vol1/.snapshot
(略)

拡張前に容量を確認しておく

fs_size_fixedの設定確認

vol status vol1
         Volume State           Status            Options
           vol1 online          raid_dp, flex     create_ucode=on, convert_ucode=on,
                                64-bit            maxdirsize=10470, fs_size_fixed=on
                         Volume UUID: ~
                Containing aggregate: 'aggr0'

Src側は拡張時に一旦offにする必要がある。Dst側はoffにしなくても良い

Dst側volume拡張

 vol size vol1 +200g

vol1を200G拡張する場合。

Warning: Volume 'vol1' is a replica.  This will not change the
file system size in the replica, which is set from the replica source.
The new volume size will be used to set the upper limit on replica
transfers into this volume.

拡張時、上記警告がでるけどSrc側の拡張に合わせて自動的にされる仕組み。

volume容量拡張確認

df -h
Filesystem               total       used      avail capacity  Mounted on
/vol/vol0/               xxxGB     xxxxMB      xxxGB       x%  /vol/vol0/
/vol/vol0/.snapshot      xxxGB     xxxxMB      xxxGB       x%  /vol/vol0/.snapshot
/vol/vol1/               xxxGB      xxxGB       xxGB      xx%  /vol/vol1/
/vol/vol1/.snapshot      xxxGB       xxGB       xxGB      xx%  /vol/vol1/.snapshot
(略)