On Monday, July 19, 2010 02:18:47 am chen wrote: > Hi, > > I am new to lvm API programming and want to use API instead of CLI, > > I have scanned all functions in lvm2app.h of liblvm, > > but I couldn't find one function that can match the command "pvcreate" and > I don't know how to create snapshots using liblvm The pvcreate function is part of vgextend now. First liblvm is used to create a group then to extend it with the devices you want to include. Finally you can write the changes. > > Could you give me an example about how to build a logical volume and its > snapshot using "liblvm"? > > Thank you very much! I don't think snapshots can be done with the library yet. Only simple linear volumes. _______________________________________________ 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/