Monday, 22 April 2013

Object Data Manager (ODM)

  1. What is ODM?
  2. Location of ODM Repositories
  3. Some ODM Database files
  4. Some Useful ODM commands
  5. ODM commands - examples

What is ODM?

  • Maintains system config, device and vital product data
  • Provide a more robust, secure and sharable resource
  • Provide a reliable object oriented database facility
Data Managed By ODM

  • Device Configuration Information
  • Software Vital Product Data
  • SRC information
  • Communications configuration data
  • Menus and commands for SMIT
ODM has three components

  • Object class - These are datafiles.
  • Objects - Records within Datafiles
  • Descriptors - Field within a record

Where ODM Object Class files are stored?

This can be defined in /etc/environment file. The ODM object clases are held in three repositories

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

Some important ODM Database files

Supported devices and attributes and connection information are stored in
PdDv, PdAt, PdCn, etc..
Records or customizrd Devices and attributes, VPD are stored in
CuDv, CuAt, CuDep, Config_Rules, CuVPD, etc ...
Have software information
lpp, history, product, inventory, etc..
SMIT menus, commands, options
sm_cmd_hdr, sm_cmd_opt, sm_menu_opt 
NIM Resource and configuraion informations
nim_object, nim_pdattr, nim_altr
Errorlog, alog and dump file info

Useful ODM Commands

odmget     - To retrieves objects from an Object Class in stanza format
odmdelete  - To delete objects what meet a specific criteria. 
             If no criteria specified, all objects are deleted
odmadd     - To add a new object to an object class
odmchange  - To change all objects with in an Object Class that meet a specific criteria
odmshow    - To display object class definition
odmcreate  - To create Object Class for application that will use ODM DB
odmdrop    - To remove an Object Class

Some ODM Command examples

To list all records with an Object Class CuDv
# odmget CuDv
To find out an object within CuAt with condition name=sys0 and attibute=maxuproc
# odmget -q "name=sys0 and attribute=maxuproc" CuAt
          name = "sys0"
          attribute = "maxuproc"
          value = "2000"
          type = "R"
          generic = "DU"
          rep = "nr"
          nls_index = 20
To delete the above object
# odmget -q "name=sys0 and attribute=maxuproc" CuAt > file.1
 # odmdelete -q "name=sys0 and attribute=maxuproc" -o CuAt 
To add the deleted object again to the above object class
# odmadd file.1   # add the file content to appropriate Object class
Fix ODM related errors for devices (CuDv Object Class)
$ cfgmgr
cfgmgr: 0514-604 Cannot access the CuDv object class in the
device configuration database.
The Fix:
 01. cd /etc/oberepos 
 02. cp Config_Rules Config_Rules.backup 
 03. odmget -q rule="/etc/methods/darcfgrule" Config_Rules 
 04. odmdelete -q rule="/etc/methods/darcfgrule" -o Config_Rules
 05. savebase -v
 06. cfgmgr

0 blogger-disqus:

Post a Comment