Open main menu

CDOT Wiki β

Talk:SYA810 iSCSI Lab

RAID on iSCSI for Dumpling

Terminology

Target the iscsi server Initiator the iscsi client IQN /etc/iscsi/initiatorname.iscsi --> iqn.YYYY-MM.domain.reversed.string iscsi port 3260

Steps

Target

  1. install

yum -y install netbsd-iscsi

  1. create a disk

= dd dd if=/dev/zero of=fakefile bs=1024 count=104857600 = LVM

  1. edit /etc/iscsi/targets to specifiy which hard disk to be used. change the subnet to 127.0.0.1 in this case. change the file location is neccessary

Initiator

Connecting iSCSI

  1. install initiator

yum -y install iscsi-initiator-utils

  1. tunnel to target

ssh joker@142.204.141.183 -L 3260:localhost:3260 ssh joker@142.204.141.183 -L 3260:localhost:3260; sleep 60 &

  1. discovery and connect

iscsiadm -m discovery -t sendtargets -p localhost

  1. show connected node

iscsiadm -m node

  1. login to iscsi

iscsiadm -m node -l

  1. logout from iscsi

iscsiadm -m node -U

Setting up RAID

  1. setup the drive crated as the loop drive

losetup /dev/loop0 ./fakefile

  1. create raid drive

mdadm -C /dev/md1 -l1 -n2 /dev/loop0 /dev/sdc

  1. format the RAID

mkfs.ext3 /dev/md1

  1. mount the drive

mkdir /media/raid10 mount /dev/md1 /media/raid10

Return to "SYA810 iSCSI Lab" page.