====== Installation ======
===== Server =====
Der Server heißt bei iscsi target
==== Pakete ====
openSuSE: ''iscsitarget''
Debian 9:''tgt'' ((Debian 7: ''iscsitarget iscsitarget-dkms''
Beispiel:
''/etc/iet/ietd.conf'' :
Target iqn.2013-12.de.linuxhotel.notebook12:testdaten
Lun 0 Path=/dev/vg_notebook12/testdaten,Type=fileio
''/etc/default/iscsitarget'' :
ISCSITARGET_ENABLE=true
/etc/init.d/iscsitarget restart
=== testen ===
cat /proc/net/iet/volume
))
==== Konfiguration ====
Aufbau Targetname:
iqn..:
Kommandos:
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2021-11.de.linuxhotel.notebook:iscsitest
tgtadm --lld iscsi --op show --mode target
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/vdb
tgtadm --lld iscsi --op bind --mode target --tid 1 -I 192.168.0.0/16
tgtadm --lld iscsi --op show --mode target
===== Client =====
Der Client heißt bei iscsi //initiator//
==== Pakete ====
Debian 7: ''open-iscsi''
''/etc/iscsi/iscsid.conf'' :
node.startup = automatic
cat /etc/iscsi/initiatorname.iscsi
/etc/init.d/open-iscsi restart
cat /etc/iscsi/initiatorname.iscsi
iscsiadm -m discovery -t st -p 192.168.221.10
iscsiadm -m node --login
dmesg | tail
''/etc/fstab'' :
/dev/sdb1 /srv/daten ext4 rw,_netdev 0 2
====== Dokumentation ======
* man iscsiadm
*
====== unformatiert ======
34 zypper install iscsitarget
35 rpm -ql iscsitarget
36* zypper install i
37 rpm -qa | grep iscsi
38 rpm -ql tgt
39 less /usr/share/doc/packages/tgt/README.iscsi
40 tgtadm --lld iscsi -op new --mode target --tid=1 --targetname=testdaten
41 tgtadm --lld iscsi --op new --mode target --tid=1 --targetname=iqn.2009-04.de.linuxhotel.notebook12:testdaten
42 /etc/init.d/tgtd start
43 tgtadm --lld iscsi --op new --mode target --tid=1 --targetname=iqn.2009-04.de.linuxhotel.notebook12:testdaten
reicht nicht.
Das da ging:
Aufbau Targetname:
iqn..:''
Beispiel:
iqn.2009-04.de.linuxhotel.notebook12:testdaten
Target iqn.2009-04.de.linuxhotel.notebook12:daten.lv01.foo.bar
Lun 0 Path=/dev/mapper/vg1-lv01,Type=fileio
Client / Initiator:
''/etc/iscsi/initiatorname.iscsi'' :
InitiatorName=iqn.2009-04.de.linuxhotel.notebook12:daten.lv01.foo.bar
diff /etc/iscsi/iscsid.conf /etc/iscsi/iscsid.conf.orig
39c39
< node.session.auth.authmethod = CHAP
---
> #node.session.auth.authmethod = CHAP
43,44c43,44
< node.session.auth.username = test
< node.session.auth.password = villa
---
> #node.session.auth.username = username
> #node.session.auth.password = password
iscsiadm -m discovery -t sendtargets -p notebook12
192.168.1.212:3260,1 iqn.2009-04.de.linuxhotel.notebook12:daten.lv01
====== Alternative: AoE ======
schneller, aber nicht routingfähig)
===== Pakete =====
Server: vblade
Client: *aoe*
RHEL 7 iscsi Anleitung {{:lpi2:rhel_iscsi.pdf|}}