728x90

iiug.org에서 onbar에서 사용되는 XBSA API에 대한 설명을 발췌하였습니다. 

onbar 명령으로 백업을 수행하면 onbar 프로세스는 백업 솔루션의 프로세스와 통신하게 되는데, 그 과정에서 아래의 API들을 사용하게 됩니다.

onbar로 백업을 하고 계신 곳에서는 백업 로그에서 아래의 일부 API 이름을 보셨을 겁니다.


Onbar can communicate with multiple storage managers. The reason we can pull this off is because recently a standard api has been developed so that different vendors can communicate with each other. This standard/language is know as XBSA. Below are the XBSA calls that onbar uses in order to backup and restore dbspaces to/from the online engine. The functions below are the complete set of XBSA call. It is mearly the calls that onbar uses.


  • BSABeginTxn()- starts an XBSA API transaction.
  • BSACreateObject()- Creates an XBSA object. This basically tells that storage manager to make room for a new backup. The storage manager passes back the copyid (inside the objectdescriptor) that is the unique identifier that onbar uses when it need to get that back/object.
  • BSAEndData()-Tells the storage manager that there is no more data to send. (we are finished sending data associated with that particular object)
  • BSAEndTxn()- Tell the storage manager that we are finished with a backup transaction.
  • BSAGetData()- This function returns a single buffer of data from that storage manager. We pass it the copyid (in the object descriptor) and the storage manager is responsible for finding the requested data.
  • BSAGetObject()- Called to gather information about a particular storage manager object (ie, date created , size, owner etc).
  • BSAInit()- connects to the storage manager and starts a session. This function will return a 'handle' that is a unique identifier associated to that session.
  • BSAQueryApiVersion()- Called to validate which version of the XBSA libraries onbar is talking to.
  • BSASendData()- Sends a buffer full of data to the storage manager.
  • BSATerminate()- Terminates a session with the storage manager. It also frees up and resources that were allocated in the BSAinit call.


Below is a simplistic diagram on how an XBSA application goes. onbar (which is an XBSA applicalion in it self) follows this flow chart as well when creating/restoring archives. onbar will loop calling BSASendData (and BSAGetDATA) until the is no more data to process.




출처 : http://www.iiug.org/onbar/xbsa.html

728x90
728x90

onbar physical restore (onbar -r -p) 또는 onbar logical restore중 out of virtual shared memory 오류가 발생하는 경우가 있습니다.

여러 원인이 있겠습니다만 저의 경우는 Virtual segment 크기를 큰 값으로 재설정한 후 재시작했었습니다.

그러나 다시 생각해보면 oninit 프로세스를 재시작(oninit -r)해서 된것이지 Virtual segment 크기가 때문이 아닐 수도 있겠네요.


SunOS 5.10, 인포믹스 11.50, Netvault 백업 솔루션 환경이었고

커널파라미터까지는 확인하지 못했는데, 커널 파라미터 값이 문제가 될가능성이 높습니다.


ENOSPC error while allocating shared memory

http://www-01.ibm.com/support/docview.wss?uid=swg21614434


Running oninit but error shmget: [EEXIST][17]: key 52604801: shared memory already exists

http://www-01.ibm.com/support/docview.wss?uid=swg21430996

728x90
728x90

Problem(Abstract)

You observe messages in your online.log file referencing alarmprogram.sh and with return code 126 or 127. What do they mean?

Symptom

Messages printed to your Informix Server online.log file reference alarmprogram.sh and a return code of 126 or 127. Examples:

06:45:09 Process exited with return code 126: /bin/sh /bin/sh -c /IDS/1170uc7/etc/alarmprogram.sh 2 23 "Logical Log 12 Complete, timestamp: 0xd3d56." "Logical Log 12 Complete, timestamp: 0xd3d56." "" 23001

20:01:55 Process exited with return code 127: /bin/sh /bin/sh -c /usr/informix/etc/alarmprogram.sh 2 18 "Log Backup completed: 9." "Logical Log 9 - Backup Completed" "" 18001

Cause

The return codes are bourne and korn shell return codes. Their meanings:

  • 126....not an executable 
  • 127....command not found

The Informix Server attempts to execute the script pointed to by the ALARMPROGRAM configuration program, using the korn shell, when events occur that are important to the server. If the call fails the server writes a message to the server log file describing the call. The events themselves may be failures or successes. Return code 126 is printed when the server cannot execute the script referenced by ALARMPROGRAM. Return code 127 is printed when the server cannot find the script.


Resolving the problem

Confirm that the alarm script designated by ALARMPROGRAM is correctly referenced by the configured path and confirm that it is executable. By default, alarmprogram.sh uses the korn shell (ksh). If the return code is 126, confirm that the korn shell is installed and located in /bin (/bin/ksh).


Note: If the korn shell is not installed, and the default shell is bash, you may want to change "#! /bin/ksh" at the top of alarmprogram.sh to "#! /bin/bash" as an alternative to installing the korn shell.


http://www-01.ibm.com/support/docview.wss?uid=swg21635728


728x90
728x90

Restriction: ON-Bar does not use the TAPEDEV, TAPEBLK, TAPESIZE, LTAPEBLK, and LTAPESIZE configuration parameters.

