Update Debian Squeeze (6.0) to Wheezy (7.0) with iscsi

Since June, 15th 2013, debian released the new stable Version 7.0 , called wheezy. Fortunately, the upgrade process is quite simple .. If don’t have any special combinations.

The normal upgrade Process is good explained here.

If you do have a iscsitarget running, you will notice that the upgrade process installs two new packages for iscsitarget & iscsitarget-dkms.
But the compiling of the dkms module “iscsi_trgt” Fails with some strange block_io error (found in the make.log):
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/block-io.c: In function ‘blockio_make_request’:
/var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/block-io.c:59:18: error: storage size of plugin isn't known

After some research, I found a solution here.
The definition of struct blk_plug is missing. You can read the details under the link above. In short, you have to
add a patch to the file /var/lib/dkms/iscsitarget/1.4.20.2/source/dkms.conf.

--- dkms.conf.org 2013-06-04 14:49:28.000000000 +0200
+++ dkms.conf 2013-06-04 14:50:26.000000000 +0200
@@ -37,3 +37,5 @@
PATCH_MATCH[13]="2.6.16.60-.*"
PATCH[14]="compat-rhel4.patch"
PATCH_MATCH[14]="2.6.9-.*.(el|plus.c4)"
+PATCH[15]="compat-2.6.38.patch"
+PATCH_MATCH[15]="2.6.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38)"

After you added the patch in the dkms.conf file, execute dkms autoinstall and the iscsitarget will be build without any Troubles.

[UPDATE August, 09 2013 00:38]
Unfortunately, this patch doesn’t solve the problem. After some connections, a kernel panic occurs – Details here. So you have to compile it manualy to make it work. I hope, it work’s now, otherwise, all my ESXi Hosts are gone ;-).


# become root
sudo su

# check out the source from source forge (do an "apt-get install subversion" if you don't have the svn command)
svn co https://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget iscsitarget

# cd into the iscsitarget/trunk
cd iscsitarget/trunk

# you do need the kernel headers & build-essentials
apt-get install linux-headers-`uname -r` build-essentials

# build the package
make

# now install it
make install

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.