Oct 052010
 

PLEASE VISIT http://www.stephenwagner.com/?p=300 FOR AN UPDATED TUTORIAL.

 

Disclaimer: Please note that whenever doing any of the steps mentioned in this post, if you do not know what you are doing, you can render your linux install usless. Please do NOT use this in a production environment, and only use for testing. I’m not liable if you toast your linux install.

First and foremost, you need to know that from what I understand, the typical kernels that ship with CentOS have numerous patches, modifications, and updates from the typical Linux kernel releases. This is one reason why the releases of the kernels are always behind compared to ones that are actively being developed. I could be wrong, but I think the Redhat kernel patches are applied to CentOS kernels.

This tutorial will walk you through on how to get you up and running in the dirtiest and quickest method. You may and probably will have to modify things, re-compile, etc… to resolve any issues you may run in to.

I wrote this article only to help more people get up and running with one of the only open-source Linux iSCSI targets that has been certified by VMware (Certified when running on certain appliances) to be used in a vSphere environment (supports Vmotion, SCSI reservations, etc…)

I’m going to assume you have CentOS 5.5 installed and is fully up to date.

Anyways, here’s a breakdown of what we will be doing to get Lio-Target to run on CentOS:

  • Download lio-target modified kernel
  • Download lio-utils
  • Compile a modified kernel using existing kernel .config file
  • Compile and install lio-utils
  • Sample commands to setup a dedicated drive on your system as a iSCSI target (to test)
  • Compose two quick and dirty config files so lio-target can run

Download the lio-target modified kernel

For this step, you will need to have git installed. From what I understand git is not an option during the CentOS install, and cannot be installed using the default typical yum repos. To get git installed, we will first add the “RPMFusion” and “EPEL” yum repos.

