Categories
linux

iSCSI target dengan Ubuntu 14.04

IP target (sumber storan):
192.168.56.212

Logical volume yang hendak digunakan: /dev/vgtarget00/lvtarget00

IP initiator(dari mana akan diakses):
192.168.56.213
192.168.56.214

Pasang iscsitarget pada sumber
sudo apt-get install iscsitarget iscsitarget-dkms

Contoh tetapan pada /etc/default/iscsitarget

[code lang=’plain’]ISCSITARGET_ENABLE=true
ISCSITARGET_OPTIONS=”–address 192.168.56.212″[/code]

Contoh tetapan pada /etc/iet/ietd.conf

[code lang=’plain’]Target iqn.2015-01.iscsi:target00
Lun 0 Path=/dev/vgtarget00/lvtarget00,Type=blockio
initiator-address 192.168.56.213
initiator-address 192.168.56.214[/code]

Contoh tetapan pada /etc/iet/initiators.allow

ALL ALL

Mulakan semula servis iscsitarget
sudo /etc/init.d/iscsitarget restart

Pasang iscsi-initiator pada server yang akan mengakses storan iscsi (initiator)
sudo apt-get install open-iscsi

Contoh tetapan pada /etc/iscsi/iscsid.conf

[code lang=’plain’]iscsid.startup = /usr/sbin/iscsid
node.startup = automatic
node.leading_login = No
node.session.timeo.replacement_timeout = 120
node.conn[0].timeo.login_timeout = 15
node.conn[0].timeo.logout_timeout = 15
node.conn[0].timeo.noop_out_interval = 5
node.conn[0].timeo.noop_out_timeout = 5
node.session.err_timeo.abort_timeout = 15
node.session.err_timeo.lu_reset_timeout = 30
node.session.err_timeo.tgt_reset_timeout = 30
node.session.initial_login_retry_max = 8
node.session.cmds_max = 128
node.session.queue_depth = 32
node.session.xmit_thread_priority = -20
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = Yes
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
node.conn[0].iscsi.MaxXmitDataSegmentLength = 0
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
node.session.nr_sessions = 1
node.session.iscsi.FastAbort = Yes[/code]

Mulakan semula servis initiator
sudo /etc/init.d/open-iscsi restart

Akses storan pada target
sudo iscsiadm -m discovery -t sendtargets -p 192.168.56.212
sudo iscsiadm -m node --login

Leave a Reply

Your email address will not be published. Required fields are marked *