AIX 5L SysAdmin II: (Unit 02) – The Object Data Manager (ODM)

Unit Objectives:
1. Define the structure of the ODM
2. Work with the ODM command line interface
3. Describe the role of ODM in device configuration
4. Define the meaning of the most important ODM files

What is the ODM?
1. The Object Data Manager (ODM) is a database intended for storing system information.
2. Physical and logical device information is stored and maintained as objects with associated characteristics.

Data Managed by the ODM:
1. Devices – (lsdev, lscfg)
2. Software
3. System Resource Controller (SRC) – Deamons (lssrc, refresh, startsrc, stopsrc)
4. Smit Menus
5. TCP/IP Configuration
6. Error Log, Dump
7. Network Installation Manager (NIM)

ODM Components:
Object Class (PdDv – Predefined object class)
Objects – devices, software…

————————— ————— ——– ——————-
uniquetype attribute deflt values (Descriptors)
————————— ————— ——— ——————–
/tape/scsi/4mm4gb block_size 1024 0-16777215,1
disk/scsi/1000mb pvid none
tty/rs232/tty login disable enable, disable, …

ODM Database Files: (Object Classes)
1. Predefined device information (PdDv, PdAt, PdCn)
2. Customized device information (CuDv, CuAt, CuDep, CuDvDr, CuVPD, Config_Rules)
3. Software vital product data (history, inventory, lpp, product)
4. SMIT menus (sm_menu_opt, sm_name_hdr, sm_cmd_hdr, sm_cmd_opt)
5. Error log, alog and dump information (SWservAt)
6. System Resource Controller (SRCsubsys, SRCsubsvr, …)
7. Netowrk Installation Manager (NIM) (nim_attr, nim_object, nim_pdattr)

Note: This course works mainly with number 1, 2 and 3 above and not the other items that are also listed and are object classes in the ODM.

Terms & Definitions:
Pd[ ] – Supported devices
Cu[ ] – Configured devices

PdDv – Predefined Devices
PdAt – Predefined Attributes
PdCn – Predefined Connectors

CuDv – Customized Devices
CuAt – Customized Attributes
CuDep – Customized Dependencies (What needs to run before other things)
CuDvDr – Customized Device Drivers (Device Drivers)
CuVPD – Customized Vital Product Data (Manufacturer, Part Number…)
Config_Rules – Config_Rules (cfgmgr – Config Manager for plug & play devices)
lpp – Licensed Program Product (Software)

Device Configuration Summary:
cfgmgr – Configuration Manager
Config_Rules (Methods, Define, Configure, Change, Unconfigure, Undefine, Load, Unload Device Drivers)
CuDv – Customized Devices
Predefined Databases
Customized Databases

Location and Contents of ODM Repositories:
1. /etc/objrepos – (CuDv, CuAt, CuDep, CuDvDr, CuVPD, Config_Rules, history, inventory, lpp, product, nim_*, SWservAt, SRC*)
Note: This object repository contains all of the unique information about that particular system including physical volume IDs etc. These files cannot be shared or transfered to another system since the systems are different.

2. /usr/lib/objrepos – (PdDv, PdAt, PdCn, history, inventory, lpp, product sm_*)
Note: This object repository contains all of the AIX supported device information. As long as you have the same version of AIX, these files can be shared and thus transfered to another system if it gets deleted.

3. /usr/share/lib/objrepos – (history, inventory, lpp, product)
Note: Can share from AIX to other UNIX systems.

Note: The ODM is a file just like everything else in AIX is a file. The ODM files are binary files and cannot be viewed with the “cat”, “page” and “more” commands.

Note: makesysb backup will backup all three file sets since they are part of the rootvg.

How ODM Classes Act Together:
mkdev -c tty – t tty -s rs232 (c – class, t – type)

type = “tty”
class = “tty”
subclass = “rs232”
prefix = “tty”
Define = “/etc/methods/define”
Configure = “/etc/methods/cfgtty”
uniquetype = “tty/rs232/tty”

name = “tty0”
status = 1
chgstatus = 1
location = “01-C0-00-00”
parent = “se0”
connwhere = “s1”
PdDvLn = “ttyrs232tty”

Note: The ODM goes to the PdDv information to create the CuDv information.

uniquetype = “ttyrs232tty”
attribute = “login”
deflt = “disable”
values = “enable, disable…”

uniquetype = “ttyrs232tty”
attribute = “term”
deflt = “dumb”
values * “”

chdev -l tty0 -a login=enable
chdev -l tty0 -a term=ibm3151

name = “tty0”
attribute “login”
value = “enable”
type = “R”

name = “tty0”
attribute = “term”
value = “ibm3151”
type = “R”

Data Not Managed by the ODM:
Filesystem Information – /etc/filesystems
User/Security Information – /etc/security, /etc/passwd, /etc/usrs, /etc/groups…
Queues and Queue Devices – /etc/qconfig

Note: The ODM does not mange these things because sometimes you have to network filesystems to different flavors of UNIX which don’t understand how the ODM works.

Device Configuration and the ODM:
cfgmgr –> PdDv(Undefined) –> CuDv(Defined) –> AIX Kernal Device Drivers – /dev/cd0 (CD-Rom device)

ODM Commands:
Object class: odmcreate, odmdrop
odmcreate filename.cre
Descriptors: odmshow
odmshow PdDv – displays the descriptors and attributes
Objects: odmadd odmchange, odmdelete, odmget

Note: These commands are not used very often unless the ODM gets messed up and has to be cleaned up manually under advise of technical support. Make sure that you use the proper methods and commands to change the ODM so that it doesn’t have problems.