(Info on how to install these can be found at http://rpmfusion.org/ and https://fedoraproject.org/wiki/EPEL)

Once you have installed these, it’s time to install git. This can be easily done by typing:

yum install git

After git is installed, it’s now time to download the lio-target kernel.

Type in:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git lio-core-2.6.git

It is now downloading the source. After this is complete, change directory to the new directory that was created, and type in:

git checkout origin/lio-3.4

You now have the source.

Download lio-utils

This is a pretty simple step. If you just completed the step above, make sure you cd back in to a directory that you can use as a workspace, and make sure you do NOT do this, inside of the directory that was downloaded above. Type in:

git clone git://git.kernel.org/pub/scm/linux/storage/lio/lio-utils.git lio-utils.git

This should create a directory called “lio-utils.git”. This step is done.

At this point

You should have two directories inside of your workspace:

lio-core-2.6.git

lio-utils.git

Compile a modified kernel using existing kernel .config file

It is now time to build a kernel. First of all, issue a uname –a and note the kernel you are running. In my case it’s “2.6.18-194.17.1.el5”. I’m going to take a config file from the boot directory that matches the number, and copy it to the lio-core-2.6.git directory, only change the name to “.config”. This is what I would type in on my end:

cp /boot/config-2.6.18-194.17.1.el5 /root/lio-core-2.6.git/.config

This command above would copy the config for the CentOS kernel, and move it to the lio-core-2.6.git directory with the new name of “.config”. Now change into the lio-core-2.6.git directory:

cd lio-core-2.6.git

At this point we are going to run a command to help the config adjust to the newer kernel version. Type in:

make oldconfig

This will spawn numerous messages. You can just go ahead and keep hitting enter. It will seem like an endless loop, however eventually it will complete. Now the next step, this is important. By default, new kernels use a different sysfs structure. We need to turn on the depreciated item that CentOS uses. Type in:

make menuconfig

Navigate to:

“General Setup”, then check (put a star in the box) for “enable deprecated sysfs features to support old userspace tools”.

Now hit tab to select exit. Once again tab to exit at the main menu. We are now ready to compile! To do a quick compile, type in:

make && make modules && make modules_install && make install

Feel free to disapeer for a while. This will take some time depending on the performance of your system. Once done, you now have a kernel with lio-target built in that is compiled and installed.

Keep in mind that this is NOT the default kernel, and you will have to select this to boot when starting your system. To change this, modify /etc/grub.conf and change the default value to whichever item it is (remember that the first item is 0, and not 1).

Let’s boot the new kernel. Safely shut down your linux box, reboot, and when grub shows up, boot using the new kernel you compiled.

Please note: This guide is a quick and dirty way to get this up and running. Since we skipped customizing the kernel, the kernel you compiled will no doubt come up with errors on boot. I simply ignore this. You can too, just to get this up and running. You can come back at a later time and refine your custom kernel to be used.

Compile and install lio-utils

This is simple. Change directory to the directory where you downloaded lio-utils.

cd /root/lio-utils.git

And to compile and install:

make

make install

And BAM, you’re done, that was easy!

Sample commands to setup a dedicated drive on your system as a iSCSI target (to test)

It’s show time. I’m still fairly new to the configuration and usage of lio-target, so I’m just posting the commands to get it working on a dedicated disk. There are no manual (man page) entries installed by lio-utils, so you will need to use lio_node –help and tcm_node –help for more information on proper usage.

Keep in mind, DO NOT use your linux disk as a iSCSI target! Let’s pertend we have a second disk in the system /dev/sdb that we want to turn in to a target. This is what we would type:

tcm_node –block iblock_0/array /dev/sdb

/etc/init.d/target start

lio_node –addlun iqn.2010.com.stephenwagner.iscsi:array 1 0 iscsi00 iblock_0/array

lio_node –listendpoints

lio_node –addnp iqn.2010.com.stephenwagner.iscsi:array 1 192.168.0.10:3260

lio_node –listendpoints

lio_node –disableauth iqn.2010.com.stephenwagner.iscsi:array 1

lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array 1 iqn.CLIENTINITIATORHERE.com 0 0

lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array 1

The above will create a target, and discovery portal for /dev/sdb on 192.168.0.10. This will also disable CHAP authentication, and will allow the initator I specified above to connect.

Please change /dev/sdb to the drive you want to use

Please change iqn.2010.com.stephenwagner.iscsi:array to the iSCSI target you want to call yours.

Please change 192.168.0.10 to the IP of the iSCSI target your configuring. Leave port as 3260.

Please change iqn.CLIENTINITIATORHERE.com to the iqn for your initiator (client). This will be set on the client you are using to connect to the iSCSI target.

BAM, your target is up and running! Keep in mind, this configuration is lost upon reboot.

Compose two quick and dirty config files so lio-target can run

Here’s what you need to put in the config files to make the above config work on boot:

/etc/target/tcm_start.sh should contain:

tcm_node –block iblock_0/array /dev/sdb

/etc/target/lio_start.sh should contain:

lio_node –addlun iqn.2010.com.stephenwagner.iscsi:array 1 0 iscsi00 iblock_0/array

lio_node –addnp iqn.2010.com.stephenwagner.iscsi:array 1 192.168.0.10:3260

lio_node –disableauth iqn.2010.com.stephenwagner.iscsi:array 1

lio_node –addlunacl iqn.2010.com.stephenwagner.iscsi:array 1 iqn.1991-05.com.CLIENTINITATOR.com 0 0

lio_node –enabletpg iqn.2010.com.stephenwagner.iscsi:array 1

After you make these config files. You should be able to start lio-target in a running state, by issuing:

/etc/init.d/target start

And remember, that you can always view a live feed of what’s going on by issuing:

tail –f /var/log/messages

Hope this helps!

Sep 282010
 

Last night I was working on my vSphere test cluster, and an old memory popped up into mind. I just want to share on my blog since this extremely important peice of information could affect you or one of your own deployments.

There are numerous guides on the internet out there telling you how to set up your own SAN or NAS using iSCSI for your own ESXi boxes. One thing these guides don’t factor in is environments that have multiple ESXi hosts.

VMware ESXi (and ESX) when using iSCSi and a shared VMFS volume, require an iSCSI target (iSCSI server) that supports SCSI reservations. Most opensource iSCSI targets like IETD (iSCSI Enterprise Target) DO NOT SUPPORT this standard as of the time of this article being written.

With this being said, operating an iSCSI VMFS volume shared to multiple hosts could ultimately end up in corruption and data loss.

One opensource iSCSI target that I know of that DOES support SCSI reservations is Lio-Target (available here). I personally haven’t experimented with it, but it does support it. One of these days I’m going to do some of my own testing with it.

Keep in mind that instead of using iSCSI you could alternatively use NFS. I use NFS at my company and it works great as a ESXi data store for 3 ESXi boxes. For those of you curious, NFS data stores DO support High Availability (FT), and Vmotion!

UPDATE: Tried out FreeNAS running on a SuperMicro Server with a HP Smart Array 6400 Array controller with an MSA20 storage unit. FreeNAS started spewing a very large amount of errors when accessing VMFS over iSCSI. I think this could be due to some of the disks I have in the array that aren’t being flagged as bad, but are in fact bad.

Sep 222010
 

Just a note for you guys. I was searching for this and it was incredibly hard to find out any information, so I thought I’d create something that could be easily indexed when searched for.

Symptoms:

You try to upgrade the processor on a DL360 G5 to a Quad-Core processor and you receive the message:

“The revision of the Intel (R) 5000 series chipset on the system board does not support the installed processor type. System halted!”

Cause:

There are two separate motherboards that were being shipped with the DL360 G5. The first version of the motherboard only supported 50xx and 51xx dual core Xeon processors. This version shipped with the earlier products.

The second version supported 54xx quad core Xeon processors.

Part Numbers:

412199-001 – Only supports 50xx and 51xx Dual-Core

436066-001 – Supports up to 54xx Quad Core Processors.

435949-001 – (Not Confirmed) Supports up to 54xx Quad Core Processors. (Updated March 22nd, 2011)

Sep 162010
 

For some time I have had clients reporting issues when saving files using Word, Excel, PowerPoint, and other Microsoft Office applications on network locations (which includes “FolderRedirection” for the “Desktop” and “My Documents” which is included in Windows Small Business Server 2008).

Over the last couple months I have spent quite a bit of time using Google to try and find out why this is happening. Tonight I told myself I NEED to find a proper fix.

After trying numerous search strings, I started to read articles that pointed towards disabling SMB2 (SMB version 2). I would be interested in trying this approach on a typical Windows Server 2008 box, however most of my clients run SBS 2008 and I’ve seen no feedback on whether or not this will cause issues when performing this fix. Also, I have no idea what type of impact it will have on other applications. Generally I just didn’t feel comfortable doing this.

Spending another hour searching, and trying more search strings, I finally came across this KB article 2292752 posted by Microsoft (http://support.microsoft.com/kb/2292752).

The KB article states that this is related to a Network Driver included inside of Windows 7, and that an alternative patch that was designed for a different type of issue also fixes this issue. This patch can be found at http://support.microsoft.com/kb/981711.

Make sure that when filling out your e-mail to download the hotfix that you download the appropriate fix (x86 vs. x64 vs. Itanium).

Please note: This fix comes with Microsoft “This has not been fully tested stamp”. We also take no responsibility in you performing this fix.

I downloaded the fix, and installed it on one of the computers that was experiencing the issue. After installing this I no longer experienced the “Save As” function, or “Save” function take forever with Office 2007/2010 apps. I will post a comment later after user testing has been completed to confirm this fully resolves the issue.