Interesting, thank you for your answer! Yes, DBus should work for my
use-case.
At the same time, I'm looking into lvm2cmd.h right now, but it seems to
be designed for the CLI `lvm` you mentioned.
On 3/4/25 6:25 PM, Zdenek Kabelac wrote:
Dne 04. 03. 25 v 9:29 DeCay napsal(a):
Hello!
I came across a rust library (https://crates.io/crates/lvm-sys) which
depends on lvm2app.h. This header doesn't exist anymore, as far as I
was able to find.
What's the right way to interact with LVM2 programmatically at the
moment ?
There is either DBus API or just simple good old fashioned 'exec(lvm)'
of lvm2 command.
We were unable to provide and maintain the C API - as there are simply
too many restriction which cannot be easily satisfied with any random
binary.
So easiest is to simply run lvm2 command or if you are able to consume
DBus API - you can try to go this path - however than there are many
limitations.
Regards
Zdenek