Changing Attribute Values:
descriptor object descriptor object obj.class
# odmget -q”uniquetype=tape/scsi/8mm and attribute=block_size” PdAt > filename
-q means to query

# vi filename

uniquetype = “tape/scsi/8mm”
attribute = “block_size”
deflt = “1024” (Modify default to 512)
values = “0-245760,1”
width = “”
type = “R”
generic = “DU”
rep = “nr”
nls_index = 6

# odmdelete -o PdAt -q”uniquetype=tape/scsi/8mm and attribute=block_size”
# odmadd filename

Note: You may want to do this if you don’t want to always have to change the size from 1024 to 512. Thus you would have to change this in the ODM. However, it is best not to do this. It is better to not change the ODM but to change each device as it is added in smit etc.

Changing Attribute Values Using odmchange:
# odmget -q”uniquetype=tape/scsi/8mm and attribute=block_size” PdAt > filename

# odmchange -o PdAt -q”uniquetype=tape/scsi/8mm and attribute=block_size” filename

Software Vital Product Data:
There are four main object classes for software.

lpp: (Licensed Program Product or Software – lslpp -L)
name = “bos.rte.printers”
state = 5 (committed)
ver = 5
rel = 1
mod = 0
fix = 0
description = “Front End Printer Support”
lpp_id = 38

product: (dependencies)
lpp_name = “bos.rte.printers”
comp_id = “5765-C3403”
state = 5

inventory: (What uses this information)
lpp_id = 38
file_type = 0
format = 1
loc0 = “/etc/qconfig”

history: (When installed, lslpp -h)
lpp_id = 38
ver = 5
rel = 1

Software States You Should Know About:
# lslpp -L

1. Applied (Disadvantage – Uses more disk space)
Only possible for PTFs or Updates
Previous version stored in /usr/lpp/Package_Name
Rejecting update recovers to saved version
Committing update deletes previous version

2. Committed
Removing committed software is possible
No return to previous version

3. Applying, Committing, Rejecting, Deinstalling
If installation was not successful:
a) installp -C (cleanup unsuccesful software installation)
b) smit maintain_software

4. Broken
Cleanup failed
Remove software and reinstall

Predefined Devices (PdDv):

Predefined Attributes (PdAt):
lsdev -PH (show attributes)

Customized Devices (CuDv):
lsdev -C (show configured devices)

Note: The cfgmgr can only work with plug & play devices. Three examples of devices that are not plug & play are tty terminals, printers and modems.

Customized Attributes (CuAt):
lsattr -El rmt0 (-E effective devices, high level command)

name = “tty0”
attribute = “login”
value = “enable”

name = “hdisk0”
attribute = “pvid”
value = “0016203392072a540000000000000000″

Additional Device Object Classes:
ls -l /dev (view CuDvDr)
lscfg -v (view the CuVPD – part number, manufacturer etc.)
lsdev -C (to find status of a device)

Q: What is the ODM?
A: The ODM is a Data Base used in AIX to Manage Device Definitions
Q: Why do system administrators need to work with the ODM?
A: Most of the time system administrators don’t need to interact with the ODM.? However, if they ever need to interact directly with the ODM is because there are serious problems, such as device misconfigurations.

Q: How often do I add Object Classes to the ODM?
A: The ideal setting is to leave the ODM the way it is when you first installed and literally manage it through high level commands, through smit or the wsm.? Therefore, you will hardly ever add your own object class to the ODM.? If you have plan to do something like that you need to be extremelly careful and proficient in understanding the overall ODM syntax.

lsdev -P -H | more > (PdDv – Predefined object class – Supported Devices)
lsdev -C -s scsi -H | more (scsi device listing)
odmget -qname=hdisk0 CuDv (show information about disk0)
status = 1 (0=defined, 1=available)
chgstatus = 2 (2-Same)
lsattr -El hdisk0 (display attributes of hdisk0)
odmget -qname=hdisk0 CuAt | more
ls -l /dev/hdisk0
lsvg -l rootvg (list logical volumes in rootvg)
odmget -qname=rootvg CuDep | more (list dependencies of rootvg)
lsdev -P -c disk | more (c-class disk, P supported devides)
odmget -qtype=osdisk PdDv | more
lsdev -Cc adapter (list of all adapters that are defined)
odmget -qparent=scsi0 CuDv

mkdev -d -c disk -s scsi -t osdisk -p scsi0 -w 2,0 (Define a fictitious hdisk1)
odmget -qname=hdisk1 CuDv (Check the ODM entry for the ficticious hdisk1)
mkdev -l hdisk1
Method error (/etc/methods/cfgscdisk):
0514-047 Cannot access a device.
rmdev -l hdisk1 -d (delete hdisk1 from the ODM)
hdisk1 deleted
odmget -qname=hdisk1 CuDv (Verify that hdisk1 is gone)
mkdir /tmp/odm (make a directory)
cd /tmp/odm
vi parts.cre
class parts {
long part_number;
char part_description[126];
char warehouse[4];
long contained_in;
:wq (save the file)
odmcreate parts.cre (add it to the odm)
vi parts.add
part_number = ‘10001”
part_description = “Wheel”
warehouse = “a12”
contained_in = “50001”

part_number = ‘10003″
part_description = “Frame”
warehouse = “a19”
contained_in = “50001”

part_number = ‘10005″
part_description = “Saddle”
warehouse = “a01”
contained_in = “50001”
:wq (save the file)
odmadd parts.add (add to ODM)
odmget -qcontained_in=50001 parts | more
odmdrop -o parts (delete this information)

Leave a Reply

Your email address will not be published. Required fields are marked *