NetAdminTools.com
 
SignalQ Sites:
L1G3R Information Systems - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Solar Energy - Energy Efficiency - Solar Panels
Home Energy Savings
Categories:
GNU/Linux | Homebrew designs | Perl | Ruby | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | ERP | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Ruby
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·ERP
·REALbasic
·All Categories


Creating a SAN with iSCSI - Part 1 - Setting up the Target on GNU/Linux
Topic:File/Print   Date: 2004-10-18
Printer Friendly: Print   

spacerspacer
<<  <   >  >>

Subject

[See This article for a newer procedure.] An iSCSI target is the server piece of an iSCSI SAN. The client piece/driver is called the initiator. We will be running the target on a GNU/Linux box with a 2.4.27 kernel, and will run the initiator on a Windows 2000 server. For our iSCSI target, we will use the source from the iSCSI Enterprise Target Project. Let's uncompress the source and compile for our kernel:

[root@srv-3 src]# tar -xzf iscsitarget-0.3.4.tar.gz
[root@srv-3 src]# cd isc*
[root@srv-3 iscsitarget-0.3.4]# ls
ChangeLog  ietd.conf  iscsid  Makefile  README
COPYING    include    kernel  man       scripts
[root@srv-3 iscsitarget-0.3.4]# make KERNELSRC=../linux-2.4.27
make -C iscsid
make[1]: Entering directory `/usr/src/iscsitarget-0.3.4/iscsid'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/iscsitarget-0.3.4/iscsid'
make modules -C ../linux-2.4.27 SUBDIRS=/usr/src/iscsitarget-0.3.4/kernel
make[1]: Entering directory `/usr/src/linux-2.4.27'
.
.
.
-DKBUILD_BASENAME=file_io  -c -o file-io.o file-io.c
make[2]: Leaving directory `/usr/src/iscsitarget-0.3.4/kernel'
make[1]: Leaving directory `/usr/src/linux-2.4.27'
[root@srv-3 iscsitarget-0.3.4]# 

Let's install the modules:

[root@srv-3 iscsitarget-0.3.4]# make KERNELSRC=../linux-2.4.27 install
`iscsid/ietd' -> `/usr/sbin/ietd'
`iscsid/ietadm' -> `/usr/sbin/ietadm'
if [ -f /etc/debian_version ]; then \
install -v -m 755 scripts/initd.debian /etc/init.d/iscsi-target; \
elif [ -f /etc/redhat-release ]; then \
install -v -m 755 scripts/initd.redhat /etc/init.d/iscsi-target; \
else \
install -v -m 755 scripts/initd /etc/init.d/iscsi-target; \
fi
`scripts/initd.redhat' -> `/etc/init.d/iscsi-target'
install: creating directory `/lib/modules/2.4.27/kernel/iscsi'
`kernel/iscsi_trgt.o' -> `/lib/modules/2.4.27/kernel/iscsi/iscsi_trgt.o'
`kernel/file-io.o' -> `/lib/modules/2.4.27/kernel/iscsi/fileio.o'
depmod -aq
[root@srv-3 iscsitarget-0.3.4]#

We need to copy the sample ietd.conf to /etc and edit:

[root@srv-3 iscsitarget-0.3.4]# vi /etc/ietd.conf

The only lines we modified are:

User userid superpassword
Target iqn.2004-09.com.signalq:storage.lvm
Lun 0 /dev/volgroup/logicalvol fileio
Alias LVMVOL

We are exporting the logical volume we created in this series of articles. This is a pair of RAID1 devices that create one logical volume. The startup script for the iSCSI daemon is iscsi-target. Let's start it up:

[root@srv-3 iscsitarget-0.3.4]# ls /etc/init.d
anacron  functions  iscsi-target  named    ntpd        rhnsd      sshd
apmd     gpm        isdn          netfs    pcmcia      saslauthd  syslog
atd      halt       kdcrotate     network  portmap     sendmail   winbind
autofs   httpd      killall       nfs      postfix     single     xfs
crond    iptables   kudzu         nfslock  random      snmpd      xinetd
cups     irda       messagebus    nscd     rawdevices  snmptrapd  ypbind
[root@srv-3 iscsitarget-0.3.4]# 
[root@srv-3 iscsitarget-0.3.4]# /etc/init.d/iscsi-target start
Starting iSCSI target service:                             [  OK  ]

Let's check out our logs and see if all is fab:

[root@srv-3 iscsitarget-0.3.4]# dmesg
.
.
.
init_fileio(233) register fileio
iet_target_param_set(128) d 1 8192 262144 65536 2 20 8 0
[root@srv-3 iscsitarget-0.3.4]# 
[root@srv-3 iscsitarget-0.3.4]# tail /var/log/messages
.
.
.
Oct 19 03:51:34 srv-3 kernel: init_fileio(233) register fileio
Oct 19 03:51:34 srv-3 kernel: iet_target_param_set(128) d 1 8192 262144 65536 2 20 8 0
Oct 19 03:51:34 srv-3 iscsi-target: ietd startup succeeded
[root@srv-3 iscsitarget-0.3.4]# 

All is fab!

Next

There are 6 parts to this article:
Part 1 - Setting up the Target on GNU/Linux
Part 2 - Setting up a Windows Initiator - Initial Install
Part 3 - Setting up a Windows Initiator - Finish Install
Part 4 - Setting up a Windows Initiator - iSCSI Setup
Part 5 - Setting up a Windows Initiator - Creating the Drive
Part 6 - Setting up a Windows Initiator - Finishing Up


People:
Places:
Things:
Times:





Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2011 NetAdminTools.com