Richard W.M. Jones wrote:
lvcreate -L 3G -n newroot raidvg
lvcreate -L 1G -n newswap raidvg
I should add, in a libvirt context it's probably going to be useful to also:
* list available volume groups (vgscan)
* list space available in each VG (vgdisplay name-of-vg)
* show how VGs relate to PGs (pvscan)
The LVM tools use quite a sophisticated internal API which isn't
exported - but see for example tools/tools.h and include/*.h in the LVM2
source code. <libdevmapper.h> is also available, but much more lowlevel.
Rich.
--
Emerging Technologies, Red Hat
http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)