Jump to content

Recommended Posts

Posted

I'm in the process of looking at XenServer Free Edition, and wondered what the answers were in terms of backing up systems on it.

 

We currently use BackupExec in a D2D2T schema. The autoloader is directly connected to one of our servers - a server that would have XenServer Free on should we move with it. How do I utilise the autoloader when it is connected to a XenServer machine? Is it even possible?

Posted

It's not possible I'm afraid as there is no pass through of local storage devices.

 

I have a separate physical server connected to a tape library for backup of my XenServer setup. This does also have the benefit of being in a separate building which looks a bit better in your DR plan ;)

Posted
It's not possible I'm afraid as there is no pass through of local storage devices.

 

I have a separate physical server connected to a tape library for backup of my XenServer setup. This does also have the benefit of being in a separate building which looks a bit better in your DR plan ;)

 

Can't remember how the drive connects now - iSCSI, does that sound about right. It is an add-on card so I suppose I could remove it and install it in a lower specced server just for the backups - that might just work! :)

Posted
Sorry, just to add on - what about snapshot backups of each VM to a NAS - is this possible with XenServer. I currently do this with a script on ESXi.
Guest Guest
Posted (edited)

Here ya go. Just mount your nas as a dir on your pool master, and run the script. It even has a script to run on the nas which will delete old images. You need to read the info as its very important NOT to include the domU in the list of VMs to snapshot and backup!!!!

 

http://community.citrix.com/display/xs/0+downtime+snapshot+based+XENServer+5.5+backup+script.

 

 

I have 2 scripts running, one which runs every day except sunday, this is my daily, with a corasponding script on the nas to delete every 7 days. And then one which runs on a sunday for the weekly with a corasponding script on the nas to delete every couple of months.

Edited by Guest
Guest Guest
Posted
This link is 404?

 

 

Wes

 

vB in its infinate wisdom "corrected" the url for me :doh:

 

Fixed

  • 3 weeks later...
Posted (edited)

Yes, it is possible, I have done it on several machines.

 

Below are the instructions for a tape drive but the process is the same for an auto loader

 

see

http://www.meta.net.nz/~daniel/blog/2008/09/09/exporting-tape-autoloaders-via-iscsi/

for more details

 

compiled iscsitarget-0.4.14 for xenserver 5.5 is avaliable below

 

I extracted the iscsitarget-0.4.14 to /tmp

then followed these steps

 

#enable repositories

sed i.backup "s/^enabled=0$/enabled=1/" /etc/yum.repos.d/Centos-Base.repo

 

#add needed tools

yum install make gcc lsscsi

 

#move to correct folder

cd iscsitarget-0.4.14

 

#install module

make install

 

#set kerndir value

KERNDIR=/lib/modules/$(uname -r)/kernel/iscsi/

 

#make directory

mkdir -p $KERNDIR

 

#copy kernel module to location

cp ./kernel/iscsi_trgt.ko $KERNDIR

 

#load module

depmod -aq

 

#add rules to iptables to allow iscsi traffic/discovery

iptables -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
iptables -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 3260 -j ACCEPT
iptables -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

 

#restart service

service iptables restart

 

#to make sure set_ietd.sh is called at boot

#append these lines to rc.local

echo "#call set_ietd.sh" >> /etc/rc.local
echo "sh set_ietd.sh" >> /etc/rc.local

 

#write set_ietd.sh file to be called

#this writes the ietd.conf file needed to publish the tape drive

use nano to create /etc/set_ietd.sh with these lines of text

 

 

#!/bin/bash

#iscsi published name

iqn="iqn.2007-04.xenserver.edu-tech.co.uk:tape0"

#get HCIL values
scsiHCIL="`lsscsi | grep tape`"

H="`echo $scsiHCIL | cut -c 2`"
C="`echo $scsiHCIL | cut -c 4`"
I="`echo $scsiHCIL | cut -c 6`"
L="`echo $scsiHCIL | cut -c 8`"

#write targetfile
echo < /etc/ietd.conf
Target $iqn
Lun 0 H=$H,C=$C,I=$I,L=$L,Type=rawio
Type 1
InitialR2T No
ImmediateData Yes
xMaxRecvDataSegmentLength 262144

 

 

#restart iscsi

 

/etc/init.d/iscsi-target restart

 

#make set_ietd.sh executable

chmod +x /etc/set_ietd.sh

 

#call set_ietd.sh to create ietd.conf

sh /etc/set_ietd.sh

 

#start iscsi

/etc/init.d/iscsi-target start

 

#add to chkconfig

chkconfig --add iscsi-target

 

#start at boot

chkconfig iscsi-target on

 

This should get around the fact that the HCIL can change at every boot of the host machine

 

Hope this helps

 

Regards,

 

BoX

iscsitarget-0.4.14_xen_5.5.rar

Edited by box_l

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...