Difference between revisions of "Scality: Iscsi Targets"

From Define Wiki
Jump to navigation Jump to search
 
Line 29: Line 29:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
service iscsitarget restart
 
service iscsitarget restart
 +
</syntaxhighlight>
 +
 +
 +
== Check for targets on the system ==
 +
 +
<syntaxhighlight>
 +
[root@blade2 dir1]# iscsiadm --mode discovery --type sendtargets --portal localhost
 +
[::1]:3260,1 iqn.2013-13.com.iscsi-test.target0:client0
 +
</syntaxhighlight>
 +
 +
== Login to target ==
 +
 +
<syntaxhighlight>
 +
[root@blade2 dir1]# iscsiadm --mode node target0 client0 \ --portal localhost --login
 +
Logging in to [iface: default, target: iqn.2013-13.com.iscsi-test.target0:client0, portal: ::1,3260] (multiple)
 +
Login to [iface: default, target: iqn.2013-13.com.iscsi-test.target0:client0, portal: ::1,3260] successful.
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 14:22, 20 August 2013

Packages

  • libiscsi-utils.x86_64
  • scsi-target-utils.x86_64
  • iscsi-initiator-utils.x86_64
  • scsi-target-utils

Files

/etc/tgt/targets.conf


Create Virtual Disk

dd if=/dev/zero of=/mnt/fuse/0/dir1/file1 bs=1M count=0 seek=10


add target to targets.conf

<target iqn.2013-13.com.iscsi-test.target0:client0>
    backing-store /mnt/fuse/0/dir1/file1
</target>

then restart tgt

service iscsitarget restart


Check for targets on the system

[root@blade2 dir1]# iscsiadm --mode discovery --type sendtargets --portal localhost
[::1]:3260,1 iqn.2013-13.com.iscsi-test.target0:client0

Login to target

[root@blade2 dir1]# iscsiadm --mode node target0 client0 \ --portal localhost --login
Logging in to [iface: default, target: iqn.2013-13.com.iscsi-test.target0:client0, portal: ::1,3260] (multiple)
Login to [iface: default, target: iqn.2013-13.com.iscsi-test.target0:client0, portal: ::1,3260] successful.