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 set up a test environment.
If you see anything that is in “error” or would like to have something added, please feel free to contact us.
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.
- Download the ISO installation file;
- Create an Installation CD;
- Boot the Target Computer from the Installation CD;
- Install the Default Ubuntu 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.
- Open a Terminal Window/Command Line session;
- Type in the following:
- 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.
- Open a Terminal Window/Command Line session;
- Type in the following:
- 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.
- Open a Terminal Window/Command Line session;
- Type in the following:
- 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.
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 Practice” to set up Servers with a Static IP address.
The main file that you will be working with is, and you will need sudo/root access to this file:
To Backup the original config file:
To Edit the file:
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:
Configuring DHCP
The main file that you will be working with is, and you will need sudo/root access to this file:
Backup the original config file:
Now to Edit the file:
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:
Additional Useful Commands
To manually start the DHCP Service:
To get DHCP Service to Autostart:
To check DHCP leases:
To Verify that the Server is listen for Clients:
To check Log files:
gedit /var/log/messagesgedit /var/log/syslog
Configuring TFTP
Generally, when TFTP (tftpd-hpa) is installed, the installation will add the correct lines of configuration code, but if you would like to check (or add) use the following:
The main file that you will be working with is, and you will need sudo/root access to this file:
Backup the original config file:
Now to Edit the file:
To enable TFTP, add the following code:
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.
If you changed /etc/inetd.conf, then you will need to reload the inetd process with the following command:
Configuring iSCSI
The main file that you will be working with is, and you will need sudo/root access to this file:
Now to Edit the file:
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:
The iSCSI target daemon is:
Trouble Shooting – Things to Check/Verify
If you get the error:
check:
to confirm
One should also check/verify that:
to confirm
[contentblock id=1]