Penguin

Differences between version 25 and predecessor to the previous major change of XenNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 25 Last edited on Thursday, March 25, 2010 2:33:08 pm by GreigMcGill Revert
Older page: version 24 Last edited on Thursday, October 8, 2009 11:31:49 am by GreigMcGill Revert
@@ -4,8 +4,84 @@
 !!!Making a tape drive available to a guest via iSCSI 
 __This is specifically for Citrix ~XenServer, although the principles will of course work in other Xen implementations__ 
  
 I recently had a scenario where I was replacing two Windows servers with ~XenServer guests. This was fine, but we needed a way to backup to the existing SCSI DDS4 DAT drive. After failing to make PCI passthrough work, I settled on the much nicer method of providing the tape drive via an iSCSI target on the ~XenServer Host (Dom0). Here is how I achieved this. 
+  
+__NOTE WELL: This method replaces the old one using a patched ietd. It is STILL unsupported__  
+  
+* Download and install the DDK machine from citrix.com  
+* Download the following packages to the DDK from http://scst.sourceforge.net/downloads.html  
+** scst  
+** iscsi-scst  
+** scstadmin  
+* Extract them in a build directory (I'm using /opt/build)  
+* Edit the scst-1.0.1.1/src/Makefile and uncomment the line <tt>EXTRA_CFLAGS += -DCONFIG_SCST_STRICT_SERIALIZING</tt>  
+* Now, in order, do a <tt>make</tt> and <tt>make install</tt> for scst, iscsi-scst, and scstadmin (you need the install, even though it's on the DDK for the deps of iscsi-scst)  
+  
+Here's where it gets a little ugly, and I'd welcome suggestions (just edit this wiki) for how to do this the "right" way. This is necessary because the <tt>make install</tt> part of the build depends on having the kernel-dev skeleton installed, and this can't be installed on a ~XenServer Host (to my knowledge).  
+  
+* tar up the devel tree - example (the dir will change depending on the ~XenServer/kernel version):  
+<pre>  
+cd /usr/src/kernels/2.6.18-128.1.6.el5.xs5.5.0.505.1024xen-i686  
+tar -czvpf /opt/build/build.tar.gz .  
+cd /opt/build  
+</pre>  
+  
+OK, you're now ready to install on your target XenServer host  
+  
+* Copy the entire /opt/build dir to the target host and execute the following steps ($kern is the version you used above):  
+<pre>  
+yum --enablerepo=base install gcc make patch m4 openssl-devel  
+mkdir /lib/modules/$kern/build  
+cd /lib/modules/$kern/build  
+tar -zxvf /opt/build/build.tar.gz  
+cd /opt/build  
+cd scst-1.0.1.1  
+make install  
+cd ../scstadmin-1.0.6  
+make  
+make install  
+cd ../iscsi-scst-1.0.1.1  
+make  
+make install  
+</pre>  
+  
+Now have a look in /proc/scsi/scsi (or use <tt>lsscsi</tt>) to get your HCIL info for your tape drive and create /etc/scst.conf using THAT info, NOT the example info given here...  
+  
+<pre>  
+~[HANDLER tape]  
+DEVICE 6:0:3:0  
+  
+~[ASSIGNMENT Default]  
+DEVICE 6:0:3:0,0  
+</pre>  
+  
+* Now create /etc/iscsi-scstd.conf similar to the following (I generated mine using the method found [here | http://iscsi-scst.sourceforge.net/iscsi-scst-howto.txt])  
+<pre>  
+Target iqn.2005-03.org.open-iscsi:76cf8781117f:storage  
+</pre>  
+  
+* Ensure you have TCP port 3260 open in /etc/sysconfig/iptables and run service iptables restart  
+  
+* Finally, set the relevant daemons to start on boot with chkconfig scst on && chkconfig iscsi-scst on (and start them with service scst start && service iscsi-scst start)  
+  
+You should now be able to discover and connect to the target.  
+  
+Tested using MS iSCSI initiator on Windows Server 2008 against the above config on ~XenServer 5.5.  
+  
+I note this page is referenced A LOT from Citrix and other sites. It is very important to note this is NOT supported by Citrix. It would be great if they provided this ability natively, to save me the ton of work I've had to do retesting the old solution and finally developing this one (well, I developed nothing, just put it all together, but still...). If this is useful to anyone out there, I'm a huge beer nerd, and love great craft beer from all over the world. If you want to say thanks, you can send beer to:  
+  
+  
+<pre>  
+Greig McGill  
+23 Saxbys Road  
+Hamilton 3206  
+New Zealand  
+</pre>  
+  
+If you can't be arsed sending me a nice beer, I'll be in Chicago at BriForum2010 - you can get me one there! ;)  
+  
+__The old method below works on XenServer pre 5.0__  
  
 Note 1: This is totally unsupported by Citrix 
  
 Note 2: I've used the ~XenServer terminology "host" instead of Dom0, as this applies to the Citrix commercial implementation of Xen. It will probably work fine on OSS Xen, but you can just install the normal kernel dev packages and ignore the DDK stuff.