Install open-iscsi package for high performance, transport independent iSCSI implementation. This package is also known as the Linux Open-iSCSI Initiator.
Kernel version 2.6.16+
Install Open-iSCSI Initiator
$ sudo apt-get install open-iscsi
Open-iSCSI default configuration
Default configuration file: /etc/iscsi/iscsid.conf or ~/.iscsid.conf.
# vi /etc/iscsi/iscsid.conf
node.startup = automatic
node.session.auth.username = MY-ISCSI-USER
node.session.auth.password = MY-ISCSI-PASSWORD
discovery.sendtargets.auth.username = MY-ISCSI-USER
discovery.sendtargets.auth.password = MY-ISCSI-PASSWORD
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 = 10
node.conn[0].timeo.noop_out_timeout = 15
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 = 65536# /etc/init.d/open-iscsi restart
Now run a discovery against the iscsi target host:# iscsiadm -m discovery -t sendtargets -p ISCSI-SERVER-IP-ADDRESS
For example:
# iscsiadm -m discovery -t sendtargets -p 192.168.1.60
# /etc/init.d/open-iscsi restart
Format iSCSI Volume
Now an additional drive should appear on the system, such as /dev/sdc. To find out device name:
# tail -f /var/log/messages
Create a partition:# fdisk /dev/sdc
Format partition:# mkfs.ext3 /dev/sdc1
Mount file system:# mkdir /iscsi
# mount /dev/sdc1 /iscsi
No comments:
Post a Comment