Re: api recommandation (example_cmdlib.c doesnt work properly)?

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

 



Dne 9.5.2018 v 08:52 Oliver Rath napsal(a):
Hi list,

i tried to get some lvm-commands working using example_cmdlib.c
(modified, attached). Unfortunatly the example hangs trying a "lvcreate
--name test --size 12M levg" command:

Hi

Please avoid tweaking code to use  cmdlib - it's  internal library and
lvm2 is highly recommending to always FORK  lvm2 command - instead
of trying to embeded it in your application.

There are numerous memory requirements during certain operation that would be pretty bad to be imposed for other users tool.

If you want to 'stream' multiple commands - you could pipe lvm shell to minimize forking, however than error reporting & reaction becomes a bit harder to play with.


Whats wrong here? Ist there a better api for communicating from other
programs?

It's simply not official API and it's based on internal knowledge and uses settings from lvm.conf - these settings are tied to use of lvm command.


Imho the python support is deprecated, lvm2app is deprecated, dbus-api
is limited at the moment (right? Didnt find documentation for it), so
the only way seems liblvm or call explicit the lvm-tools.


dBus API is somewhat 'frozen' as there is no active development on this part,
and would be nice to get someone involved into this more...


Regards


Zdenek

_______________________________________________
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