Configure iSCSI Taregt(iscsitarget)2016/04/23 |
Configure Storage Server with iSCSI.
This is the example of configuring iSCSI Target with iscsitarget.
|
[1] | Install administration tools first. |
root@dlp:~# apt-get -y install iscsitarget iscsitarget-dkms
|
[2] | Configure iSCSI Target. For example, create a disk image under the [/var/iscsi_disks] directory and set it as a shared disk. |
# create disk image root@dlp:~# mkdir /var/iscsi_disks root@dlp:~# dd if=/dev/zero of=/var/iscsi_disks/disk01.img count=0 bs=1 seek=10G
root@dlp:~#
vi /etc/default/iscsitarget # change ISCSITARGET_ENABLE= true
root@dlp:~#
vi /etc/iet/ietd.conf # add to the end # naming rule : [ iqn.yaer-month.domain:any name ] Target iqn.2016-04.world.srv:target00 # provided devicce as a iSCSI target Lun 0 Path=/var/iscsi_disks/disk01.img,Type=fileio # 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
root@dlp:~#
systemctl restart iscsitarget
# disolay status root@dlp:~# ietadm --op show --tid=1 Wthreads=8 Type=0 QueuedCommands=32 NOPInterval=0 NOPTimeout=0 |
Sponsored Link |