IBM Support

AIX Open Source: rpm errors: Found bdb_ro Packages database

Question & Answer


Question

Why does the rpm command fail after I migrated to AIX 7.3 TL2?
 # rpm -qa
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.

Cause

The rpm installer is an open source tool. IBM only packages it for AIX. The conversions from Berkely database to sqlite were forced by the RPM community.

Some packages that were old, or from other builds, have had issues in conversion. AIX cannot control this. The conversions sometimes fail because of how the packages were built. Sometimes, the old packages have to get rebuilt first so the format can get converted to 4.18 sqlite. The "Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend" errors have been common across platforms. Sometimes the failure is due to a particular service that needed to be restarted, or a library that was replaced, or just general compatibility issues due to older packages.

NOTE: It is important to update packages prior to the update due to the significant changes in rpm.rte.

See the December 6, and November 23 2023 sections in What's New page:
  •  https://www.ibm.com/support/pages/node/6833478
    • When DNF users migrate from 32 bit AIX 7.1 or 7.2 to 64 bit AIX 7.3 then the existing installed DNF won’t work as-is. Some additional steps are required.
    • IMPORTANT: Update dnf before you update AIX. If you have not updated to python3.9 yet, dnf with python3.7 will fail to run with rpm.rte 4.18.See the May 24 entry in this table.

Answer

The following steps were shared by the Toolbox developers in some discussions.

If these steps do not work, you will need to raise a thread on the AIX Open Source Forum to troubleshoot. 

1) First, check the following:

# strings /opt/freeware/lib/oldrpm4db/rpmdb/Name

Do you see the packages you had on the previous level? If so, we will use that directory as last known good database if necessary.

2) Backup existing directories

mkdir /tmp/pre418_backup /tmp/post418_backup 
cp /opt/freeware/lib/oldrpm4db/rpmdb/* /tmp/pre418_backup 
cp /opt/freeware/packages/*  /tmp/post418_backup

3) Rebuild the old database:

LIBPATH=/usr/opt/rpm/old_rpmdb/lib:/usr/opt/rpm/lib:/usr/lib
/usr/opt/rpm/old_rpmdb/bin/rpmdb --rebuilddb --rcfile=/usr/opt/rpm/old_rpmdb/rpmrc

4) Check the database:

# rpm -qa

If the command is successful, then proceed to #5.

5) Rebuild to convert to sqlite:

# unset LIBPATH
# /usr/bin/rpmdb --rebuilddb

6) Check the database again:

# rpm -qa

TIP: You can create a custom NIM script resource and run this against the clients after they are rebooted.

Note: Replace /export/nim/ with your NIM export path.

# cat /export/nim/custom/rpm_rbdb.sh

#!/bin/sh

LIBPATH=/usr/opt/rpm/old_rpmdb/lib:/usr/opt/rpm/lib:/usr/lib

/usr/opt/rpm/old_rpmdb/bin/rpmdb --rebuilddb --rcfile=/usr/opt/rpm/old_rpmdb/rpmrc >> /var/adm/ras/rpm.firstboot.log 2>&1

unset LIBPATH

/opt/freeware/bin/rpmdb --rebuilddb >> /var/adm/ras/rpm.firstboot.log 2>&1

Define the script:

# nim -o define -t script -a server=master -a location=/export/nim/custom/rpm_rbdb.sh rpm_rbdb

Then, after the reboot of the client:

# nim -o cust -a script=rpm_rbdb <client>


 
SUPPORT

A) For all questions or issues with Toolbox packages, the support is handled by the AIX Open Source Team in the forum: https://community.ibm.com/community/user/power/communities/community-home?CommunityKey=10c1d831-47ee-4d92-a138-b03f7896f7c9

The AIX Open Source Team provides support through the forum, only. They answer questions, if possible, but they don't own the packages, or formally support them. For true expertise in usage of each package, users should consult the community for each respective package. 

** Cases opened to address Toolbox problems will be canceled and users will be referred to the Open Source Forum.
If you experience technical issues accessing the AIX Open Source community or forum, refer to the footer of the IBM Community forum page.
There is email, and "Contact Us" information for community support

B) If there is a problem with installing rpm.rte, or executing the rpm binary file, open an AIX Case (See the following C section) for assistance.

Examples of rpm.rte issues supported through AIX Support:
- Errors updating or migrating the rpm.rte file set
- Commands from the rpm.rte file set dump core, or have runtime errors.

Example of an rpm.rte rpm loading issue:

# rpm -qa
    exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors:
    0509-150 Dependent module libnss3.so could not be loaded.
    0509-022 Cannot load module libnss3.so.
    0509-026 System error: A file or directory in the path name does not exist.

 
This example would be handled through an IBM AIX Support case, and the support team would help resolve the missing modules.
To learn what is provided and supported by the rpm.rte file set:

# lslpp -f rpm.rte

C) Opening an AIX Support Case

If additional assistance is required due to issues with rpm.rte file set (see preceding B section), use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1.  Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2.  Capture any logs or data relevant to the situation.

3.  Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cw3dAAA","label":"AIX Open Source"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
11 April 2024

UID

ibm17113626