HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: systemcalls for the lvm
Operating System - HP-UX
1827260
Members
2160
Online
109717
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2000 12:51 AM
11-29-2000 12:51 AM
i want to get information about the location of a logical volume on a physical volume. i know how i do this if the logical volume is only located on one physical volume but if it contains to more than one physical volume i don't know what i have to do. i tried a systemcall like 'pstat_getlv' (thanks john) but this information i have got was not enough for me.
i need a solution for a c/c++ programm, so it is not so easy scanning the output of the 'lvdisplay' command
hope for help
stefan
i need a solution for a c/c++ programm, so it is not so easy scanning the output of the 'lvdisplay' command
hope for help
stefan
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2000 01:43 AM
11-29-2000 01:43 AM
SolutionHP keep the lvm stuff pretty close to their chest as its part of HP-UX's source code.
I dont think youre going to have much luck finding the C call you want, youre going to have to do it the long way and call a shell to do a lvdisplay -v or pvdisplay and suck the results back into your C program.
Im from Palmerston North, New Zealand, but somehow ended up in London...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2000 09:53 AM
11-30-2000 09:53 AM
Re: systemcalls for the lvm
HP's LVM implementation comes from the time the OSF (Open Software Foundation) was more active. LVM was a contribution from IBM to OSF and HP got their LVM base from there. IBM released their LVM code to the open source community for porting to Linux. Have a look at http://www.sistina.com/lvm/ or more precisely http://www.sistina.com/lvm/Pages/intro.html. You could get some source code overthere too.
If you're willing to do some reverse engineering, you may also consider using 'tusc' to get a trace of system calls used by lvdisplay to get the information. 'tusc' is for HP-UX 11.x, it would be 'trace' on HP-UX 10.20 (see http://hpux.cs.utah.edu/ for these utilities).
Example:
tusc -v /usr/sbin/lvdisplay -v /dev/vg00/lvol1
After getting info from /etc/lvmtab, lvdisplay does a serie of ioctl() as follows:
open("/dev/vg00/group", O_RDWR, 02) ...... = 4
stat("/dev/vg00/lvol1", 0x7f7e0e90) .............................. = 0
fstat(4, 0x7f7e0ee8) ................................. = 0
ioctl(4, 0xc01c7633, 0x7f7e0dc0) ............... = 0
Command: _IOWR('v', 51, 28)
Data:
\00103\0\0\0\019\019\019\a) \002\0\0\0\0\0\0\003\0\0\0\0
ioctl(4, 0xc0207612, 0x7f7e0df0) ............... = 0
Command: _IOWR('v', 18, 32)
Data:
045 e6ef8 9090ee\0ff\010\tc4\0\0\0@ \0\0\0c2\0\t\003\00301fc\0\0
ioctl(4, 0xc01c7633, 0x7f7e1790) ............... = 0
Command: _IOWR('v', 51, 28)
Data:
\001\0\0\0\0\019\019\019\a) \002\0\0\0\0\0\0\0\0\0\0\0\0
ioctl(4, 0xc00c760d, 0x7f7e17ac) ................ = 0
Command: _IOWR('v', 13, 12)
Data:
\0011793\0\0\019@ 160610
ioctl(4, 0xc0207610, 0x40160940) ............... = 0
Command: _IOWR('v', 16, 32)
Data:
@ 1606( \0\002\001fb\0\0\0@ \0\01f\0` \0\veb\vec\0\0\0\001\001\0
ioctl(4, 0xc0207610, 0x40160960) ............... = 0
Command: _IOWR('v', 16, 32)
Data:
@ 1606@ \00102\001fc\0\0\0@ \0\01f\0P \003K 03L \0\0\0\001\001\0
ioctl(4, 0xc0207610, 0x40160980) ............... = 0
Command: _IOWR('v', 16, 32)
Data:
@ 1606X \00202\001fc\0c2\0@ \0\01f\0@ \003K 03L \0\0\0\001\001\0
ioctl(1, TCGETA, 0x7f7e1a38) ..... ERR#25 ENOTTY
Command: _IOR('T', 1, 18)
Just repeat the process and try to detect any patterns.
Daniel.
If you're willing to do some reverse engineering, you may also consider using 'tusc' to get a trace of system calls used by lvdisplay to get the information. 'tusc' is for HP-UX 11.x, it would be 'trace' on HP-UX 10.20 (see http://hpux.cs.utah.edu/ for these utilities).
Example:
tusc -v /usr/sbin/lvdisplay -v /dev/vg00/lvol1
After getting info from /etc/lvmtab, lvdisplay does a serie of ioctl() as follows:
open("/dev/vg00/group", O_RDWR, 02) ...... = 4
stat("/dev/vg00/lvol1", 0x7f7e0e90) .............................. = 0
fstat(4, 0x7f7e0ee8) ................................. = 0
ioctl(4, 0xc01c7633, 0x7f7e0dc0) ............... = 0
Command: _IOWR('v', 51, 28)
Data:
\00103\0\0\0\019\019\019\a) \002\0\0\0\0\0\0\003\0\0\0\0
ioctl(4, 0xc0207612, 0x7f7e0df0) ............... = 0
Command: _IOWR('v', 18, 32)
Data:
045 e6ef8 9090ee\0ff\010\tc4\0\0\0@ \0\0\0c2\0\t\003\00301fc\0\0
ioctl(4, 0xc01c7633, 0x7f7e1790) ............... = 0
Command: _IOWR('v', 51, 28)
Data:
\001\0\0\0\0\019\019\019\a) \002\0\0\0\0\0\0\0\0\0\0\0\0
ioctl(4, 0xc00c760d, 0x7f7e17ac) ................ = 0
Command: _IOWR('v', 13, 12)
Data:
\0011793\0\0\019@ 160610
ioctl(4, 0xc0207610, 0x40160940) ............... = 0
Command: _IOWR('v', 16, 32)
Data:
@ 1606( \0\002\001fb\0\0\0@ \0\01f\0` \0\veb\vec\0\0\0\001\001\0
ioctl(4, 0xc0207610, 0x40160960) ............... = 0
Command: _IOWR('v', 16, 32)
Data:
@ 1606@ \00102\001fc\0\0\0@ \0\01f\0P \003K 03L \0\0\0\001\001\0
ioctl(4, 0xc0207610, 0x40160980) ............... = 0
Command: _IOWR('v', 16, 32)
Data:
@ 1606X \00202\001fc\0c2\0@ \0\01f\0@ \003K 03L \0\0\0\001\001\0
ioctl(1, TCGETA, 0x7f7e1a38) ..... ERR#25 ENOTTY
Command: _IOR('T', 1, 18)
Just repeat the process and try to detect any patterns.
Daniel.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP