44.
Logical Unit Number
1つのSCSIターゲットには
複数のストレージをぶら下げることができる
/> cd /loopback !
/loopback> create!
Created target naa.600140589cd08660.!
/loopback> ls!
o- loopback ....................................................... [1 Target]!
o- naa.600140589cd08660 ............................. [naa.6001405cb9de14a5]!
o- luns ......................................................... [0 LUNs]!
/loopback>
45.
Logical Unit Number
LUN0 LUN1 LUN2 LUN3 LUN4
いにしえのパラレルSCSIは
ストレージを数珠つなぎにすることができた名残
SCSIターゲット
訂正: 発表中ではLUNはデイジーチェーンのデバイスを識別するの
に用いるとしていましたが、その用途で用いられるのはターゲット
IDでLUNとは別物でした。LUNは単一のデバイスが複数の機能を
提供している場合に、それらを識別する為に用いられます
46.
/> cd loopback/naa.600140589cd08660/luns
/loopback/naa...9cd08660/luns> create /backstores/fileio/back0
Selected LUN 0.
Successfully created LUN 0.
/loopback/naa...9cd08660/luns> ls
o- luns .............................................................. [1 LUN]
o- lun0 ..................................... [fileio/back0 (/root/usb.img)]
/loopback/naa...9cd08660/luns>
Logical Unit Number
create <ストレージ名> [<LUN>]
createで指定したストレージで新しいLUNを作成
47.
/> saveconfig!
WARNING: Saving Olivia.localnet current configuration to disk will overwrite
your boot settings.!
The current target configuration will become the default boot config.!
Are you sure? Type 'yes': yes
設定を保存してターゲットが出来たか見てみよう
56.
/iscsi/iqn.20...12/tpgt1/acls> cd iqn.2014-02.localnet.hahnela:openiscsi-5bdbe8!
b0c609a2e4c0fa2a056ef7a686/!
/iscsi/iqn.20...a2a056ef7a686> set auth userid=foobar!
Parameter userid is now 'foobar'.!
/iscsi/iqn.20...a2a056ef7a686> set auth password=hogefuga!
Parameter password is now ‘hogefuga'.!
/iscsi/iqn.20...a2a056ef7a686> get auth!
AUTH CONFIG GROUP!
authenticate_target=0 [ro]!
The authenticate_target auth_attr.!
!
password=hogefuga!
The password auth_attr.!
!
password_mutual=!
The password_mutual auth_attr.!
!
userid=foobar!
The userid auth_attr.!
!
userid_mutual=!
The userid_mutual auth_attr.
ユーザ名とパスワードを設定しよう
57.
$ vim /etc/iscsi/iscsi.conf!
(略)!
# *************!
# CHAP Settings!
# *************!
!
# To enable CHAP authentication set node.session.auth.authmethod!
# to CHAP. The default is None.!
node.session.auth.authmethod = CHAP ← CHAPによる認証を有効にする!
# To set a CHAP username and password for initiator!
# authentication by the target(s), uncomment the following lines:!
node.session.auth.username = foobar ← ユーザ名!
node.session.auth.password = hogefuga ← パスワード!
!
# To set a CHAP username and password for target(s)!
(略)
イニシエータ側にもユーザ名とパスワードを設定しよう
67.
$ /etc/init.d/iscsid start!
* Use of the opts variable is deprecated and will be!
* removed in the future.!
* Please use extra_commands, extra_started_commands or extra_stopped_commands.!
* Checking open-iSCSI configuration ...!
* Loading iSCSI modules ...!
* Loading libiscsi ... [ ok ]!
* Loading scsi_transport_iscsi ... [ ok ]!
* Loading iscsi_tcp ... [ ok ]!
* Starting iscsid ...!
* Setting up iSCSI targets ...!
iscsiadm: No records found! [ !! ]!
BeagleBoneBlackでOpen-iSCSIを起動
68.
$ /etc/init.d/iscsid start!
* Use of the opts variable is deprecated and will be!
* removed in the future.!
* Please use extra_commands, extra_started_commands or extra_stopped_commands.!
* Checking open-iSCSI configuration ...!
* Loading iSCSI modules ...!
* Loading libiscsi ... [ ok ]!
* Loading scsi_transport_iscsi ... [ ok ]!
* Loading iscsi_tcp ... [ ok ]!
* Starting iscsid ...!
* Setting up iSCSI targets ...!
iscsiadm: No records found! [ !! ]!
$ iscsiadm -m discovery -t st -p 192.168.152.1 -P1!
Target: iqn.2003-01.org.linux-iscsi.hahnela.x8664:sn.406262d1b87f!
! Portal: 192.168.152.1:3260,1!
! ! Iface Name: default!
Target: iqn.2003-01.org.linux-iscsi.hahnela.x8664:sn.f3d75f94ab5f!
! Portal: 192.168.152.1:3260,1!
! ! Iface Name: default!
Target: iqn.2003-01.org.linux-iscsi.hahnela.x8664:sn.aa5bd06b61e8!
! Portal: 192.168.152.1:3260,1!
! ! Iface Name: default!
LIOが動いているサーバに接続
Be the first to comment