Configure iSCSI Target2012/07/10 |
Configure Storage Server with iSCSI. A storage on a network is called iSCSI Target,
a Client which connects to iSCSI Target is called iSCSI Initiator.
This example is based on the environment below.
dlp.srv.world [10.0.0.30] - iSCSI Target www.srv.world [10.0.0.31] - iSCSI Initiator
This example configures to create LVM partition on iSCSI Target, so it need to have enough areas to use.
If your iSCSI Target does not have enough areas, add new hard drive.
|
|
[1] | Configure iSCSI Target |
# create a phisical volume root@dlp:~# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created
# create a volume group named "vg_target00" root@dlp:~# vgcreate -s 32M vg_target00 /dev/sdb1 Volume group "vg_target00" successfully created
# create a logical volume named "lv_target00" root@dlp:~# lvcreate -L 100G -n lv_target00 vg_target00 Logical volume "lv_target00" created
root@dlp:~#
aptitude -y install iscsitarget iscsitarget-dkms
root@dlp:~#
vi /etc/default/iscsitarget # change ISCSITARGET_ENABLE= true
root@dlp:~#
vi /etc/iet/ietd.conf # add at the last # naming rule : [ iqn.yaer-month.domain:any name ] Target iqn.2012-07.world.srv:target0 # provided devicce as a iSCSI target Lun 0 Path=/dev/vg_target00/lv_target00,Type=blockio # iSCSI Initiator's IP address you allow to connect initiator-address 10.0.0.31 # authentication info ( set anyone you like for "username", "password" )
incominguser username password
service iscsitarget restart * Removing iSCSI enterprise target devices: ...done. * Stopping iSCSI enterprise target service: ...done. * Removing iSCSI enterprise target modules: ...done. * Starting iSCSI enterprise target service ...done. ...done. root@dlp:~# chkconfig tgtd on root@dlp:~# ietadm --op show --tid=1 # confirm status Wthreads=8 Type=0 QueuedCommands=32 NOPInterval=0 NOPTimeout=0 |
[2] |
Complete to configure iSCSI Target. See next step to configure iSCSI Initiator.
|
Sponsored Link |