• Quotes
  • Index
  • About
AOssama.NET Technical Notes

Category Archives: Iscsi

CentOS 6.2 iSCSI Initiator (Part 1)

April 20, 2012 8:53 pm / Leave a Comment / Ahmed

First install iscsi-initiator-utils.x86_64
# yum -y install iscsi-initiator-utils.x86_64

Then perform a discovery
# iscsiadm -m discovery -t sendtargets -p datastor01.aossama.net

The output should look something like this
192.168.0.34:3260,1 iqn.2012-20.com.aossama:datastor01

Finally start iscsi and iscsid service.
# chkconfig iscsi on && chkconfig iscsid on
# service iscsi start && service iscsid start

Advanced tasks on iSCSI initiators in Part 2.

Posted in: iSCSI, Linux / Tagged: iscsi initiator, linux iscsi initiator

CentOS 6.2 iSCSI target (Part 1)

April 20, 2012 8:31 pm / Leave a Comment / Ahmed

First Prepare a LUN (Logical Unit Number):
# dd if=/dev/zero of=/opt/lun0.img bs=1M seek=10240 count=0

This will allocate a thin provisioned LUN which will be used as for the iSCSI target device.

After that install scsi-target-utils.x86_64 package, enable the service and start it:
# yum -y install scsi-target-utils.x86_64
# chkconfig tgtd on
# service tgtd start

Then create a target device
# tgtadm --lld iscsi --mode target --op new --tid=1 \
--targetname iqn.2012-04.com.aossama:datastor01

Add the LUN to the target device
# tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /opt/lun0.img

Finally allow all initiators
# tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL

Check that everything is configured correctly
# tgtadm --lld iscsi --op show --mode target

And that’s it, simple!!!

But that’s not all the story, performing more advanced tasks such as setting CHAP authentication on the target and setting digest are covered in Part 2.

Posted in: iSCSI, Linux / Tagged: iscsi target, linux iscsi target, tgtadm

Categories

  • Apache (1)
  • Asterisk (2)
  • bind9 (1)
  • FreeBSD (9)
  • iSCSI (2)
  • Linux (12)
  • Netcat (1)
  • Networking (3)
  • Penetration Testing (1)
  • PHP (2)
  • Squid (2)

Archives

  • January 2013 (1)
  • April 2012 (3)
  • May 2011 (1)
  • January 2011 (1)
  • September 2010 (1)
  • August 2010 (1)
  • June 2010 (3)
  • May 2010 (1)
  • November 2009 (2)
  • October 2009 (9)
  • September 2009 (2)

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
© Copyright 2013 - AOssama.NET
Infinity Theme by DesignCoral / WordPress