Deployment Solution

 View Only

How to Connect to and Image an iSCSI Device from the Dell Linux Preboot 

Jun 30, 2008 10:50 AM

If you want to consolidate your storage into centralized arrays but don't want to spend all your budget on an expensive SAN system, iSCSI is the answer. iSCSI brings SAN functionality to Ethernet allowing you to simplify your data storage needs. Use this article to discover how to use the Linux preboot environment to deploy images to your iSCSI targets and configure your NIC firmware to boot iSCSI allowing your servers to run completely disk-less.

Note: This article assumes you have a configured iSCSI target such as a Dell MD3000i, one or more Dell servers with Broadcom NIC firmware capable of iSCSI booting, a working Deployment Solution for Dell Servers 3.1 console with the Linux preboot installed and a basic understanding of iSCSI and Linux.

Introduction

First some vocabulary:

  • iSCSI Target - The machine containing the disk array that multiple machines will be accessing.
  • Initiator - Think of this as a "client". Initiators can be implemented in software, or in hardware (on the nic card).
  • LUN - Logical Unit Number. In the iSCSI world this represents a virtual disk on the iSCSI target. An iSCSI disk can contains several partitions, just like a physical disk can.
  • IQN - iSCSI Qualified name. This is an address of the form iqn.<yyyy-mmm>.com.<company name>:<server name> and is how the initiator and iSCSI Target identifies themselves during login.

Whenever you make a connection to an iSCSI target and expose a disk device to the local bus, this is done with an initiator. A convenient way get up and running with iSCSI is to use a preboot installed with a software initiator to deploy an iSCSI enabled OS image to a LUN, and then configure the hardware initiator embedded in the NIC, to boot from that iSCSI LUN. The steps below will walk you through this process:

Preparing a Windows image to be deployed to iSCSI

Start with a machine configured with a local disk. For this example we will be using a Dell PowerEdge M600 blade. Follow the instructions included in this Dell document to prepare the OS for imaging from a local disk. Make sure you use the BOOT version of Microsoft iSCSI Initiator software, and that you don't skip any steps.

Note: The initial install of the OS to the local disk may easily be performed by using the Job Builder to build a scripted Windows 2008 or 2003 install.

Capturing the image

Use Deployment Solution to create a "Create Disk Image" task, and capture the image (no sysprep) from the local disk. We will deploy that same image to iSCSI later on in the process, then sysprep and capture a new image that can be deployed to multiple systems.

Adding iSCSI initiator software to the Dell Linux preboot

Note: Instead of compiling the kernel modules yourself, I have attached a zip file containing all the compiled files for your convenience. These files will only work with the Dell Linux preboot for DS 6.8 SP1 or 6.9 I have included compile instructions however, so you may utilize the latest version of the open-iscsi software.

Manual compilation instructions

