ISCSI on Debian

From HoerupWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

af Tommy, feb 2013.

Fra : http://www.howtoforge.com/using-iscsi-on-debian-lenny-initiator-and-target

Turbo Installation

apt-get install open-iscsi

Edit /etc/iscsi/iscsid.conf

...
node.startup = automatic
...

derefter en restart :

/etc/init.d/open-iscsi restart

Discover LUN:

root@testbox:~# iscsiadm -m discovery -t st -p 192.168.8.31

Output : 192.168.8.31:3260,1 iqn.2004-04.com.qnap:ts-239:iscsi.qnap1.8d8976

iscsiadm -m node

Output : 192.168.8.31:3260,1 iqn.2004-04.com.qnap:ts-239:iscsi.qnap1.8d8976


... vi springer lige over CHAP ...

Nå, opret forbindelse :

iscsiadm -m node --targetname "iqn.2004-04.com.qnap:ts-239:iscsi.qnap1.8d8976" --portal "192.168.8.31:3260" --login

Nu skulle disken kunne findes med

fdisk -l


Man kan detache med --logout :

iscsiadm -m node --targetname "iqn.2004-04.com.qnap:ts-239:iscsi.qnap1.8d8976" --portal "192.168.8.31:3260" --logout

Over 2TB

Ikke kun et iSCSI issue, men Linux kræver GPT for at kommer over 2TB diske:

apt-get install gdisk

gdisk /dev/sdb

Kommandoer:

b	back up GPT data to a file
c	change a partition's name
d	delete a partition
i	show detailed information on a partition
l	list known partition types
n	add a new partition
o	create a new empty GUID partition table (GPT)
p	print the partition table
q	quit without saving changes
r	recovery and transformation options (experts only)
s	sort partitions
t	change a partition's type code
v	verify disk
w	write table to disk and exit
x	extra functionality (experts only)

Så, o, n og w.

Mere info : http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html