Iscsi - target and initiator setup debian

From Skytech
Revision as of 21:47, 15 November 2012 by Martin (talk | contribs)
Jump to navigation Jump to search


iSCSI - target (server) setup

We'll use tgt to handle everything dynamically

iSCSI - initiator (client) setup

Link to page:

http://iscsitargetandinitiator.blogspot.dk/

Show target devices and initiators connected

tgtadm --lld iscsi --op show --mode target

Add devices/disks/partitions to target

tgtadm  --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sdb


Re-adding LVM based iscsi disks after reboot

Requires a change in how LVM 'attaches' to disks.

So if you've added say /dev/sdb to be a complete iscsi device and on the initiator using it as a LVM, it does not attach itself to the target on reboot.

Edit /etc/lvm/lvm.conf and change:

   # By default we accept every block device:
    #filter = [ "a/.*/" ]
    # Every block device except /dev/sdb, that is.
    filter = [ "r|/dev/sdb|" ]

More info here: http://www.sysarchitects.com/iscsi_target_on_rhel6