ISCSI

From wiki.techunit.org
Jump to: navigation, search

iSCSI installation

Server side - Target configuration

  • Install packages
aptitude install iscsitarget iscsitarget-dkms lvm2 -y
  • Edit /etc/default/iscsitarget
ISCSITARGET_ENABLE=true
  • Create LVM partition : LVM
  • Edit /etc/iet/ietd.conf
Target iqn.2015-10.com.example.storage:storage
    IncomingUser user password
    Lun 0 Path=/dev/vg_data/lv_shared,Type=fileio
  • Restart iSCSI target service
/etc/init.d/iscsitarget restart

Client side - Initiator configuration

  • Install packages
aptitude install open-iscsi -y
  • Modify /etc/iscsi/iscsid.conf
node.startup = automatic
  • Restart service
/etc/init.d/open-iscsi restart
  • Disque detection
root@zimbra-01:~# iscsiadm -m discovery -t st -p <ip-target-iscsi>
 <ip-target-iscsi>:3260,1 iqn.2015-10.lab.local.storage:zimbra
  • Modify /etc/iscsi/iscsid.conf
node.session.auth.authmethod = CHAP
node.session.auth.username = user
node.session.auth.password = password
  • Restart service
/etc/init.d/open-iscsi restart
  • If OK, a new disk should appear while running this command
fdisk -l

Elliot
techUnit's cofounder