SuSE 10.2 - iSCSI Enterprise Target 0.4.14
Meine ersten iSCSI Gehversuche sollten mit einem iSCSI-Target Server beginnen. Mein Ziel ist/war es über iSCSI Booten zu können.
Zum testen habe ich mir ein openSuSE 10.2 installiert und die Sourcecodes von iSCSI Enterprise Target 0.4.14 kompiliert.
- Folgende Pakete müssen auf dem Rechner, z.B. mit YaST, installiert sein:
- gcc
- make
- openssl-devel
Entpacken:
linux-san:~/iscsi # tar xfvz iscsitarget-0.4.14.tar.gz iscsitarget-0.4.14/ iscsitarget-0.4.14/kernel/ iscsitarget-0.4.14/kernel/target_disk.c iscsitarget-0.4.14/kernel/wthread.c iscsitarget-0.4.14/kernel/param.c ....
Compilieren:
linux-san:~/iscsi # cd iscsitarget-0.4.14/ linux-san:~/iscsi/iscsitarget-0.4.14 # make make -C usr make[1]: Entering directory `/root/iscsi/iscsitarget-0.4.14/usr' cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o ietd.o ietd.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o iscsid.o iscsid.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o conn.o conn.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o session.o session.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o target.o target.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o message.o message.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o ctldev.o ctldev.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o log.o log.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o chap.o chap.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o event.o event.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o param.o param.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o plain.o plain.c cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o isns.o isns.c cc ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o -o ietd -lcrypto cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include -c -o ietadm.o ietadm.c cc ietadm.o param.o -o ietadm make[1]: Leaving directory `/root/iscsi/iscsitarget-0.4.14/usr' make -C /lib/modules/2.6.16.27-0.6-smp/build SUBDIRS=/root/iscsi/iscsitarget-0.4.14/kernel modules make[1]: Entering directory `/usr/src/linux-2.6.16.27-0.6-obj/i386/smp' make -C ../../../linux-2.6.16.27-0.6 O=../linux-2.6.16.27-0.6-obj/i386/smp modules CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/tio.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/iscsi.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/nthread.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/wthread.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/config.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/digest.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/conn.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/session.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/target.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/volume.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/iotype.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/file-io.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/null-io.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/target_disk.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/event.o CC [M] /root/iscsi/iscsitarget-0.4.14/kernel/param.o LD [M] /root/iscsi/iscsitarget-0.4.14/kernel/iscsi_trgt.o Building modules, stage 2. MODPOST CC /root/iscsi/iscsitarget-0.4.14/kernel/iscsi_trgt.mod.o LD [M] /root/iscsi/iscsitarget-0.4.14/kernel/iscsi_trgt.ko make[1]: Leaving directory `/usr/src/linux-2.6.16.27-0.6-obj/i386/smp'
Installieren:
linux-san:~/iscsi/iscsitarget-0.4.14 # make install `usr/ietd' -> `/usr/sbin/ietd' `usr/ietadm' -> `/usr/sbin/ietadm' if [ -f /etc/debian_version ]; then \ install -vD -m 755 etc/initd/initd.debian /etc/init.d/iscsi-target; \ elif [ -f /etc/redhat-release ]; then \ install -vD -m 755 etc/initd/initd.redhat /etc/init.d/iscsi-target; \ elif [ -f /etc/gentoo-release ]; then \ install -vD -m 755 etc/initd/initd.gentoo /etc/init.d/iscsi-target; \ elif [ -f /etc/slackware-version ]; then \ install -vD -m 755 etc/initd/initd /etc/rc.d/iscsi-target; \ else \ install -vD -m 755 etc/initd/initd /etc/init.d/iscsi-target; \ fi `etc/initd/initd' -> `/etc/init.d/iscsi-target' `kernel/iscsi_trgt.ko' -> `/lib/modules/2.6.16.27-0.6-smp/ kernel/iscsi/iscsi_trgt.ko' depmod -aq
Konfiguration:
Anpassen der iSCSI-Target Konfiguration /etc/ietd.conf. Hier eine minimale Konfiguration:
Target iqn.2006-01.linux-san:hda4 Lun 0 Path=/dev/hda4,Type=fileio Alias sandisk1
In der Firewall muss der Port TCP 3260 freigegeben werden.
Starten des iSCSI-Targets:
sh /etc/init.d/iscsi-target start
Ausgabe von dmesg:
iSCSI Enterprise Target Software - version 0.4.13 iotype_init(90) register fileio iotype_init(90) register nullio