Re: parted/LVM for ET [Re: Storage manager initial requirements and thoughts

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

 



Jim Meyering wrote:
"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
On Wed, Mar 14, 2007 at 09:17:37AM +0000, Richard W.M. Jones wrote:
...
I did look at the API for libparted a few months ago (actually from the
rather ancient released version on gnu.org) and it didn't look to me
like there was any way to express LVM notions through the API, so I
guess this will require a lot of new API calls and structures?
The other option is to simply call the LVM commands directly from libvirt
which is what pretty much every app seems todo when they need to talk
to LVM. We already do this in the network driver backend to deal with
iptables and it isn't all that evil.  If the libparted developers are
working on LVM APIs we should encourage them, but its not clear to me that
its worth expending our own resources to develop full LVM support in
libparted when libvirt will only ever need a tiny number of LVM operations
to be invokved.

If the set of LVM operations required by libvirt is really so small,
then I'd say it's worth investing in doing the right thing, if only
to create the tiny API right away.

With a real library API, libvirt stand a much better chance of properly
diagnosing, and even detecting, partitioning failures.  Of course,
when everything works well, there's very little difference, but it's
when things go wrong that users will thank us.

Can you give me (an LVM newbie) an idea of what the few libvirt-required
LVM operations are?

Quoting almost directly from the operations manual at my former workplace, the LVM-related operations needed to create a new VM were:

lvcreate -L 3G -n newroot raidvg
lvcreate -L 1G -n newswap raidvg
dd if=/dev/raidvg/oldroot of=/dev/raidvg/newroot
mkswap /dev/raidvg/newswap

(That's right - we used to create new machines by dupping old ones).

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)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]