Q. I was working on an AIX host when I encountered weird errors when invoking commands involving the ODM (short for Object Data Manager). The errors I encountered are below.
root@host > bootlist -m normal -o - - root@host > bootlist -m normal hdisk0 hdisk2 0514-209 bootlist: Was not able to access the CuDv object class root@host > bootlist -m normal hdisk0 0514-209 bootlist: Was not able to access the CuDv object class root@host > odmget -q attribute=TCB_STATE PdAt 0518-506 odmget: Cannot open object class PdAt Check path name and permissions. root@host > rmlv dump02 0518-506 odmget: Cannot open object class PdAt Check path name and permissions. Warning, all data contained on logical volume dump02 will be destroyed. rmlv: Do you wish to continue? y(es) n(o)? y 0518-506 odmget: Cannot open object class SWservAt Check path name and permissions.
A. To get a background of what ODM is, AIX stores most of the system management information in /etc/objrepos, /usr/lib/objrepos, and /usr/share/lib/objrepos. Files (also referred to as system object classes) in these directories are adminstered by the Object Database Manager which is a set of library routines and programs providing basic object oriented database facilities.
Any changes you make to the configuration reflects or directly changes files on the ODM. Under most circumstances, only SMIT or the commands SMIT call should be used to change the contents of the system object classes. A harmless way to look at the object database is to use odmget <Class> where <Class> is one of the files in /etc/objrepos.
So after taking a look at the environment and checking that the environment ODMDIR correctly points to /etc/objrepos, we got to a dead-end.
root@host > echo $ODMDIR ODMDIR=/etc/objrepos
To the rescue is a colleague who is very well versed with AIX. In fact, I consider him a guru in AIX. His suggestion was to try excuting the above commands under the /etc/objrepos directory and see if the errors would go away. And we hit paydirt!
root@host > cd /etc/objrepos root@host > bootlist -m normal -p o hdisk0 blv=hd5 hdisk2 blv=hd5 root@host > bootlist -m normal hdisk0 root@host > savebase root@host > bootlist -m normal -o hdisk0 blv=hd5
The above is a simple workaround to what may seem to be a big problem. Change directory first to /etc/objrepos then execute the commands.
If you have a permanent solution to the problem, share it with us.