[linux-lvm] Resend: API for retrieving linux lvm information
Dieter Stüken
stueken at conterra.de
Wed Jul 13 09:03:20 UTC 2005
Alasdair G Kergon wrote:
> These answers are for LVM2.
>
> On Mon, Sep 06, 2004 at 11:04:09PM -0700, Stanley Yue wrote:
>
>>1) Is there any api library for retrieve linux lvm configuration? I.e.
>>querying for all the vg(s), pv(s), lv(s) on the system?
>
> The commands: lvs, pvs, vgs with numerous cmdline flags.
> See lib/report/columns.h for field names
liblvm.a seems handy, to generate lvm command line tools, but I'm missing
a clear differentiation between modifying and non modifying usage.
I'm asking, as I want to develop some lvm information system running
as a web service to provide a quick overview about my lvm configuration
and status. Thus I definitely want to run it as non root. I might use
those nice lvs,pvs,vgs commands, but I don't want to provide them with
a suid-bit, as they are potentially able to modify my lvm. The former
/proc interface was ideal for this purpose, but it seems to be missing for
LVM2. Are there any plans, to provide lvm informations via /proc or /sys
again, or would it be possible to write somehow "restricted" lvm-tools
using liblvm?
Dieter.
--
Dieter Stüken, con terra GmbH, Münster
stueken at conterra.de
http://www.conterra.de/
(0)251-7474-501
More information about the linux-lvm
mailing list