New developer question -- API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux