I. InstalliSCSItargetforLinux1, operating system: [root @ rac2 ~] # Cat/etc/issueEnterpriseLinuxEnterpriseLinuxASrelease4 (OctoberUpdate4) Kernelronanm [root @ rac2/] # uname-aLinuxrac2.m
I. Install iSCSI target for Linux
1. Operating system:
[Root @ rac2 ~] # Cat/etc/issue
Enterprise Linux AS release 4 (October Update4)
Kernel r on an m
[Root @ rac2/] # uname-
Linux rac2.mycorpdomain.com 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct15 14:02:40 PDT 2006 i686 i686 i386 GNU/Linux
[Root @ rac2/] #
2. decompress the file
[Root @ rac2 ~] # Tar-xzvf iscsitarget-0.4.15.tar.gz
3. Compile
[Root @ rac2 ~] # Cd iscsitarget-0.4.15
[Root @ rac2 iscsitarget-0.4.15] # ls
ChangeLog COPYING doc etc include kernel Makefile patches READMEREADME. vmware usr
[Root @ rac2 iscsitarget-0.4.15] # make
Applying Patch compat-2.6.14-2.6.18.patch
Patching file kernel/iscsi. h
Patching file kernel/digest. c
Patching file kernel/file-io.c
...
[Root @ rac2 iscsitarget-0.4.15] # make install
Install: creating directory '/lib/modules/2.6.9-42.0.0.0.1.ELsmp/kernel/iscsi'
'Kernel/iscsi_trgt.ko '->'/lib/modules/2.6.9-42.0.0.0.1.ELsmp/kernel/iscsi/iscsi_trgt.ko'
Depmod-aq
'Usr/ietd'-> '/usr/sbin/ietd'
'Usr/ietadm '->'/usr/sbin/ietadm'
'Etc/initd. redhat '->'/etc/init. d/iscsi-target'
'Etc/ietd. Conf'-> '/etc/ietd. Conf'
'Etc/initiators. allow'-> '/etc/initiators. allow'
'Etc/initiators. deny'-> '/etc/initiators. deny'
'Doc/manpages/ietadm.8 '->'/usr/share/man/man8/ietadm.8'
'Doc/manpages/ietd.8'-> '/usr/share/man/man8/ietd.8'
'Doc/manpages/ietd. conf.5 '->'/usr/share/man/man5/ietd. conf.5'
Install: creating directory '/usr/share/doc/iscsitarget'
'Changelog'-> '/usr/share/doc/iscsitarget/ChangeLog'
'Copying'-> '/usr/share/doc/iscsitarget/COPYING'
'Readme'-> '/usr/share/doc/iscsitarget/readme'
'Readme. vmware '->'/usr/share/doc/iscsitarget/README. vmware'
[Root @ rac2 iscsitarget-0.4.15] #
4. configuration
[Root @ maid iscsitarget-0.4.15] # vi/etc/ietd. conf
User userid superpassword
Target iqn.2001-04.com. example: storage. disk2.sys1. xyz
Lun 0/dev/sdb1 fileio
Alias lun0
5. start the service
[Root @ rac2 etc] # cd/etc/init. d
[Root @ rac2 init. d] # ls
Acpid crond halt killall netplugd openibd rhnsd snmpd xfs
Anacron cups hidd kudzu network oracleasm rpcgssd snmptrapdxinetd
Apmd cups-config-daemon ibmasm lm_sensors NetworkManager pandrpcidmapd spamassassin ypbind
Arptables_jf diskdump ipmi mdmonitor nfs pcmcia rpcsvcgssd sshdyum
Atd dundIptablesMdmpd nfslock portmap rwhod syslog
Auditd firstboot irda messagebus nscd psacct saslauthd sysstat
Autofs functions irqbalance microcode_ctl ntpd rawdevicesSendmailTog-pegasus
Bluetooth gpm iscsi-target netdump o2cb readahead singlevncserver
Cpuspeed haldaemon isdn netfs ocfs2 readahead_early smartdwinbind
[Root @ rac2 init. d] #/etc/init. d/iscsi-target start
Starting iSCSI target service: [OK]
[Root @ rac2 init. d] #
6. check for verification
Dmesg
ISCSI Enterprise Target Software-version 0.4.15
Iotype_init (92) register fileio
Iotype_init (92) register blockio
Iotype_init (92) register nullio
Parse_fileio_params (230) Unknown/dev/sdb1 fileio
Fileio_attach (268)-22
[Root @ rac2 init. d] #
[Root @ rac2 init. d] # tailf/var/log/messages
Oct 24 09:22:13 rac2 ntpd [2995]: kernel time sync disabled 0041
Oct 24 09:23:16 rac2 ntpd [2995]: kernel time sync enabled 0001
Oct 09:24:15 rac2 kernel: iSCSI Enterprise Target Software-version 0.4.15
Oct 24 09:24:15 rac2 kernel: iotype_init (92) register fileio
Oct 24 09:24:15 rac2 kernel: iotype_init (92) register blockio
Oct 24 09:24:15 rac2 kernel: iotype_init (92) register nullio
Oct 24 09:24:15 rac2 iscsi-target: ietd startup succeeded
Oct 24 09:24:15 rac2 kernel: parse_fileio_params (230) Unknown/dev/sdb1 fileio
Oct 24 09:24:15 rac2 kernel: fileio_attach (268)-22
Oct 24 09:24:15 rac2 ietd: Can't create a logical unit 22 1 0/dev/sdb1 fileio
7. modify the configuration file:
Target iqn.2001-04.com. example: storage. disk2.sys1. idisk
Lun 4 Path =/dev/sdb1, Type = fileio
Alias sdb
The dmesg information is as follows:
ISCSI Enterprise Target Software-version 0.4.15
Iotype_init (92) register fileio
Iotype_init (92) register blockio
Iotype_init (92) register nullio
Log information:
Oct 25 16:31:35 test kernel: iSCSI Enterprise Target Software-version 0.4.15
Oct 25 16:31:35 test kernel: iotype_init (92) register fileio
Oct 25 16:31:35 test kernel: iotype_init (92) register blockio
Oct 25 16:31:35 test kernel: iotype_init (92) register nullio
I have been working on this place for a long time. I have been reading articles about the configuration files which can be configured as follows:
Target iqn.2001-04.com. example: storage. disk2.sys1. xyz
Lun 0/dev/sdb1 fileio
Alias Test
But I have never been able to. I used to be a virtual machine and re-installed redhat4u4. I still cannot. I installed redhat5, but I still cannot.
In the middle, I also tried to use the following configuration file:
User userid superpassword
Target iqn.2001-04.com. example: storage. disk2.sys1. xyz
Lun 0 Path =/dev/sdb1, type = fileio
Alias Test
But not yet. I finally found that I wrote the letter "type" in lower case.
2. Red Hat linux iSCSI initiator configuration
1. Operating system:
[Root @ rac1 ~] # Cat/etc/issue
Enterprise Linux AS release 4 (October Update4)
Kernel r on an m
[Root @ rac1 ~] #
2. install initiator
[Root @ rac1 ~] # Rpm-ivhiscsi-initiator-utils-4.0.3.0-4.i386.rpm
Warning: iscsi-initiator-utils-4.0.3.0-4.i386.rpm: V3 DSAsignature: NOKEY, key ID db42a60e
Preparing... ######################################## ### [100%]
1: iscsi-initiator-utils ################################### ####### [1, 100%]
[Root @ rac1 ~] #
3. modify the/etc/iscsid. conf file.
Vi/etc/iscsid. conf
Modify the following three items:
DiscoveryAddress =
This needs to be set to the Group IP Address of your UIT Array.
SendAsyncText = yes
For the initiator to receive Vendor Specific async events from thetarget.
Continuous = yes
To globally specify that all discovery sessions be kept open.
4. start the service
[Root @ rac1 etc] # service iscsi start
Checking iscsi config: [OK]
Loading iscsi driver: [OK]
Mknod: '/dev/iscsictl': File exists
Starting iscsid: [OK]
[Root @ rac1 etc] #
5. set the iscsi service
[Root @ rac1 etc] # chkconfig -- list iscsi
Iscsi 0ff 1ff 2ff 3ff 4ff 5: off 6: off
[Root @ rac1 etc] # chkconfig -- add iscsi
[Root @ rac1 etc] # chkconfig -- add iscsi
[Root @ rac1 etc] # chkconfig iscsi on
[Root @ rac1 etc] # chkconfig -- list iscsi
Iscsi 0: off 1: off 2: on 3: on 4: on 5: on 6: off
6. view the scsi device
[Root @ rac1 etc] # iscsi-ls
**************************************** ***************************************
SFNet iSCSI Driver Version.... 1.11-3 (02-May-2006)
**************************************** ***************************************
[Root @ rac1 etc] #
7. normally:
[Root @ rac1 ~] # Iscsi-ls
**************************************** ***************************************
SFNet iSCSI Driver Version.... 1.11-3 (02-May-2006)
**************************************** ***************************************
Target name: iqn.2001-04.com. example: storage. disk2.sys1. idisk
Target alias:
Host id: 6
Bus id: 0
Target id: 0
Target address: 172.25.1.100: 3260,1
Session status: established at Thu Oct 25 00:46:13 CST 2007
Session id: ISID 00023d000001 TSIH 200
**************************************** ***************************************
[Root @ rac1 ~] #
8. you can see the newly added device through dmesg.
Recent hot topics EMC Technology Foundations e20-820EMC Legato CertE20-001EMC Technology Foundations E20-097 (share) EMC E20-500 (share) EMCE20-593 questions (share)