Changing an ODM class (new thread)
 
*
Welcome, Guest. Please login or register. January 10, 2009, 01:04:22 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Changing an ODM class (new thread)  (Read 1908 times)
0 Members and 1 Guest are viewing this topic.
ValentineSmith
Full Member
***
Posts: 29


« Reply #7 on: June 22, 2007, 08:51:12 PM »

Thanx, Michael.
As I may have mentioned, I have no need for this or any "other" use for ODM.
I do understand the OO nature of ODM and how one might use it to keep track of some set of objects.
My interest here was strictly intellectual.
I was just curious how one would go about changing the system's ODM classes to accommodate longer strings for naming objects.
Logged
Michael
Administrator
Hero Member
*****
Posts: 539


« Reply #6 on: June 22, 2007, 12:23:33 PM »

ODM can be used for many surprising things. Once of the first "other" uses I saw it used for was the topcat2 testing system.

Back in 1996 topcat2 was the first AIX certification preperation tool. You can still see it on http://www.topcat2.com - note: afaik the tests have not been updated for quite some time.

It uses many odmget statements, as well as odmadds, to manage the complete testing process. Too many pipe calls imho, but it gets the job done.
Logged
ValentineSmith
Full Member
***
Posts: 29


« Reply #5 on: June 22, 2007, 02:07:51 AM »

Well, many kind thanx to you both for your time. Cool
« Last Edit: June 22, 2007, 04:07:46 AM by ValentineSmith » Logged
Michael
Administrator
Hero Member
*****
Posts: 539


« Reply #4 on: June 21, 2007, 02:09:11 PM »

"Fortunately quote from test.rootvg.net pasted here still looks normal!"

Well, almost normal.
There seems to be a few pieces of thread missing.
No problem with that but I'd still like to know how one can change the descriptors of a class to use longer strings.
That "cfgodm.ipl" file was a good find but it seems to interfere with savebase/restbase.
What am I missing?
Thanx again to one and all.


Well, I don't think the test server had all the posts, so that is why some are missing. The other reason is because I didn't copy one back.

Regarding CuDep as an example, and changing it.
basically, imho, it is not the best choice as it is a system file, and is defined by the system. Changing it will probably invalidate any support from IBM.

Better would be to make an original file, runs some test on it; modify the description/layout; and verify that tests suceed again.

In other words, I see savebase/restbase as programs specific to the AIX boot process, not generalized backup and restore programs.
Logged
sbzx
New Member
*
Posts: 4


WWW
« Reply #3 on: June 20, 2007, 05:31:14 PM »

We may be missing something. I am not sure reading from/writing to an ODM class using commands (odmget/odmadd) works the same way as using system calls (odm_get_*, odm_add_obj). I am not a C programmer, so it's just a hunch.
Logged
ValentineSmith
Full Member
***
Posts: 29


« Reply #2 on: June 20, 2007, 02:44:44 PM »

"Fortunately quote from test.rootvg.net pasted here still looks normal!"

Well, almost normal.
There seems to be a few pieces of thread missing.
No problem with that but I'd still like to know how one can change the descriptors of a class to use longer strings.
That "cfgodm.ipl" file was a good find but it seems to interfere with savebase/restbase.
What am I missing?
Thanx again to one and all.
Logged
Michael
Administrator
Hero Member
*****
Posts: 539


« Reply #1 on: June 19, 2007, 09:00:21 AM »

Some History.... Fortunately quote from test.rootvg.net pasted here still looks normal!

I believe it's the create_db function in bosboot which fools you. It recreates the ODM classes using /usr/lib/cfgodm.ipl as a template. Check it out, you'll find what you're looking for. Wink

rather than savebase and then reboot, I would try bosboot -ad hdisk0, and then reboot.

Yes, I did try that.
No difference.

It may be that deep in install the system is doing odmcreate statements to remake the base AIX ODM classes.

Then what's the purpose of savebase/restbase?

How can one change the properties (descriptors) of an ODM class?
The following experiment did not work.

I picked the "CuDep" class for my experiment (I'm as lazy as the next guy).
So, I created a file called "CuDep.cre"
 
class CuDep {
  char name[32];
  char dependency[32];
};

 
and then:
 
odmget CuDep > inputFile
odmdrop -o CuDep
odmcreate CuDep.cre
odmadd inputFile

 
and everything seemed to be OK.
 
odmshow CuDep  showed a class with 2 descriptors (both arrays with 32 elements) and 12 active objects.
odmget CuDep  showed the 12 objects.
 
I then did
 
bootinfo -b
 
to confirm that "hdisk0" was indeed my boot disk, and then
 
savebase -o /etc/objrepos -d /dev/hdisk0 -v
 
Again, everything seemed to be OK.
But when I rebooted, the descriptors were back to 16 elements.
I then did it all again finishing with
 
bosboot -ad /dev/hdisk0
 
Still no joy.

Huh??

Thanx in advance to one and all.
Logged
ValentineSmith
Full Member
***
Posts: 29


« on: June 19, 2007, 12:04:18 AM »

I'm glad cfgodm.ipl did the trick.

Well, it only did half the trick.
I still end up with those null values.

. . . curious as to why you want to change the CuDep class.

Again, this was only an experiment to address an intellectual curiosity.
I asked myself, "What if I wanted to use names longer than 16 characters?"
I picked on the CuDep class because it was small (only 2 descriptors).
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 8.128 seconds with 18 queries.




eXTReMe Tracker

Terms of Use and Privacy and Security Policies
Copyright 2001-2008 Michael Felt and ROOTVG.NET