iSCSI configuration

My CCTV Server utilizes an iSCSI disk for realtime backups, and I setup the iSCSI disk on my mrepo server running CentOS.

After searching around, I ended up using the iSCSI Enterprise Target project for the Linux box. I used the iscsitarget-0.4.15-4.el5.i386.rpm from my Mrepo server, using the atrmpms-stable repo for CentOS 5. The install gave me a little trouble off the bat because the kernel installed on the server was newer than what Yum wanted to install. I checked to see what kernel I had installed:
uname -a
Which was the kernel I then issued:
yum list kernel-*
This displayed everything that has "kernel-" in it, and this gave me the exact name of the kernel package that was installed. Then I used Yum to remove the active kernel:. yum -y remove
I then installed iscsitarget: yum install iscsitarget
And yum installed the appropriate kernel yum: Installed: kernel-2.6.18-128.1.10.el5.i686
yum: Installed: iscsitarget-kmdl-2.6.18-128.1.10.el5-0.4.15-4.el5.i686
yum: Installed: iscsitarget-0.4.15-4.el5.i386

Since I run this server headless, I modified grub.conf to make sure the above kernel was the one used when the machine booted.

Once iscsitarget was installed, I formatted a file for the iSCSI to use for my backup. dd if=/dev/zero of=/mnt/hd/iscsi/cctv bs=1M count=204800 This gave me a 215GB partition for the backups.

I then modified the ietd.conf that I am using, and modified three lines: Target
Lun 0 Path=/mnt/hd/iscsi/cctv
IncomingUser cctv

The IncomingUser is what was giving me trouble, but more on that later...
I also made sure the initiators.allow had the apprpriate settings: ALL
I then issued: /etc/init.d/iscsi-target start
and made sure there were no errors by: tail -f /var/log/messages
Once all was running, I made sure it started at boot: chkconfig iscsi-target on
Now, it was on to configuring the CCTV Server:

Configuring the CCTV server using the iSCSI Initiator was farily straight forward, simply downloading the Initiator, and configuring it, but since there are many howtos around to document that process, I will not go into those here.
Configuring the Geo System was a little more tricky. Once you start the RemoteBackup service, the following appears:
The User Name had to match the IncomingUser that is defined in the ietd.conf above, which I was putting the Target iqn identifier. Once I got that figured out, the other configurations that are documented in the manual, gives me the ability to backup anytime, and what cameras to backup.

Since all this took my roughly two days to figure out, here are the beneficial resources I found while putting this together:

This whole process started with tgtadm following this guide. I issued the following:

#/etc/init.d/tgtd start
#dd if=/dev/zero of=/mnt/hd/iscsi/cctv bs=1M count=102400
#tgtadm --lld iscsi --op new --mode target --tid=1 --targetname
#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /mnt/hd/iscsi/cctv
#tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
#tgtadm --lld iscsi --op show --mode target

But I could not get tgtadm to work, hence the iSCSI Project was the way to go for me with the servers that I had