Operating System - HP-UX
1850409 Members
2218 Online
104054 Solutions
New Discussion

pst_lvinfo or request pst_diskinfo

 
SOLVED
Go to solution
alessandro_37
Advisor

pst_lvinfo or request pst_diskinfo

Dear all,
how can i use an C routine (pst_lvinfo) to have

logical volume name,
logical volume total space amount
logical volume total space used
logical volume total space free

I have checked pst_lvinfo [ pstat_getlv() ] and pst_diskinfo [pstat_getlv] C routine, but i haven't find the solution

Someone can help me please?

1 REPLY 1
Dietmar Konermann
Honored Contributor
Solution

Re: pst_lvinfo or request pst_diskinfo

Alessandro,

I'm afraid you won't be able to get this from pstat().

The LV Name is unknown to the kernel. So You would need to look at the name of the device special file assiciated to it. This is what the LVM commands do also, BTW.

Concerning the LV size... use stat64(2). Concerning the /used/free information... if you are talking about LVs with file systems, you could have a look at statvfs(2).

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)