User Tools

Site Tools


aix:odm

ODM

Be carefull: don't modify ODM if can update it by command line. If you should change something, you should better use odmdelete and odmadd, instead of odmchange.

You can see the content of ODM files, with odmget command: You need to set the ODMDIR path if the file is not located into /etc/objrepos (default location)

For example

  • SMIT menu are located in the folowing files : sm_cmd_hdr, sm_cmd_opt,sm_name_hdr, sm_menu_opt in the directory: /usr/lib/objrepos/
     
# ODMDIR=/usr/lib/objrepos 
# odmget sm_cmd_hdr | grep -p evaluate
sm_cmd_hdr:
        id = "cl_mirrorvgd"
        option_id = "cl__cmdlvmmirrorvgd"
        has_name_select = "y"
        name = "Mirror a Volume Group"
        name_msg_file = "cspoc.cat"
        name_msg_set = 102
        name_msg_id = 267
        cmd_to_exec = "main()\n\
            {\n\
               export _CSPOC_MODE=evaluate\n\
               export _CSPOC_CALLED_FROM_SMIT=true\n\
               /usr/es/sbin/cluster/sbin/cl_mirrorvg -cspoc $*\n\
            }\n\
            main"
        ask = ""

Or with a criteria:

     
# ODMDIR=/usr/lib/objrepos 
# odmget -q has_name_select="y" sm_cmd_hdr
sm_cmd_hdr:
        id = "cl_mirrorvgd"
        option_id = "cl__cmdlvmmirrorvgd"
        has_name_select = "y"
        name = "Mirror a Volume Group"
        name_msg_file = "cspoc.cat"
        name_msg_set = 102
        name_msg_id = 267
        cmd_to_exec = "main()\n\
            {\n\
               export _CSPOC_MODE=evaluate\n\
               export _CSPOC_CALLED_FROM_SMIT=true\n\
               /usr/es/sbin/cluster/sbin/cl_mirrorvg -cspoc $*\n\
            }\n\
            main"
        ask = ""

Source: Add a SMIT Menu http://www.ibm.com/developerworks/aix/library/au-extendsmit/

ODM object classes are held in 3 repositories:

  1. /etc/objrepos
  2. /usr/lib/objrepos
  3. /usr/share/lib/objrepos

/etc/objrepos:

Contains: the customized devices object class and the / (root) part of the Software Vital Product Database (SWVPD). This contains files that must be installed during the software instalation.

CuDv --

The Customized Device object class file contains entries for all device instances defined in the system. (A defined device has been created by the define method.) A defined device object may or may not have a corresponding actual device attached to the system. CuDv objec class contains objects that provide device and connection information for each device.

CuAt --

The Customized Attribute object class contains customized device-specific attribute information. Devices represented in CuDv have attibutes found in the PdAt and CuAt. In the CuAt there is an entry for attributes that take customized values. Attributes taking the default value are found in the PdAt object class.

CuDep --

The Customized Dependency object class file contains logical dependencies between devices. The file does not contain customized dependencies between two physical devices. If present, these would be in the CuDv file

CuDvDr --

It is used to store the major and minor numbers of the devices. Some programs use the special files to access a certain device.

/usr/lib/objrepos:

Contains: the predefined devices object class, SMIT menu objectclasses and the /usr part of the SWVPD.

PdDv --

The Predefined Devices object class file contains entries for all devices supported by system. A device that is not part of this could not be configured on AIX.

PdAt --

The Predefined Attribute object class file contains an entry for each existing attribute for each device represented in the PdDv object class. These attributes become the default values if they are not modified. Modified attributes are written to the CuAt.

PdCn --

The Predefined Connection object class file contains information about how devices physically connect to the system.

/usr/share/lib/objrepos:

Contains: /usr/share part of the SWVPD. These files are not hardware dependent, they can be shared among several machines. Whenever installing a product or update an AIX, the installp command uses the ODM to maintain the SWVPD. It contains the name of the software, version, state of it (Applied, Commited..)

The classes in SWVPD:

lpp --

Contains information about the installed program, state, description…

inventory --

Contains information about the files associated with the program

product --

Contains information about the product, i.e: prerequisites

history --

Contains historical information about the installation and updates.

Source: http://aix4admins.blogspot.com/2011/08/odm-object-data-manager-it-is-database.html

aix/odm.txt · Last modified: 2021/01/01 21:21 (external edit)