on 09-15-2012 12:27 PM
Hi Experts,
We need your suggestion on oracle database backup parallel using brbackup, our SAP system run on:
OS: UNIX - SUN Solaris SPARC 10
SAP: ECC 6.0 SR3
Database: Oracle 10.2.0.4
Our production database are growing rapidly, estimate growing is 3GB/days. Right now we backup our Production using one tape that estimated time to online backup is 12-13 hours.
In there future, if we stayed this configuration. It will take long time to backup and restore it's not applicable. That's why we are planning to add more tapes during backup (2 tape parallel).
Here is configuration on init<SID>.sap
backup_dev_type = tape_box
compress = hardware
mount_cmd = "mount_tape.csh $ $ $"
dismount_cmd = "dismount_tape.csh $ $"
tape_size = 1500G
tape_address = /dev/rmt/0mn, /dev/rmt/2mn
tape_address_rew = /dev/rmt/0m, /dev/rmt/2m
tape_address_ctl = /dev/scsi/changer/c3t500104F000C8726Fd0
volume_archive = (ABCZ01, ABCZ02)
volume_backup = (ABCZ01, ABCZ02)
script of mount_tape.csh:
#!/bin/csh -f
set slot=`echo $3 | cut -b 5-6`
/usr/local/sbin/mtx -f $2 load $slot 0
echo $slot > $SAPDATA_HOME/sapbackup/.slot
script of dismount_tape.csh
#!/bin/csh -f
set slot=`cat $SAPDATA_HOME/sapbackup/.slot`
/usr/local/sbin/mtx -f $2 unload $slot 0
My Question are:
1. If my configuration init<SID>.sap still missing something? Because when i try running whole online backup (DB13), the backup cannot running, still error and the detail error cannot show.
2. How to mounting multiple tape using mtx command?
Please guide me to solve this problem.
Thanks
Edy
Hi again,
you should enhance your mount Script to plot the parameters to a debugfile, like
echo one: "$1" >/tmp/mnt_debug.txt
echo two: "$2" >>/tmp/mnt_debug.txt
echo three: "$3" >>/tmp/mnt_debug.txt
echo four: "$4" >>/tmp/mnt_debug.txt
I did some google and this:
and this:
http://help.sap.com/saphelp_nw70/helpdata/en/6f/380001410d9840991207706ef7be35/frameset.htm
suggest the in case of multiple tape devices, you only have a single changer device and the mountscript is only called ONCE, but the tapevolume parameter given would be a commaseperated list. If your tapedrive are in a single library, I think you only have a single entry for the changer device.
● <B> identifies the tape devices, on which the mount or dismount operations are to be performed, using the control driver addresses:
● <C> defines the tape names to be mounted on the tape devices given in <B>:
But with your mount script, you only deal with the first slotnumber on position 5-6, you simply ignore the second tapevolume passed to your mountscript
#!/bin/csh -f
set slot=`echo $3 | cut -b 5-6`
/usr/local/sbin/mtx -f $2 load $slot 0
echo $slot > $SAPDATA_HOME/sapbackup/.slot
After you crosschecked in the debug output given above, that the parameters passed are SIDBxx,SIDByy you might need to adjust the mount script to
#!/bin/csh -f
set slot=`echo $3 | cut -b 5-6`
/usr/local/sbin/mtx -f $2 load $slot 0
echo $slot > $SAPDATA_HOME/sapbackup/.slot_0
set slot=`echo $3 | cut -b 12-13`
/usr/local/sbin/mtx -f $2 load $slot 1
echo $slot > $SAPDATA_HOME/sapbackup/.slot_1
With 0 and 1 in the mtx command being the drives where the tapes should be mounted.
For dismount you might need to adjust as well
set slot=`cat $SAPDATA_HOME/sapbackup/.slot_0`
/usr/local/sbin/mtx -f $2 unload $slot 0
set slot=`cat $SAPDATA_HOME/sapbackup/.slot_1`
/usr/local/sbin/mtx -f $2 unload $slot 1
And for sure you should test carefully, that brrestore is able to mount the tapes for verification in addition.
Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again Volker,
I have tested your script above and inserted parameter debug.
Here is the result:
one: SID-B
two: /dev/scsi/changer/c6t500104F000C8726Ed0
three: ABCZ01
Here is the output command:
BR0388I Mounting volume ABCZ01 in device /dev/scsi/changer/c6t500104F000C8726Ed0 ...
BR0278E Command output of 'mount_tape.csh
SID- /dev/scsi/changer/c6t500104F000C8726Ed0 ABCZ01':
Loading media from Storage Element 1 into drive 0...done
Drive 0 Full (Storage Element 1 loaded)
BR0280I BRBACKUP time stamp: 2012-09-25 10.56.18
BR0279E Return code from 'mount_tape.csh SID-B /dev/scsi/changer/c6t500104F000C8726Ed0 ABCZ01': 0
BR0390I Mounting volume ABCZ01 in device /dev/scsi/changer/c6t500104F000C8726Ed0 failed
I think the script just work on this line:
#!/bin/csh -f
set slot=`echo $3 | cut -b 5-6`
/usr/local/sbin/mtx -f $2 load $slot 0
echo $slot > $SAPDATA_HOME/sapbackup/.slot_0
Could you give me suggestion how to fix mtx script for multiple mounting?
Hi,
well, it looks like brbackup is not passing the second volume to the mount script.
The parameters passed do not fit the documentation.
Did you adjust the tape-devices parameters to be in brackets, like
tape_address = ( /dev/rmt/0mn, /dev/rmt/2mn )
tape_address_rew = ( /dev/rmt/0m, /dev/rmt/2m )
Looks like brbackup is still assuming a single device,
thus passing only a single volume to the mount script.
I would work stepwise.
change the device_type to "tape" and run "brbackup -q"
This must report to utilize two tape drives with the given device names and report two volumes to be used.
... once you are that far, change back to tape_box, and crosscheck the parameters passed to the mount script again. You must get passed the two tape volume-names to be mounted.
The script has to work on these and provide a proper mount result.
What I do not understand as well, is that your script obviously returns a rc zero, but reports the mount as "failed". Very funny.
Are you on a recent brtools patchlevel?
Should be around 7.20 PL 2x
Volker
Try to run it from the commandline first.
At least you will get errormessages that might indicate where the problem is.
Switch back to DB13 later.
How big is the DB? 13 hours is pretty long. Do you already use "dd" or still cpio?
You need more tapes 🙂
As you seem to use autoloaders, do you have tape_device configured as tape_box?
Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Volker,
Thanks for your response.
Could you give me command to running parallel backup via OS level, please?
The DB size is 2.2TB. Yes, i want to use 2 tapes (1500G x 2) backup parallel.
For tape copy command i used dd.
here is the configuration init<SID>.sap:
tape_copy_cmd = dd
cpio_flags = -ovB
I used autoloader Storagetek SL500 and backup device type is tape_box.
Please give me your guidance.
Any errormessages to work with ?
Checkout the sapbackup directory.
There has to be a log allthough it might not be browsable from DB13.
Check DB14
If this does not help, go to the OS level to browse.
Try to backup manually and see, if this gives any visible messages
brbackup -c -u / -m all -t online
Volker
Hi Volker,
Thanks for your response,
I have tried to insert command brbackup -c -u / -m all -t online
But i get error:
bash-3.00$ brbackup -c -u / -m all -t online
BR0051I BRBACKUP 7.00 (52)
BR0179E Number of backup devices defined in parameters 'tape_address*'
is not the same
BR0182E Checking parameter/option 'tape_address_ctl' failed
BR0189W Expiration period equal 0 - backup volumes could be immediately
overwritten
What is command to check tape address and tape address ctl ?
Thanks
Edy
Hi Volker,
Thank you for your response.
I can execute command brbackup -i show -v AOPB01 and mounted successfully.
But when i try execute command brbackup -i show -n 2 -v ABCZ01,ABCZ02
i get error:
BR0051I BRBACKUP 7.20 (27)
BR0179E Number of backup devices defined in parameters 'tape_address*'
is not the same
BR0182E Checking parameter/option 'tape_address_ctl' failed
Paramater init.sap:
tape_address= /dev/rmt/0mn, /dev/rmt/2mn
tape_address_rew= /dev/rmt/0m, /dev/rmt/2m
tape_address_ctl= /dev/scsi/changer/c6t500104F000C8726Ed0
If there is something wrong with paramater init.sap?
Please guide me eith your thought/experience.
Thanks in advance
Edy
Hi Edi,
The number of control driver addresses in tape_address_ctl must agree with the number of device addresses in tape address.
Please see the following link http://help.sap.com/saphelp_nw73/helpdata/en/47/0d936cbbb76af2e10000000a1553f6/content.htm. May be this help you to resolve issue
Regards
Roman
I think Roman ment,
that you need to specify two changer devices.
brbackup has the first changer device for the first tape, but does not know about
the changer for the second one.
At least it could be possible that you have the tapes in two different librarys.
If you have two tapes in one lib, you only have one changer, but your have to tell brbackup,
which one it has to use for the second tape drive.
So I think you should specify the same changer device two times, if the drives are in the same lib.
The mount script needs to take care which slot to mount to which device.
I never configured such a setup, only multiple native drives, but no changers, so I do not know for sure, but I think Romans tip should do the trick.
Volker
I have inserted 2 tape_address_ctl.
tape_address_ctl= (/dev/scsi/changer/c6t500104F000C8726Ed0, /dev/scsi/changer/c6t500104F000C8726Ed0)
One of tape was successfully mounted.
But the last one still cannot mounting.
here is my command: brbackup -i show -n 2 -v ABCZ01,ABCZ02
Here is configuration mount_tape.csh:
#!/bin/csh -f
set slot=`echo $3 | cut -b 5-6`
/usr/local/sbin/mtx -f $2 load $slot
echo $slot > $SAPDATA_HOME/sapbackup/.slot
If there is something worng?
Thanks
Edy
How many tape drives you have in your tape hardware? Why you set backup_dev_type = tape_box? How many and what tape devices you have at OS level? I think you need to read hardware vendor documentation first to understand what tape devices created at OS. What tape device you have installed?
Regards
Roman
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.