Re: Does HP-UX provide an API to LVM, ioscan, cm* ? (113 Views)
Reply
Honored Contributor
Ralph Grothe
Posts: 2,631
Registered: ‎04-09-2000
Message 1 of 8 (113 Views)
Accepted Solution

Does HP-UX provide an API to LVM, ioscan, cm* ?

See subject.

Regards
Ralph
Madness, thy name is system administration
Please use plain text.
Honored Contributor
Christopher Caldwell
Posts: 697
Registered: ‎06-04-1996
Message 2 of 8 (113 Views)

Re: Does HP-UX provide an API to LVM, ioscan, cm* ?

From an interrogation standpoint, use the pstat(2) system call.

From a provisioning standpoint, I'd wrap the existing 1m commands.

Please use plain text.
Honored Contributor
H.Merijn Brand (procura
Posts: 6,185
Registered: ‎10-13-1997
Message 3 of 8 (113 Views)
Please use plain text.
Honored Contributor
Ralph Grothe
Posts: 2,631
Registered: ‎04-09-2000
Message 4 of 8 (113 Views)

Re: Does HP-UX provide an API to LVM, ioscan, cm* ?

Hello Merijn,

I already knew the mentioned HPUX modules,
but I don't want to use them since they are not much different from mine.
These modules (like mine) only parse the output of the vg|lv|pvdisplay, ioscan commands to put it in a LoL.
Whereas I would rather prefer to have a more direct access through an API library (probably in C) for three reasons.
First, I don't want to modify my modules whenever the output format of the above mentioned commands changes.
2nd, I guess it is a bit faster, and leaves you a greater degree of control.
3rd, I want to play a bit with creating a module that embeds C because I recently bought the book "Extending and Embedding Perl" by Cozens and Jennes,
that whet my appetite.
Madness, thy name is system administration
Please use plain text.
Honored Contributor
Jean-Louis Phelix
Posts: 724
Registered: ‎10-07-2002
Message 5 of 8 (113 Views)

Re: Does HP-UX provide an API to LVM, ioscan, cm* ?

Hi,

For LVM and ServiceGuard, the answer is clearly NO. I'm from HP and I wrote a lot of tools around system admin, but never succeeded in getting such APIs ...

For ioscan, it's possible to read /etc/ioconfig file using struct defined in /usr/include/sys/ioparams.h. Have a look to union ioconfig_record for example.

Regards.
It works for me (© Bill McNAMARA ...)
Please use plain text.
Honored Contributor
Christopher Caldwell
Posts: 697
Registered: ‎06-04-1996
Message 6 of 8 (113 Views)

Re: Does HP-UX provide an API to LVM, ioscan, cm* ?

>Whereas I would rather prefer to have a more direct access through an API library (probably in C) for three reasons.

If that's the case (I'm assuming you're reading), then pstat is exactly what you want (it's C).

Please use plain text.
Honored Contributor
H.Merijn Brand (procura
Posts: 6,185
Registered: ‎10-13-1997
Message 7 of 8 (113 Views)

Re: Does HP-UX provide an API to LVM, ioscan, cm* ?

OK, clear. First of all I wish you a lot of fun. Really! The book is good. I've had a few glimpses through it in Munchen.

If you think XS is too hard to start with, try Inline::C first. Very easy interface, immediate results.
Enjoy, Have FUN! H.Merijn
Please use plain text.
Honored Contributor
Ralph Grothe
Posts: 2,631
Registered: ‎04-09-2000
Message 8 of 8 (113 Views)

Re: Does HP-UX provide an API to LVM, ioscan, cm* ?

Christopher,

that was a good hint.
I had a look at man pstat and the pstat.h header file to see that it offers amongst others get_lvinfo() and get_diskinfo().
Maybe that's already enough to get me starting.
Unfortunately I lack an HP-UX workstation at home for development, and I don't seem to find time to do this sort of playing at work :-(
Madness, thy name is system administration
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation