[linux-lvm] New developer question -- API

John Antypas ja at s21.com
Fri Apr 27 01:44:32 UTC 2007


This has probably been asked thousands of times before, but I'll try to be a
good 1001 J

 

I'm trying to write some userspace code which can determine what  LV, VG and
PV a givne file mout belongs to.  Yes, I can process the output of a few
command lines tools like this:

 

1.       Get the mount from /proc/mounts

2.       Run lvs and map that into the LVM

3.       Using the LVM, run vgs and get the VG

4.       Using VG, use pvs and get the PV

5.       Using PV, now some knowledge about how I set things up and get the
md

6.       Run around proc some more and figure out which disks this md is on

 

These utilities do it - is there an API I can call to do all of this tracing
down rather than processing shell processes?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20070426/5c43fd8e/attachment.htm>


More information about the linux-lvm mailing list