=== Iscsi target on CentOS, Initiator on CentOS and Windows XP === == Iscisi Target server #install > yum -y install scsi-target-utils > /etc/init.d/tgtd start #Create Target > tgtadm --lld iscsi --op new --mode target --tid 0 --targetname iqn.2009-07.com.test:data # check > tgtadm --lld iscsi --op show --mode target #Register block divice to target > tgtadm --lld iscsi --op new --mode logicalunit --tid 0 --lun 1 --backing-store /dev/sdb1 # check > tgtadm --lld iscsi --op show --mode target # Access from ALL > tgtadm --lld iscsi --op bind --mode=target --tid=0 --initiator-address=ALL # for perment setting after restart vi /etc/tgt/targets.confro backing-store /dev/sdb1 initiator-address ALL == Initiator (CentOS) > yum -y install iscsi-initiator-utils > /etc/init.d/iscsi start > iscsiadm --mode=discovery --type=sendtargets --portal=192.168.0.10 # list of terget > iscsiadm -m node # Login > iscsiadm -m node --targetname iqn.2009-07.com.test:data --portal 192.168.0.10:3260 --login # Logout > iscsiadm -m node --targetname iqn.2009-07.com.test:data --portal 192.168.0.10:3260,1 --logout # delete > iscsiadm -m node -o delete --targetname iqn.2009-07.com.test:data --portal 192.168.0.10:3260,1 # check > iscsiadm -m node > fdisk /dev/sdb n p 1 w > mkfs.ext3 /dev/sdb1 > mkdir /data > mount /dev/sdb1 /data ### For Multipath memo ### > yum - install device-mapper-multipath > vi /etc/multipath.conf blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|sda)[0-9]*" devnode "^hd[a-z][0-9]*" devnode "^sd[a-c][0-9]*" } > service multipathd start > multipath > multipath -v2 > multipath -l > ls -al /dev/mapper/mpath* > mkinitrd -f -v --with=dm-rdac /boot/initrd-`uname -r`.img `uname -r` ### if you miss seeing for multipath Control -D > /sbin/init 1 > mount -o remount,rw / ### Logical Volume Memo ### > fdisk /dev/sdb d n p 1 t 8e > pvcreate /dev/sdb1 /dev/sdc1 > vgcreate new_vg /dev/sdb1 /dev/sdc1 > vgscan > vgdisplay > lvcreate -l 3576990 new_vg > mkfs.ext4 /dev/new_vg/lvol0 > mount -t xfs /dev/new_vg/lvol0 /data == Initiator (Windows XP) # donwload initiator for windows XP and install http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en # Type ip address of target server Windows Controler -> ISCSI Initiator -> Discovery -> Target Portals -> ADD Windows Controler -> ISCSI Initiator -> Tergets -> "Log On.." # Format file Windows Controler -> Conputer Management