$Id$

MondoRescue supports OBDR mode.

You need to use the options -o and -t of mondoarchive to activate it.
You may also need an additional software (hpsa_obdr_mode) if using a tape drive attached to the Smart Array controller of a HP ProLiant servers, in order to put the tape drive in the right mode from the command line (also in case of problem after OBDR boot, when the drive doesn't come back alone into tape mode Cf: http://trac.mondorescue.org/ticket/358). That software is available from http://cciss.sf.net/ and http://trac.mondorescue.org/attachment/ticket/358/hpsa_obdr_mode.c + http://trac.mondorescue.org/attachment/ticket/358/Makefile
You may also need an additional software (sg_wr_mode) if using a tape drive attached to a SCSI controller of a server, in order to put the tape drive in the sequential mode after OBDR boot, when the drive doesn't come back alone into that mode. That software is available within the sg3_utils package. 

Here is an example script showing how to setup the tape based DR correctly completely from the CLI on SLES 10 on a ProLiant server using an internal SAS DAT 160 tape drive connected to the embedded Smart Array controller:

# Create some temp dirs for mondoarchive
mkdir -p /mondo/images /mondo/sratch /mondo/tmp
# Re-read the bus content
echo "engage scsi" > /proc/driver/cciss/cciss1
# Load the tape device driver
modprobe st
# Force the tape drive to be in tape mode
hpsa_obdr_mode -m tape /dev/cciss/c1d0
# Create the Disaster Recovery bootable tape
mondoarchive -G -N -O -E "/mondo" -t -o -d /dev/st0 -T /mondo/tmp -S /mondo/scratch
# Force the tape drive to be in CD mode (bootable mode aka OBDR)
hpsa_obdr_mode -m cd /dev/cciss/c1d0
#reboot

The machine is backed up and then rebooted in the OBDR mode ... without even using the button ;-)

Here is an example script showing how to setup correctly at restore time the tape completely from the CLI on SLES 11 on a ProLiant server using an external SAS Ultrium 4 tape drive connected to a SCSI controller:

# Determine which generic SCSI device needs to be used - It may appear as a CD if in OBDR mode (non sequential)
sg_map
[...]
/dev/sg1  /dev/scd1
[...]
# you may cross check with cat /proc/scsi/scsi
#
# Inquire in which mode the tape is (CD-rom drive == 0x05, tape drive == 0x01)
sg_inq -d /dev/sg1 
[...]
Device_type=5

# Reset the device in order to be in Sequential mode again
sg_reset -d /dev/sg1

# Remove all related drivers and reload them
rmmod st
rmmod mptsas
rmmod mptspi
modprobe mptspi
modprobe mptsas
modprobe st
