Operating System - HP-UX
1834289 Members
2108 Online
110066 Solutions
New Discussion

Retrieving disks by logical volume programmatically

 
Laur_1
Occasional Contributor

Retrieving disks by logical volume programmatically

Hello,

I'm trying to get disks by logical volume bit i don't see another solution that parsing lvdisplay output.
Anybody have another solution.
Thanks,
Christel
none
4 REPLIES 4
Armin Feller
Honored Contributor

Re: Retrieving disks by logical volume programmatically

you can use pvdisplay to see if the disk is in use by LVM.
Christopher Caldwell
Honored Contributor

Re: Retrieving disks by logical volume programmatically

If you want to use C, check out pstat(2):

$man pstat
Laur_1
Occasional Contributor

Re: Retrieving disks by logical volume programmatically

Thanks for you quick response.
I have already try to use pstat_getlv but this function doesn't get names of disk or i need to have them.
Do you known another function on pstat() that return names of disk.
none
Christopher Caldwell
Honored Contributor

Re: Retrieving disks by logical volume programmatically

pstat_getdisk()