Thursday, March 11, 2010

iSCSI on Ubuntu 9.04
Minimize

The following section is a brief overview of "How to Install iSCSI on Ubuntu", and is intended as a reference.

These instructions were done as a guide to setup a test environment.

If you see anything that is in "error" or would like to have something added, please feel free to contact us.

- SDC

  
Basic Install Procedures
Minimize

The following section is for the basic installation of the Ubuntu Operating System and needed Services to get iSCSI running.

During these installations, the Default values should be used.

Install the Base Operating System

For this installation, we used the Desktop version of Ubuntu 9.04, which can be downloaded from the main Ubuntu website.

  1. Download the ISO installation file;
  2. Create a Installation CD;
  3. Boot the Target Computer from the Installation CD;
  4. Install the Default Unbuntu Desktop;
Install DHCP (dhcp3-server)

The following installation is done from the Terminal Window (aka - Command Line), and must be done with root/sudo access to the system.

  1. Open a Terminal Window/Command Line session;
  2. Type in the following:

sudo aptitude install dhcp3-server

  1. Select or OK the Default settings.
Install TFTP (tftpd-hpa)

The following installation is done from the Terminal Window (aka - Command Line), and must be done with root/sudo access to the system.

  1. Open a Terminal Window/Command Line session;
  2. Type in the following:

sudo aptitude install tftpd-hpa

  1. Select or OK the Default settings.
Install iSCSI (iscsitarget)

The following installation is done from the Terminal Window (aka - Command Line), and must be done with root/sudo access to the system.

  1. Open a Terminal Window/Command Line session;
  2. Type in the following:

sudo aptitude install iscsitarget

  1. Select or OK the Default settings.
Update the System

At this point, run the Update Manager, and Reboot the System.

From the top menu bar, select the following:

System > Administration > Update Manager

You will be prompted for the root/sudo password to apply any and all updates.

  
Configuration
Minimize

The following section is for the basic installation of the Ubuntu Operating System and needed Services to get iSCSI running.

During these installations, the Default values should be used.

Configuring Static Address

It is general "Best Practise" to setup Servers with a Static IP address.

Caution — Backup config files BEFORE Editing them!

The main file that you will be working with is, and you will need sudo/root access to this file:

/etc/network/interfaces

To Backup the original config file:

sudo cp /etc/network/interfaces /etc/network/interfaces.bak

To Edit the file:

sudo gedit /etc/network/interfaces

These settings are going to be uniques to your environment, and is beyond the scope of this document.

Once you have configured your IP Address set, you will need to restart the Service:

sudo /etc/init.d/networking restart

 

Configuring DHCP
Caution — Backup config files BEFORE Editing them!

The main file that you will be working with is, and you will need sudo/root access to this file:

/etc/dhcp3/dhcpd.conf

Backup the original config file:

sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.bak

Now to Edit the file:

sudo gedit /etc/dhcp3/dhcpd.conf

These settings are going to be uniques to your environment, and is beyond the scope of this document.

Once you have configured your DHCP server, you will need to restart the Service:

sudo /etc/init.d/dhcp3-server restart

 

Additional Useful Commands

To manually start the DHCP Service:

sudo /etc/init.d/dhcp3-server start

To get DHCP Service to Autostart:

sudo update-rc.d dhcp3-server defaults

To check DHCP leases:

gedit /var/lib/dhcp3/dhcpd.leases

To Verify that the Server is listen for Clients:

sudo netstat -uap

To check Log files:

gedit /var/log/messages

gedit /var/log/syslog

 

Configuring TFTP

Generally, when TFTP (tftpd-hpa) is installed, the installation will add the correct lines of configuation code, but if you would like to check (or add) use the following:

Caution — Backup config files BEFORE Editing them!

The main file that you will be working with is, and you will need sudo/root access to this file:

/etc/inetd.conf

Backup the original config file:

sudo cp /etc/inetd.conf /etc/inetd.conf.bak

Now to Edit the file:

sudo gedit /etc/inetd.conf

To enable TFTP, add the following code:

tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd /tftpboot

Note: If you wish to log Boot errors, then add the -l switch to in.tftpd causing errors to be logged to the system logs.

tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd -l /tftpboot

If you changed /etc/inetd.conf, then you will need to reload the inetd process with the following command:

/etc/init.d/inetd reload

 

Configuring iSCSI
Caution — Backup config files BEFORE Editing them!

The main file that you will be working with is, and you will need sudo/root access to this file:

sudo cp /etc/ietd.conf /etc/ietd.conf.bak

Now to Edit the file:

sudo gedit /etc/ietd.conf

Once you have opened this file, you will find additional information/comments within the file on how to "tweak" your installation.

For a basic install, you will need to add the following:

Target iqn.yyyy-mm.com.mydomain:[Optional identifier]
   Lun 0 Path=/path/to/image,Type=fileio,IOMode=rw

Where:

  • yyyy is the year and mm is the month that the domain became valid.
  • is written as 1.168.192 or com.yourdomain (this will change in your environment).
  • [Optional identifier] is used to further identify the target.
  • Path= is where your files are located on the local machine.

To restart iSCSI you can use the following command:

sudo invoke-rc.d iscsitarget restart

The iSCSI target daemon is:

tail -f /var/log/messages

 

Trouble Shooting - Things to Check/Verify

If you get the error:

iscsitarget not enabled in "/etc/default/iscsitarget", not starting...

check:

/etc/default/iscsitarget

to confirm

ISCSITARGET_ENABLE=true

One should also check/verify that:

/etc/initiators.allow

to confirm

ALL ALL
  
Additional References
Minimize

 

Click here to expand contentClick here to collapse content  DHCP

For additional information on the DHCP parameters, please see the following links:

For additional information, please see the following links:

For additional information on setting up a Static IP address, please see the following links:

Click here to expand contentClick here to collapse content  TFTP

For additional information on TFTP, please see the following links:

  
Version History
Minimize
DateVersionStatusAuthorComments
11/11/20090.5DraftALSRedid Page Layout and CSS;
Added Code Xtras;
Added Troubleshooting Tips
11/1/20090.4DraftALSAdded "iSCSI" section;
Tweaked the CSS
10/30/20090.3DraftALSAdded to "Configuation" Section
10/29/20090.2DraftALSAdded "Basic Install Procedures";
Started "Configuration" Section
10/28/20090.1DraftALSCreated Basic Doc Structure
  
Value Added Reseller (VAR) Relationships
Minimize
  
Google AdSense Advertising
Minimize


Seymour Digital Consulting • Downingtown, PA USA • (610) 304-4393

Privacy Statement  |  Terms Of Use
© 1998-2010 by Seymour Digital Consulting