Changeset 3119 in MondoRescue for branches/3.0
- Timestamp:
- May 10, 2013, 8:54:24 PM (11 years ago)
- Location:
- branches/3.0/mindi
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/README.bootparam
r3051 r3119 60 60 Call mondorestore with -o and the tape device 61 61 62 obdrmods="mod1 mod2" 63 Remove these modules in order to be able to reset the tape dvice using it and place it in sequential mode. A default list of modules is aloready embedded so this should only be used if the list is unsufficient. Please report that usage to dev team. 64 62 65 pre=/path/to/script 63 66 Execute a pre-configuration script before calling mondorestore. Could be an NFS shared script e.g., or a script located in the initrd. Eg: pre=/tmp/isodir/my-pre.sh. Note that the script should be executable. -
branches/3.0/mindi/README.obdr
r2997 r3119 4 4 5 5 You need to use the options -o and -t of mondoarchive to activate it. 6 You may also need an additional software (hpsa_obdr_mode) if using HP ProLiant servers, in order to put th 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)7 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 6 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 7 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. 8 8 9 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 :9 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: 10 10 11 11 # Create some temp dirs for mondoarchive … … 23 23 #reboot 24 24 25 The machine is backed up and then rebooted in the OBDR mode ... without using the button ;-) 25 The machine is backed up and then rebooted in the OBDR mode ... without even using the button ;-) 26 27 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: 28 29 # Determine which generic SCSI device needs to be used - It may appear as a CD if in OBDR mode (non sequential) 30 sg_map 31 [...] 32 /dev/sg1 /dev/scd1 33 [...] 34 # you may cross check with cat /proc/scsi/scsi 35 # 36 # Inquire in which mode the tape is (CD-rom drive == 0x05, tape drive == 0x01) 37 sg_inq -d /dev/sg1 38 [...] 39 Device_type=5 40 41 # Reset the device in order to be in Sequential mode again 42 sg_reset -d /dev/sg1 43 44 # Remove all related drivers and reload them 45 rmmod st 46 rmmod mptsas 47 rmmod mptspi 48 modprobe mptspi 49 modprobe mptsas 50 modprobe st -
branches/3.0/mindi/deplist.d/minimal.conf
r3083 r3119 22 22 /sbin/pidof 23 23 /etc/init.d/functions 24 /usr/bin/rev 24 25 # On ArchLinux 25 26 /bin/pidof -
branches/3.0/mindi/rootfs/etc/init.d/rcS
r3090 r3119 142 142 [ ! "$tapedev" ] && tapedev=`grep media-dev /tmp/mondo-restore.cfg 2>/dev/null | tr -s ' ' ' ' | cut -d' ' -f2` 143 143 mt -f $tapedev rewind 144 if [ $? -ne 0 ]; then 145 LogIt "WARNING: $tapedev failed to rewind, either not a tape or still in OBDR mode." 1 146 LogIt " Trying to find the corresponding SCSI generic device." 1 147 c=0 148 for d in `ls /sys/class/scsi_device/*`; do 149 devtype=`cat $d/device/type` 150 if [ _"$devtype" -eq _"1" ]; then 151 LogIt "NOTE: Device /dev/sg$c is a Sequential device." 1 152 if [ -x /usr/bin/sg_map ]; then 153 dev=`/usr/bin/sg_map | grep -E "^/dev/sg$c" | awk '{print $2}'` 154 LogIt " Retry using device $dev" 1 155 fi 156 elif [ _"$devtype" -eq _"0" ]; then 157 # Skipping a HDD 158 elif [ _"$devtype" -eq _"5" ]; then 159 # Checking whether it's a CD or a tape in OBDR mode 160 grep -q -i -E 'dat|ultrium|tape' $d/device/model 161 if [ $? -eq 0 ]; then 162 # Is probably a Tape drive left in OBDR. 163 LogIt "Found that /dev/sg$c is a tape drive (`cat $d/device/model`)." 1 164 grep -q -i -w 'hp' $d/device/vendor 165 if [ $? -eq 0 ]; then 166 LogIt "This is an HP tape drive, even better :-)." 1 167 fi 168 if [ -x /usr/bin/sg_reset ]; then 169 OBDR_MODS="st mptsas mptspi aic7xxx aic94xx mpt2sas " 170 if [ "`grep -i obdrmods /proc/cmdline`" ]; then 171 OBDR_MODS="$OBDR_MODS `cat /proc/cmdline | sed 's~.*obdrmods=\"\(.*\)\".*~\1~'`" 172 fi 173 LogIt "Removing modules $OBDR_MODS." 1 174 for m in $OBDR_MODS; do 175 rmmod $i 176 done 177 LogIt "Trying to force device /dev/sg$c to be in sequential mode." 1 178 /usr/bin/sg_reset -d /dev/sg$c 179 LogIt "Inserting modules `rev $OBDR_MODS`." 1 180 for m in `rev $OBDR_MODS`; do 181 modprobe $i 182 done 183 LogIt "Retry again as the device has been set back into sequential mode." 1 184 mt -f $tapedev fsf 2 185 res=$? 186 # exit the loop to continue and return if that previous mt failed. 187 # If it succeeded we transparently continue !! 188 break 189 else 190 LogIt "WARNING: Unable to reset /dev/sg$c as the sg_reset command is not availble." 1 191 fi 192 fi 193 else 194 LogIt "Device /dev/sg$c has an unknown type $devtype." 1 195 fi 196 c=`expr $c + 1` 197 done 198 199 if [ $res -ne 0 ]; then 200 cd $old_pwd 201 return $res 202 fi 203 fi 204 144 205 mt -f $tapedev fsf 2 145 206 # 32k is DEFAULT_INTERNAL_TAPE_BLOCK_SIZE … … 667 728 } 668 729 669 670 730 EnableCcissIfAppropriate() { 671 731 local f
Note:
See TracChangeset
for help on using the changeset viewer.