ON-Bar on IBM® Informix® uses the following configuration parameters:
Configuration parameterPurpose
ALARMPROGRAM parameterSpecifies a script that handles alarms For ON-Bar, set this script to log_full.sh to automatically back up log files when they become full.
ALRM_ALL_EVENTS parameterCauses ALARMPROGRAM to execute every time an alarm event is invoked.
BACKUP_FILTER parameterSpecifies the location and name of an external filter program used in data transformation.
BAR_ACT_LOG parameterSpecifies the location and name for the ON-Bar activity log file.
BAR_BSALIB_PATH parameterSpecifies the full path and name of the XBSA shared library provided by the storage manager to communicate between ON-Bar and the storage manager.
BAR_DEBUG parameterSpecifies the level of debugging information to display in the ON-Bar activity log file.

You can dynamically update the value of BAR_DEBUG in the onconfig file during a session.

BAR_DEBUG_LOG parameterSpecifies the location and name of the ON-Bar debug log
BAR_IXBAR_PATH parameterSpecifies the location where the ON-Bar ixbar boot file is created. You can change the file name and path
BAR_HISTORY parameterSpecifies whether the sysutils database maintains the backup history
BAR_MAX_BACKUP parameterSpecifies the maximum number of processes per onbar command
BAR_NB_XPORT_COUNT parameterSpecifies the number of shared-memory data buffers for each onbar_d worker or child process
BAR_PERFORMANCE parameterSpecifies whether timestamps and transfer rates of storage-manager operations are recorded in the activity log.
BAR_PROGRESS_FREQ parameterSpecifies in minutes how frequently the backup or restore progress messages display in the activity log
BAR_RETRY parameterSpecifies how many times ON-Bar retries a backup, logical-log backup, or restore operation if the first attempt fails
BAR_XFER_BUF_SIZE parameterSpecifies the size in pages of the buffers that the database server uses to exchange data with each onbar_d worker or child process
ISM_DATA_POOL parameterSpecifies the volume pool that you use for backing up storage spaces (ISM)
ISM_LOG_POOL parameterSpecifies the volume pool that you use for backing up logical logs (ISM)
LTAPEDEV parameterFor ontape, specifies the tape device where logical logs are backed up

For ON-Bar, specifies whether to back up logs.

If this configuration parameter is set to /dev/null on UNIX or NUL on Windows, the backup utility is not able to back up the logical logs.

RESTARTABLE_RESTORE parameterTurns restartable restore on or off
RESTORE_FILTER parameterSpecifies the location and name of an external filter program that restores transformed data to its original state


728x90

'Informix > informix reference' 카테고리의 다른 글

IDS Interoperability with Other Products  (0) 2011.11.03
Setting up HDR with ontape  (0) 2011.10.26
Uninstalling ISM  (0) 2011.10.24
Setting Up ISM on UNIX  (0) 2011.10.24
Determine the server-processing locale  (0) 2011.10.18
728x90

To start ISM on UNIX for the first time, issue the ism_startup -init command. The following shell script is an example of a simple setup for making on–Bar storage-space and logical-log backups to disk files:


#!/usr/bin/ksh

# setup for ISM storage manager

INFORMIXDIR=/data/informix

export INFORMIXDIR


echo "ISM setup begins"


# the user must edit these two lines to select

# appropriate disk locations for storage manager use.

SM_DISKDEV1=/backups/dbspaces

SM_DISKDEV2=/backups/logfiles

export SM_DISKDEV1

export SM_DISKDEV2


# start ISM server

echo "initalize ISM server, must be done as root"

$INFORMIXDIR/bin/ism_startup -init


$INFORMIXDIR/bin/ism_add -admin informix@server (server=hostname)


Important: To make informix the ISM user and thereby ensure informix has access to conduct ISM operations during daily routines, you must run the following command after any ism_startup -init or ISM installation:


# create some devices and media

# the ISM user, defined in ism_add -admin, can do these tasks

echo "create and mount ISM devices and pools"

ism_add -device $SM_DISKDEV1 -type file

ism_add -device $SM_DISKDEV2 -type file

ism_op -label $SM_DISKDEV1 -pool ISMDiskData -volume ISMData

ism_op -label $SM_DISKDEV2 -pool ISMDiskLogs -volume ISMLogs

ism_op -mount $SM_DISKDEV1

ism_op -mount $SM_DISKDEV2

echo "end of ISM setup"



Set ISM environment variables and onCONFIG parameters

If you use ISM, you can specify the volume pool names for storage spaces and logical logs in the ISM_DATA_POOL and ISM_LOG_POOL parameters in the onconfig file. The ISM_DATA_POOL configuration parameter specifies the volumepool that you use for backing up storage spaces. The ISM_LOG_POOL configuration parameter specifies the volume pool that you use for backing up
logical logs.

e.g.
ISM_DATA_POOL ISMDiskData
ISM_LOG_POOL ISMDiskLogs

If you do not set these configuration parameters, they default to the volume pool names ISMData and then ISMLogs.


LTAPEDEV parameter
If you specify a tape device in the LTAPEDEV configuration parameter, ON-Bar ignores the value. on-Bar also ignores the value of the LTAPEBLK, LTAPESIZE, TAPEDEV, TAPEBLK, and TAPESIZE parameters. Consider leaving these parameter values blank when you use on-Bar because the storage manager sets these values.

Important: Set LTAPEDEV to /dev/null or leave it blank on UNIX or NUL on Windows only if you do not want to back up the logical logs. The on-Bar activity log shows a warning and return code 152. Because the database server marks the logical logs as backed up when they are no longer current, on-Bar cannot find logical logs to back up. All transactions in those logs are lost, and you are not able to restore them.

728x90

+ Recent posts