Penguin

Differences between current version and revision by previous author of XenNotes.

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

Newer page: version 30 Last edited on Thursday, February 10, 2011 6:57:46 am by WikiWorld
Older page: version 28 Last edited on Sunday, October 31, 2010 12:46:54 am by CarlHeaton Revert
@@ -1,6 +1,104 @@
 !!!ntpdate(1) has no effect 
 Xen by default just uses the dom0's clock, which isn't updated within the domU's. Either set <tt>/proc/xen/independent_wallclock</tt> to 1 (so that this domU has an indepedent clock from the host dom0, or set the clock in the dom0. 
+  
+!!!Making a tape drive available to a guest via iSCSI Xenserver5.6  
+  
+<verbatim>  
+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  
+  
+  
+You can get the SCST source files from http://scst.sourceforge.net/downloads.html  
+As I want a stable platform I use the downloads from "Download released versions"  
+For the iscsi-target we need three files: scst, iscsi-scst and scstadmin.  
+You can get these files in varios ways, in the example they are downloaded with links.  
+If links is not already installed install it:  
+'emerge links'  
+Go the the directory where you want the files (the example uses /opt/build) and get the files:  
+'cd /root'  
+'links http://scst.sourceforge.net/downloads.html'  
+and download under stable the three needed files, at this moment they are scst-1.0.1.1.tar.gz, scstadmin-1.0.6.tar.gz and iscsi-scst-1.0.1.1.tar.gz  
+after downloading exit links:  
+'q'  
+  
+•Extract them in a build directory (I'm using /opt/build)  
+  
+  
+ Now extract the three downloaded files  
+'tar -zxf scst-1.0.1.1.tar.gz'  
+'tar -zxf scstadmin-1.0.6.tar.gz'  
+'tar -zxf iscsi-scst-1.0.1.1.tar.gz'  
+  
+•Edit the scst-1.0.1.1/src/Makefile and uncomment the line EXTRA_CFLAGS += -DCONFIG_SCST_STRICT_SERIALIZING  
+  
+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 make install 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):  
+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  
+  
+Ok now time to move to your Xenserver host.  
+  
+•Copy the entire /opt/build dir to the target host and execute the following steps ($kern is the version you used above):  
+yum --enablerepo=base install gcc make patch m4 openssl-devel yum-utils  
+. /etc/xensource-inventory  
+if [ "$PRODUCT_VERSION" == "5.6.0" ] ; then  
+ yum -y --enablerepo=base install yum-utils  
+ yumdownloader --enablerepo=base e2fsprogs-devel  
+ rpm --nodeps -Uvh e2fsprogs-devel*.rpm  
+ rm -f e2fsprogs-devel*.rpm  
+fi  
+yum --enablerepo=base install gcc make patch m4 openssl-devel yum-utils  
+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/src  
+make all  
+make install  
+depmod -aq  
+  
+cd ../scstadmin-1.0.6  
+make all  
+make install  
+Remove the scst_disk module from the startup file  
+vi /etc/init.d/scst  
+change the line SCST_MODULES="scst scst-disk scst_vdisk" to SCST_MODULES="scst scst-disk scst_vdisk scst_tape"  
+  
+cd /opt/build/iscsi-scst-1.0.1.1  
+make all  
+make install  
+cp etc/initiators.* /etc  
+cp etc/iscsi-scstd.conf /etc  
+depmod -aq  
+  
+Now have a look in /proc/scsi/scsi (or use lsscsi) to get your HCIL info for your tape drive and create /etc/scst.conf using THAT info, NOT the example info given here...  
+  
+[HANDLER tape]  
+DEVICE 6:0:3:0  
+  
+[ASSIGNMENT Default]  
+DEVICE 6:0:3:0,0  
+  
+•Now create /etc/iscsi-scstd.conf similar to the following  
+echo "Target $(sed -n 's/InitiatorName=//p' /etc/iscsi/initiatorname.iscsi):storage" >/etc/iscsi-scstd.conf  
+  
+Target iqn.2005-03.org.open-iscsi:76cf8781117f:storage•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.6.  
+</verbatim>  
  
 !!!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__