- Log in to post comments
apt-get install open-iscsi
iscsiadm -m discovery -t sendtargets -p 192.168.254.227:3260
iscsiadm -m node -T iqn.2014-07.com.raidix:target0 -p 192.168.254.227:3260 --login
iscsiadm --mode session
fdisk -l /dev/sdd
iscsiadm -m node -T iqn.2014-07.com.raidix:target0 -p 192.168.254.227:3260 --logout
iscsit# server
apt-get install -y iscsitarget
sed -i 's|ISCSITARGET_ENABLE=false|ISCSITARGET_ENABLE=true|g' /etc/default/iscsitarget
mkdir /media/storage
dd if=/dev/zero of=/media/storage/lun1.img bs=1M count=512
cat <> /etc/ietd.conf
Target iqn.2001-04.com.example:storage.lun1
#IncomingUser someuser secret
#OutgoingUser
Lun 0 Path=/media/storage/lun1.img,Type=fileio
Alias LUN1
#MaxConnections 6
EOF
cat <> /etc/initiators.allow
iqn.2001-04.com.example:storage.lun1 192.168.2.3
EOF
/etc/init.d/iscsitarget restart
# client
aptitude install open-iscsi
# LINKS
http://www.howtoforge.com/using-iscsi-on-ubuntu-9.04-initiator-and-target