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

[linux-lvm] New developer question -- API



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?


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