bamed.org | chown -R bamed. ~/base

iSCSI SAN

There’s been so much talk about SAN’s lately, and I knew my budget would never allow me to purchase one, so this week I built my very own iSCSI SAN.

I put together a system with an AMD Athlon64 X2 AM2 3800+ with 2GB DDR2 800 RAM, a 20GB IDE HDD for the OS and 4 250GB HDD I had lying around. Three of the 250GB HDD’s are IDE and the fourth is SATA. When my budget allows I intent to replace the IDE’s for SATA’s. I installed Ubuntu Server 7.04 on the 20GB HDD. Then installed iscsi-target, configured my LUN’s and all was done. For the moment I’m just using one of the 250GB HDD’s as a backup for our server, but now that I know how easy it was to setup, I’m going to think of some more creative ways to use my homemade SAN.

For those of you interested, here’s how I setup the software.

First download and install Ubuntu. It was pretty straightforward so I won’t get into that part of it. Once Ubuntu is installed get all the updates, including any kernel updates:

# sudo apt-get update
# sudo apt-get dist-upgrade
# sudo apt-get upgrade
Once all the updates are installed reboot. Now you need to install a few more packages:

# sudo apt-get install make
# sudo apt-get install libssl-dev
# sudo apt-get install linux-headers-`uname -r`
# sudo apt-get install gcc
Now make a symlink to your kernel source:

# sudo ln -s /usr/src/linux-headers-`uname -r` /usr/src/linux

This way make can find your kernel source files when you compile scsi-target without any other configuration from you.

Now download iscsi-target from http://sourceforge.net/project/showfiles.php?group_id=108475. Unzip and untar the file, the cd into the directory you extracted it to. Now:

# make
# sudo make install

If you don’t get any errors iscsi-target is installed. I did find one compatibility problem with the startup script with Ubuntu. To fix it edit /etc/init.d/iscsi-target by changing the first line from

#!/bin/sh

to

#!/bin/bash

No copy the ietd.conf file from the etc/ directory under the directory where you compiled iscsi-target to the systems /etc directory. You should read the man files and all associated documentation, but the only things you need to worry about to get up and running are the ‘Target’, ‘Lun 0 Path=’, and ‘Alias’ options. Configure these according to your system, then start up iscsi-target:

# sudo /etc/init.d/iscsi-target start

Now you just need to configure your iscsi initiators on whatever your want to use the iscsi drives on. I tested it in Windows and in Linux and it works beautifully. So far I’ve only tested it by making one HDD = one LUN, but it should be able to support different types of configurations such as RAID or file LUN’s, and there’s failover support as well. I’ll look into these some more and get the details back to you.

I’m just excited to have a 1TB homemade SAN to play with now.

Comment Pages

There are 1 Comments to "iSCSI SAN"

Write a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Essentials