Recovering the BSDS
If IBM MQ is operating in dual BSDS mode and one BSDS becomes damaged, forcing IBM MQ into single BSDS mode, IBM MQ continues to operate without a problem (until the next restart).
To return the environment to dual BSDS mode:- Use Access Method Services to rename or delete the damaged BSDS and to define a new BSDS with the same name as the damaged BSDS. Example control statements can be found in job CSQ4BREC in thlqual.SCSQPROC.
- Issue the IBM MQ command RECOVER BSDS to make a copy of the valid BSDS in the newly allocated data set and to reinstate dual BSDS mode.
If IBM MQ is operating in single BSDS mode and the BSDS is damaged, or if IBM MQ is operating in dual BSDS mode and both BSDSs are damaged, the queue manager stops and does not restart until the BSDS data sets are repaired. In this case:
- Locate the BSDS associated with the most recent archive log data set. The data set name of the
most recent archive log appears on the job log in the last occurrence of message CSQJ003I, which
indicates that offload processing has been completed successfully. In preparation for the rest of
this procedure, it is a good practice to keep a log of all successful archives noted by that message:
- If archive logs are on DASD, the BSDS is allocated on any available DASD. The BSDS name is like
the corresponding archive log data set name; change only the first letter of the last qualifier,
from A to B, as in this example:
- Archive log name
- CSQ.ARCHLOG1. A 0000001
- BSDS copy name
- CSQ.ARCHLOG1. B 0000001
- If archive logs are on tape, the BSDS is the first data set of the first archive log volume. The BSDS is not repeated on later volumes.
- If archive logs are on DASD, the BSDS is allocated on any available DASD. The BSDS name is like
the corresponding archive log data set name; change only the first letter of the last qualifier,
from A to B, as in this example:
- If the most recent archive log data set has no copy of the BSDS (for example, because an error occurred when offloading it), locate an earlier copy of the BSDS from earlier offload processing.
- Rename damaged BSDSs using the Access Method Services ALTER command with the NEWNAME option. To delete a damaged BSDS, use the Access Method Services DELETE command. For each damaged BSDS, use Access Method Services to define a new BSDS as a replacement data set. Job CSQ4BREC in thlqual.SCSQPROC contains Access Method Services control statements to define a new BSDS.
- Use the Access Method Services REPRO command to copy the BSDS from the archive log to one of the
replacement BSDSs you defined in step 3.
Do not copy any data to the second replacement BSDS, you do that in step
5.
- Print the contents of the replacement BSDS.
Use the print log map utility (CSQJU004) to print the contents of the replacement BSDS. This enables you to review the contents of the replacement BSDS before continuing your recovery work.
- Update the archive log data set inventory in the replacement BSDS.
Examine the output from the print log map utility and check that the replacement BSDS does not contain a record of the archive log from which the BSDS was copied. If the replacement BSDS is an old copy, its inventory might not contain all archive log data sets that were created more recently. The BSDS inventory of the archive log data sets must be updated to reflect the current subsystem inventory.
Use the change log inventory utility (CSQJU003) NEWLOG statement to update the replacement BSDS, adding a record of the archive log from which the BSDS was copied. If the archive log data set is password-protected, use the PASSWORD option of the NEWLOG function. Also, if the archive log data set is cataloged, ensure that the CATALOG option of the NEWLOG function is properly set to CATALOG=YES. Use the NEWLOG statement to add any additional archive log data sets that were created later than the BSDS copy.
- Update passwords in the replacement BSDS.
The BSDS contains passwords for the archive log data sets and for the active log data sets. To ensure that the passwords in the replacement BSDS reflect the current passwords used by your installation, use the change log inventory ARCHIVE utility function with the PASSWORD option.
- Update the active log data set inventory in the replacement BSDS.
In unusual circumstances, your installation might have added, deleted, or renamed active log data sets since the BSDS was copied. In this case, the replacement BSDS does not reflect the actual number or names of the active log data sets your installation currently has in use.
For to delete an active log data set from the replacement BSDS log inventory, use the change log inventory utility DELETE function.
For to add an active log data set to the replacement BSDS log inventory, use the change log inventory utility NEWLOG function. Ensure that the RBA range is specified correctly on the NEWLOG function. If the active log data set is password-protected, use the PASSWORD option.
For to rename an active log data set in the replacement BSDS log inventory, use the change log inventory utility DELETE function, followed by the NEWLOG function. Ensure that the RBA range is specified correctly on the NEWLOG function. If the active log data set is password-protected, use the PASSWORD option.
- Update the active log RBA ranges in the replacement BSDS. Later, when the queue manager
restarts, it compares the RBAs of the active log data sets listed in the BSDS with the RBAs found in
the actual active log data sets. If the RBAs do not agree, the queue manager does not restart. The
problem is magnified when an old copy of the BSDS is used. To solve this problem, use the change log
inventory utility (CSQJU003) to adjust the RBAs found in the BSDS using the RBAs in the actual
active log data sets. You do this by:
- Use the print log records utility (CSQ1LOGP) to print a summary report of the active log data set. This shows the starting and ending RBAs.
- Comparing the actual RBA ranges with the RBA ranges you have just printed, when the RBAs of all
active log data sets are known.
If the RBA ranges are equal for all active log data sets, we can proceed to the next recovery step without any additional work.
If the RBA ranges are not equal, adjust the values in the BSDS to reflect the actual values. For each active log data set that needs to have the RBA range adjusted, use the change log inventory utility DELETE function to delete the active log data set from the inventory in the replacement BSDS. Then use the NEWLOG function to redefine the active log data set to the BSDS. If the active log data sets are password-protected, use the PASSWORD option of the NEWLOG function.
- If only two active log data sets are specified for each copy of the active log, IBM MQ can have difficulty during queue manager restart. The
problem can arise when one of the active log data sets is full and has not been offloaded, while the
second active log data set is close to filling. In this case, add a new active log data set for each
copy of the active log and define each new active log data set in the replacement BSDS log
inventory.
Use the Access Method Services DEFINE command to define a new active log data set for each copy of the active log and use the change log inventory utility NEWLOG function to define the new active log data sets in the replacement BSDS. You do not need to specify the RBA ranges on the NEWLOG statement. However, if the active log data sets are password-protected, use the PASSWORD option of the NEWLOG function. Example control statements to accomplish this task can be found in job CSQ4LREC in thlqual.SCSQPROC.
- Print the contents of the replacement BSDS.
- Copy the updated BSDS to the second new BSDS data set. The BSDSs are now
identical.
Use the print log map utility (CSQJU004) to print the contents of the second replacement BSDS at this point.
- See Active log problems for information about what to do if you have lost your current active log data set.
- Restart the queue manager using the newly constructed BSDS. IBM MQ determines the current RBA and what active logs need to be archived.
Parent topic: Manage the bootstrap data set (BSDS)