Archive for February, 2010

iscsi notes

discover:
# iscsiadm  -m discovery -t sendtargets -p 192.168.1.100

login:
# iscsiadm  -m node -T iqn.1991-05.com.microsoft:winserver-win -server-iscsi-target-target -p 192.168.1.100 –login

find mapping:
# ll /dev/disk/by-path/ -> /sdb

make part:
# fdisk /dev/sdb

format:
# mkfs.ext3 /dev/sdb1

mke2fs 1.39 (29-May-2006)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!

logout:
# iscsiadm  -m node -T iqn.1991-05.com.microsoft:winserver-win
-server-iscsi-target-target -p 192.168.1.100 –logout
On target:

Define an iSCSI target name:
# tgtadm –lld iscsi –op new –mode target –tid=1 –targetname iqn.2010-10.local.rhev:target1

To view the currect configuration:
# tgtadm –lld iscsi –op show –mode target

Add it as a logical unit to the target:
# tgtadm –lld iscsi –op new –mode logicalunit –tid 1 –lun 1 -b /dev/sdb

addip:
tgtadm  –lld iscsi –op bind –mode=target –tid=1 –initiator-address=192.168.1.102

Advertisements