(skip to "Copy to DS Share" if you don't want to compile the modules yourself:

Download the latest version of the open-iSCSI source code from here. As of the writing of this article, the lastest version was open-iscsi-2.0-869.2.tar.gz

On a 32-bit Linux system with gcc-4.1 installed download the kernel source for the 2.6.18.8 version of the Linux kernel available from www.kernel.org. Configure the kernel to build crc32c as a module, it is available under the cryptography section. Build the kernel modules. If you need additional guidance on how to compile kernel modules for the Linux preboot, see the following article written by lordmithrandir: Compiling Drivers for Linux and Adding Them to your Linux Automation Image

Compile the open-iscsi project with gcc-4.1 against the 2.6.18.8 kernel source with a call (executed from within the open-iscsi source directory such as:

open-iscsi-2.9-869.2] make KSRC=/usr/src/linux-2.6.18.8 where /usr/src/linux-2.6.18.8 is the path to the kernel source.

Copy iSCSI software to the DS Share

Once the open-iscsi project has successfully been built, copy the entire folder to the eXpress\Dell folder on your Deployment Server.

Pull out the crc32c.ko and libcrc32c.ko kernel modules from your compiled 2.6.18.8 kernel and place them in the eXpress\Dell folder within the Deployment Share. We will use a script to install them so we don't have to regenerate our Linux preboot image.

Copy the attached script iscsi_enable.sh to the Dell folder in the DS Share. This script will install the kernel modules into their proper places, and makes sure they will load. It will then install the iSCSI utilities.

Your dell folder should contain:

Dell\
	crc32c.ko
	libcrc32c.ko
	iscsi_enable.sh
	open-iscsi-2.0.869.2\
		.....
		.....

Connecting to iSCSI target

You're ready to connect to iSCSI using your Linux preboot. You probably will want to script these steps if you plan on performing this several times, but it's probably worth it to do manually at least once.

Boot a machine into the Linux preboot using a wait task. Run the following:

chmod 700 /mnt/ds/Dell/iscsi_enable.sh
/mnt/ds/Dell/iscsi_enable.sh

This sets execute permissions on the iscsi_enable.sh script and runs it. It will install the necessary kernel modules, and utilities within the environment. If all goes well you should see "ISCSI software installed." Next you need to set the Initiator Name to a valid IQN, the same IQN you configured host access for when you configured your iSCSI target. This initiator name is written to /etc/iscsi/initiatorname.iscsi. For example run the command:

echo "InitiatorName=iqn.1991-05.com.dell:8JCBNBH" > /etc/iscsi-initiatorname.iscsi

With the initiator name set, we can start the open-iscsi daemon:

/etc/init.d/open-iscsi start

Next we need to discover your iSCSI target using it's IP address and port. For example:

iscsiadm -m discovery -t sendtargets -p 192.168.0.156:3260

If iSCSi targets were discovered you should see their names printed out. Make note of this iSCSI target name, we will use it later for NIC configuration.

The last step in connecting is to login to the target. First acquaint yourself with what SCSI devices are currently on the system by entering:

ls /dev/sd*

then tell the system to login to the iSCSi target:

iscsiadm -m node -l

list your scsi devices again:

ls /dev/sd*

You should see at least one more SCSI devices listed. Those devices are the iSCSI LUNS exposed to the Linux OS. If you want to confirm that a given SCSI device is the iSCSI target, check the sysfs filesystem:

cat /sys/block/sdb/device/Model

This will print out the model of your iSCSI target. For instance if you are using a Dell MD3000i it will printout "MD3000i"

Deploying the image to iSCSI

With the iSCSI LUN appearing as a SCSI device in /dev, you are now ready to image the device. To discover which disk number to use, take a look at the showdisk output:

/mnt/ds/TechSup/Linux/showdisk

You should see a list of the disk numbers and their associated sizes. For this example, let's say that disk 2 is your iSCSI LUN. Create a "Distribute Disk Image" task in the DS console:

Browse to the image file, and under "additional parameters" specify the disk number as " -d 2 "

Run the distribute disk image task.

Logout from the iSCSI Target:

iscsiadm -m node -u

If you don't logout from the target, you may have trouble rebooting the machine using conventional DS mechanisms.

Configuring NIC firmware.

Once the image has been deployed to your iSCSI LUN you need to perform the following steps to boot from iSCSI. (Note: These instructions are written for Broadcom NICs, if you have an Intel NIC the method of configuring will be different, but the values should be the same.)

Boot the machine and enter the NIC configuration utility by pressing Ctrl+S. When you are brought to a blue menu, press Ctrl + k.

Select which NIC you would like to boot from iSCSI with. Make note of it's MAC address. You should now be presented with this menu:

Under "General Settings" set the following settings:

Under "Initiator Settings", enter the Initiator name

Under "1st Target Parameters", enter the iSCSI Target Name, and IP address. Save the changes and reboot, this time going into the BIOS by pressing F2.

Go to "Integrated Devices" find the NIC with the corresponding MAC address and turn on "Enable with iSCSI".

Next go into the Boot order, and place that NIC first in the list.

Reboot

Boot to the iSCSI device

You should now see the hardware initiator connect to the iSCSI target and boot from it. If you like you can shut down the machine and remove the hard disk since it is no longer needed. It is important to remember that this image is only good for this machine. If you want an image that can be deployed to multiple systems, run sysprep on the machine while it's running from iSCSI, and then use the Linux preboot to connect to iSCSI and capture the image. You can then deploy that image to other machines provided you configure your iSCSI target properly.

License: AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support: User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.

Statistics
0 Favorited
0 Views
3 Files
0 Shares
0 Downloads
Attachment(s)
zip file
iscsi_enable.zip   569 B   1 version
Uploaded - Feb 25, 2020
zip file
iSCSI_linux.zip   114 KB   1 version
Uploaded - Feb 25, 2020
zip file
open-iscsi-GPL.zip   1.86 MB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.