2016年7月12日火曜日

UbuntuとNimbleのiSCSI接続メモメモ

LinuxでiSCSI 接続設定時、いつもコマンドラインを実行しますね。しかし、時間たつと、コマンドを忘れてしまい、もう一度グーグルで調べて、時間無駄になります。ここでメモしておきます。

1.OSのインストール(省略)
2.componentをインストール
iSCSI initiator install
multipath install
3.関連ファイルを編集
4.Nimbleに接続
5.接続確認
6.切断用コマンド
7.よく使うコマンド

-------------------------
今回の検証環境:
OS:ubuntu 14.04.1(64-bit)
#uname -a
Linux ubuntu01 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

※準備:
root権限に切り替え
ists@ubuntu01:~$ sudo -i
[sudo] password for summer:

2.componentをインストール
2-1.iSCSI initiator install
#sudo apt install open-iscsi

2-2.multipath install
#apt-get install multipath-tools
(install例.....)
root@ubuntu01:~# apt-get install multipath-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  kpartx libaio1
Suggested packages:
  multipath-tools-boot
The following NEW packages will be installed:
  kpartx libaio1 multipath-tools
0 upgraded, 3 newly installed, 0 to remove and 193 not upgraded.
Need to get 161 kB of archives.
After this operation, 837 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://jp.archive.ubuntu.com/ubuntu/ trusty/main libaio1 amd64 0.3.109-4 [6,364 B]
Get:2 http://jp.archive.ubuntu.com/ubuntu/ trusty-updates/main kpartx amd64 0.4.9-3ubuntu7.13 [22.8 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu/ trusty-updates/main multipath-tools a md64 0.4.9-3ubuntu7.13 [131 kB]
Fetched 161 kB in 0s (2,121 kB/s)
Selecting previously unselected package libaio1:amd64.
(Reading database ... 55923 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.109-4_amd64.deb ...
Unpacking libaio1:amd64 (0.3.109-4) ...
Selecting previously unselected package kpartx.
Preparing to unpack .../kpartx_0.4.9-3ubuntu7.13_amd64.deb ...
Unpacking kpartx (0.4.9-3ubuntu7.13) ...
Selecting previously unselected package multipath-tools.
Preparing to unpack .../multipath-tools_0.4.9-3ubuntu7.13_amd64.deb ...
insmod /lib/modules/3.13.0-32-generic/kernel/drivers/scsi/device_handler/scsi_dh.ko
insmod /lib/modules/3.13.0-32-generic/kernel/drivers/md/dm-multipath.ko
Unpacking multipath-tools (0.4.9-3ubuntu7.13) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libaio1:amd64 (0.3.109-4) ...
Setting up kpartx (0.4.9-3ubuntu7.13) ...
Setting up multipath-tools (0.4.9-3ubuntu7.13) ...
successfully reset wwids
 * Starting multipath daemon multipathd                                  [ OK ]

3.関連ファイルを編集
3-1.iSCSI config fileを編集
#vi /etc/iscsi/iscsid.conf

「iscsid.conf」中の設定値を以下のように変更。
node.startup = automatic

# For multipath configurations, you may want more than one session to be
# created on each iface record.  If node.session.nr_sessions is greater
# than 1, performing a 'login' for that node will ensure that the
# appropriate number of sessions is created.
node.session.nr_sessions = 1→2
※変更必要ないと思いますけど....

# To specify the length of time to wait for session re-establishment
# before failing SCSI commands back to the application when running
# the Linux SCSI Layer error handler, edit the line.
# The value is in seconds and the default is 120 seconds.
node.session.timeo.replacement_timeout = 120

# Time interval to wait for on connection before sending a ping.
node.conn[0].timeo.noop_out_interval = 5

# To specify the time to wait for a Nop-out response before failing
# the connection, edit this line. Failing the connection will
# cause IO to be failed back to the SCSI layer. If using dm-multipath
# this will cause the IO to be failed to the multipath layer.
node.conn[0].timeo.noop_out_timeout = 5→10

適用するに、再起動
#/etc/init.d/open-iscsi restart

3-2.multipath.conf 編集
最初にmultipath.confファイルがないので、コピーします。(Linuxにより、ファイル場所が異なる場合があります。)
#cp /usr/share/doc/multipath-tools/examples/multipath.conf.synthetic /etc/multipath.conf

#vi /etc/multipath.conf
■Example multipath.conf for Linux kernel 2.6.18.x
device {
vendor "Nimble"
product "Server"
path_selector "round-robin 0"
features "1 queue_if_no_path"
dev_loss_tmo infinity
fast_io_fail_tmo 1
prio_callout "/sbin/mpath_prio_alua /dev/%n"
path_grouping_policy group_by_prio
path_checker tur
hardware_handler "1 alua"
rr_min_io 20
failback 10
rr_weight priorities
}
■Example multipath.conf for Linux kernel 2.6.32.x and above
device {
  vendor "Nimble"
product "Server"
  rr_weight priorities
  path_grouping_policy group_by_prio
  rr_min_io_rq 20
  failback 10
  path_selector "round-robin 0"
  path_checker "tur"
  hardware_handler "1 alua"
features "1 queue_if_no_path"
prio "alua"
dev_loss_tmo infinity
fast_io_fail_tmo 1
}

・multipath.confの設定値を適用するにservice 再起動
#service multipath-tools stop
#service multipath-tools start


4.Nimbleに接続
4-1.Get iSCSI initiator name
#cat /etc/iscsi/initiatorname.iscsi
※Nimbleにinitiator groupを設定するため
root@ubuntu01:~# cat /etc/iscsi/initiatorname.iscsi
## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator.  The InitiatorName must be unique
## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1993-08.org.debian:01:bf56f1fbbb1d

4-2.discovery nimble volume
#iscsiadm –m discovery –t st –p 10.222.10.88
root@ubuntu01:/usr/share/doc/multipath-tools/examples# iscsiadm -m discovery -t st -p 10.222.10.88
10.100.10.89:3260,2460 iqn.2007-11.com.nimblestorage:gundam-af3000-g6f21144ca7c08357
10.200.10.89:3260,2460 iqn.2007-11.com.nimblestorage:gundam-af3000-g6f21144ca7c08357
10.100.10.88:3260,2460 iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b
10.200.10.88:3260,2460 iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b

4-3. login nimble
# iscsiadm -m node -T iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b 10.100.10.88:3260 --login
Logging in to [iface: default, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.200.10.88,3260] (multiple)
Logging in to [iface: default, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.100.10.88,3260] (multiple)
Login to [iface: default, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.200.10.88,3260] successful.
Login to [iface: default, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.100.10.88,3260] successful.

4-4. iSCSI target login確認
# iscsiadm -m session
tcp: [17] 10.200.10.88:3260,2460 iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b
tcp: [18] 10.100.10.88:3260,2460 iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b

#iscsiadm -m node
10.200.10.88:3260,2460 iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b
10.100.10.88:3260,2460 iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b
10.100.10.89:3260,2460 iqn.2007-11.com.nimblestorage:gundam-af3000-g6f21144ca7c08357
10.200.10.89:3260,2460 iqn.2007-11.com.nimblestorage:gundam-af3000-g6f21144ca7c08357


5.接続確認
5-1.multipath 確認
# multipath -ll
20ce2a7a6859813b66c9ce9001b97e1c8 dm-2 Nimble  ,Server
size=100G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
`-+- policy='round-robin 0' prio=130 status=active
  |- 19:0:0:0 sdc 8:32 active ready running
  `- 20:0:0:0 sdb 8:16 active ready running


6.nimbleのvolumeと切断
# iscsiadm -m node --logout all
Logging out of session [sid: 17, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.200.10.88,3260]
Logging out of session [sid: 18, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.100.10.88,3260]
Logout of [sid: 17, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.200.10.88,3260] successful.
Logout of [sid: 18, target: iqn.2007-11.com.nimblestorage:ubuntu-vol1-v6f21144ca7c08357.00000010.c8e1971b, portal: 10.100.10.88,3260] successful.

7.よく使うコマンド
#fdisk –l
#iscsiadm –m discovery –t st –p <iSCSI discovery IP>
#iscsiadm –m node –T <iSCSI node name> <iscsi discovery IP address>:3260  --login
#iscsiadm –m node
#iscsiadm –m session
#iscsiadm –m node –logout all
#multipath -ll
#multipath -r

----------------------------
・nimbleの設定
Nimble OS $ ip --list
---------------+---------+------+----------+---------------+--------------------
IP Address      NIC       Status Type       Array           Controller
---------------+---------+------+----------+---------------+--------------------
10.100.10.88    tg1       up     discovery  gundam-afa      A
10.100.10.89    tg1       up     data       gundam-afa      A
10.200.10.88    tg2       up     discovery  gundam-afa      A
10.200.10.89    tg2       up     data       gundam-afa      A
10.222.10.88    eth1      up     management gundam-afa      A
10.222.10.89    eth1      up     support    gundam-afa      A
10.222.10.90    eth1      up     support    gundam-afa      B

2016年4月27日水曜日

Could Not Find Trusted Signer Error While Installing VIBs in VMware vSphere ESXi

Nimble storageはVMwareの環境でNCM(Nimble Connection Manager)をインストールする必要があります。

新しいNCM3.2をインストールするとき、以下のエラーメッセージが表示します:
(RC versionなのでオンラインインストール不可です。)

[root@localhost:/(省略)] esxcli software vib install -d /vmfs/vo
lumes/datastore1/nimble-ncm-for-esx6-3.2.0-600002.zip
 [InstallationError]
 ('Nimble_bootbank_nimble-psp_3.2.0-600002', 'Could not find a trusted signer.')
       vibs = Nimble_bootbank_nimble-psp_3.2.0-600002
 Please refer to the log file for more details.

トラスト署名がないというエラーが表示...
解決方法は以下です。署名を検証しないようなparameterを追加します。

esxcli software vib install
-d /vmfs/volumes/datastore1/nimble-ncm-for-esx6-3.2.0-600002.zip --no-sig-check

実行例:
[root@localhost:/(省略)/log/nimble] esxcli software vib install
-d /vmfs/volumes/datastore1/nimble-ncm-for-esx6-3.2.0-600002.zip --no-sig-check
Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: Nimble_bootbank_nimble-ncs_3.2.0-600002, Nimble_bootbank_nimble-psp_3.2.0-600002
   VIBs Removed: Nimble_bootbank_nimble-ncs_2.3.1-600006, Nimble_bootbank_nimble-psp_2.3.1-600006
   VIBs Skipped:
esxcli software vib install -d /vmfs/volumes/datastore1/nimble-ncm-for-esx6-3.2.0-600002.zip --no-sig-check

再起動した後、確認:
[root@localhost:~] esxcli software vib list | grep nimble
nimble-ncs                     3.2.0-600002                         Nimble    VMwareAccepted    2016-04-28
nimble-psp                     3.2.0-600002                         Nimble    VMwareAccepted    2016-04-28

追加メモ:
ESX5.xサーバー:
インストール時、適用するために再起動不要。
アップデート時、適用するために再起動必要。

ESX6.0サーバー:
インストール時、適用するために再起動必要。
アップデート時、適用するために再起動必要。


2015年8月18日火曜日

格安10GSwitchを検証してみました

Nimbleストレージを提案するときに、スイッチが必要とメーカさんに言われています。
10Gスイッチはデルの一番少ないポート数と言っても、24ポートですよね。
テスト環境、開発環境など使う際、サーバー1台、ストレージ1台をあわせても、6ポートだけがあれば、十分です。
24ポートはなんかもったいないです。

ポート数8ポートから12ポートくらいの格安スイッチを探し始めました。
そこで現れたのは「NetGear」でした!しかも、10GBaseTなので、10G SFP+が要りません。なんと嬉しいポイントいっぱいです!

機能違いスマートスイッチからフルマネジスイッチ、8ポートから24ポートまで、10Gbitネットワーク環境に品揃えも豊富です。製品の詳細はこちらです。
http://www.netgear.jp/solutions/businesssolutions/switch/10GbE_switch.html

今回の検証は10G BaseT 12ポートの「XS712T」にしました。
互換性、性能検証してみました。

NimbleStorageの調達は10GBaseTできず、10G SFP+のインターフェスです。

■検証パターンは3つ組み合わせ:
1. NetGearの10Gスイッチ+10G SFP+
スイッチ:XS712T
10G SFP+:NetGearのSFP+(AXM761)
2.  NetGearの10Gスイッチ+10G copper cable
スイッチ:XS712T
10G copper cable:Dell SFP+ cu
3. NetGearの10Gスイッチ+10G copper cable
スイッチ:XS712T
10G copper cable:AXC761

■検証環境
サーバー:Dell PowerEdge R630. E5-2695 v3 2.3GHz
OS:ESX 5.5 (2068190)
仮想マシン:Windows 2012 R2

■検証結果
◎IOPS(4K block size)
◎MB/s

◎4K block sizeのvolumeにWrite IOPSの比較(Dellの10Gスイッチと)
◎4K block sizeのvolumeにRead IOPSの比較(Dellの10Gスイッチと)
◎4K block sizeのvolumeにRead/Write IOPSの比較(Dellの10Gスイッチと)

■結論
●予想
互換性があること。
Writeの性能は変わらない、Read性能は若干遅くなるんじゃないでしょうか…
●結果
互換性あることを検証しました。
IOPS、throughputの検証から見るとWriteとReadの性能は普通の10G SFP+スイッチとほぼ同じ
構成提案することができる。



(免責事項
-本資料記載の製品名、商標は各々の所有者の登録名及び登録商標です。
-本資料に記載された内容は情報の提供のみを目的としたもので、正式なNimble Storage社、NetGear社のテストやレビューを受けておりません。
-本資料の内容についてできる限り正確を期すよう努めておりますが、いかなる明示 または暗黙の保証も責任も負いかねます。本資料の情報は、使用先の責任において活用される情報であることを、あらかじめご了承ください。)


2015年7月28日火曜日

netappのcommunityはNimbleのperformanceの話...

https://forums.netapp.com/docs/DOC-44210

質問はNetApp提案の時、Nimbleとぶつかってます。

FAS8040 CDOT cluster 4 台、SASとSATAの構成。

NimbleはCS700 一台、どのblock sizeでも10万IOPSを保証しています...

どうだろうかな.....ふむ.....

2015年6月30日火曜日

XenServer 6.5のSR拡張を検証してみました!

こんにちは、最近、CAD on VDI の運用がなんか流行っているような感じですね。
CAD on VDIのなか、ハイパーバイザはCitrixのXenServerになると思います。

Nimble Storage+XenServerの運用中、一番よくつ聞かれる質問は、SRの拡張方法です。
拡張について、検証してみました。検証のメモは下記のようです。


検証環境:
XenServer 6.5 SP1
SR:100GB (Nimble Storageから)
Nimble OS:2.2.x

Step1. SRのサイズを確認。「」にて、size=100Gと確認しました。
コマンド: # multipath -ll
[root@xenserver-6 ~]# multipath -ll
23d1472b2103540326c9ce9003d4700a6 dm-1 Nimble,Server
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 3:0:0:0 sdb 8:16 active ready running
  `- 4:0:0:0 sdc 8:32 active ready running


Step2. SRにおける稼働中の仮想VMがあれば、shutdownしてください。

Step3. Nimble GUIから該当volumeを100Gから150Gにサイズ変更します。

Step4. XenServerの操作、拡張LUNサイズを再スキャン
コマンド: # iscsiadm -m node -R
[root@xenserver-6 ~]# iscsiadm -m node -R
Rescanning session [sid: 1, target: iqn.2007-11.com.nimblestorage:xenlun-v07309110a130d62d.00000389.a600473d, portal: 10.200.10.10,3260]
Rescanning session [sid: 2, target: iqn.2007-11.com.nimblestorage:xenlun-v07309110a130d62d.00000389.a600473d, portal: 10.100.10.10,3260]

Step5. uuidを取得する。
コマンド: # xe sr-list
[root@xenserver-6 ~]# xe sr-list
uuid ( RO)                : f89fd500-6d9a-eaae-44f9-dad95e6b82ca
          name-label ( RW): nimble-cs300
    name-description ( RW): iSCSI SR [10.200.10.10 (iqn.2007-11.com.nimblestorage:xenlun-v07309110a130d62d.00000389.a600473d; LUN 0: 3d1472b2103540326c9ce9003d4700a6: 100 GB (Nimble))]
                host ( RO): xenserver-6.5SP1
                type ( RO): lvmoiscsi
        content-type ( RO):


Step6. SRのPBD(Physical Block Device)のUUIDを取得する。
コマンド: # xe sr-param-list uuid=<SR UUID> | grep PBD
※<SR UUID>はStep5 で取得したものです。
[root@xenserver-6 ~]# xe sr-param-list uuid=f89fd500-6d9a-eaae-44f9-dad95e6b82ca |grep PBD
      allowed-operations (SRO): VDI.create; VDI.snapshot; PBD.create; PBD.destroy; plug; update; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
                    PBDs (SRO): 3b5f6b83-d558-d826-5fa1-84ab896e3e44

Step7. SRのPBDをUnplug する
コマンド: # xe pbd-unplug uuid=<PBD UUID>
[root@xenserver-6 ~]# xe pbd-unplug uuid=3b5f6b83-d558-d826-5fa1-84ab896e3e44

Step8. SRのPBDをPlugする
コマンド: # xe pbd-plug uuid=<PBD UUID>
[root@xenserver-6 ~]# xe pbd-plug uuid=3b5f6b83-d558-d826-5fa1-84ab896e3e44

Step9. SRサイズを再度確認。size=150Gになっところを確認しました。
コマンド: # multipath -ll
[root@xenserver-6 ~]# multipath -ll
23d1472b2103540326c9ce9003d4700a6 dm-1 Nimble,Server
size=150G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 5:0:0:0 sdb 8:16 active ready running
  `- 6:0:0:0 sdc 8:32 active ready running

Step10. 仮想VMを起動します。

以上。

メモ:XenServer6.5にはLUN resizeの不具合があると判明されました。
原因詳細:https://bugs.xenserver.org/browse/XSO-203

resizeの不具合はXenServer6.5SP1にて修正しました。
XenServer6.5SP1のダウンロード:http://support.citrix.com/article/CTX142447

最後まで読んでいただき、ありがとうございます。
それでは、また今度。

2015年6月26日金曜日

日本HP、8月1日に会社分割

米国側、去年分割発表しましたが、日本HPも実行になりますね!

http://mw.nikkei.com/sp/#!/article/DGXLASDZ23HXS_T20C15A6TJC000/