Ubuntu 13.04
Sponsored Link

Configure iSCSI Target
2013/05/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.
 
nas01.srv.world
[10.0.0.50] - iSCSI Target

 
client.srv.world
[10.0.0.60] - 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@nas01:~#
pvcreate /dev/sdb1

  Physical volume "/dev/sdb1" successfully created
# create a volume group named "vg_target00"

root@nas01:~#
vgcreate -s 32M vg_target00 /dev/sdb1

  Volume group "vg_target00" successfully created
# create a logical volume named "lv_target00"

root@nas01:~#
lvcreate -L 100G -n lv_target00 vg_target00

  Logical volume "lv_target00" created
root@nas01:~#
aptitude -y install iscsitarget iscsitarget-dkms
root@nas01:~#
vi /etc/default/iscsitarget
# change

ISCSITARGET_ENABLE=
true
root@nas01:~#
vi /etc/iet/ietd.conf
# add at the last

# naming rule : [ iqn.yaer-month.domain:any name ]

Target iqn.2013-05.world.srv:target00
   
# 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.60
   
# authentication info ( set anyone you like for "username", "password" )

    incominguser username password
root@nas01:~#
/etc/init.d/iscsitarget restart

 * Removing iSCSI enterprise target devices:
   ...done.
 * Starting iSCSI enterprise target service
   ...done.
   ...done.
root@nas01:~#
ietadm --op show --tid=1
# show status

Wthreads=8
Type=0
QueuedCommands=32
NOPInterval=0
NOPTimeout=0
[2]
Complete to configure iSCSI Target. See next step to configure iSCSI Initiator.

Matched Content