[libvirt] [PATCH v3] storage: Allow to delete device mapper disk partition
Eric Blake
eblake at redhat.com
Mon Feb 14 16:27:23 UTC 2011
On 02/12/2011 12:36 AM, Osier Yang wrote:
> The name convention of device mapper disk is different, and 'parted'
> can't be used to delete a device mapper disk partition. e.g.
>
> Name Path
> -----------------------------------------
> 3600a0b80005ad1d7000093604cae912fp1 /dev/mapper/3600a0b80005ad1d7000093604cae912fp1
>
> Error: Expecting a partition number.
>
> This patch introduces 'dmsetup' to fix it.
>
> @@ -1748,14 +1755,17 @@ if test "$with_storage_disk" = "yes" ||
> CFLAGS="$save_CFLAGS"
> fi
>
> - if test "$PARTED_FOUND" = "no" ; then
> - if test "$with_storage_disk" = "yes" ; then
> - AC_MSG_ERROR([We need parted for disk storage driver])
> - else
> - with_storage_disk=no
> - fi
> - else
> - with_storage_disk=yes
> + if test "$with_storage_disk" = "yes" &&
> + test "$PARTED_FOUND:$DMSETUP_FOUND" != "yes:yes"; then
> + AC_MSG_ERROR([Need both parted and dmsetup for disk storage driver])
> + fi
> +
> + if test "$with_storage_disk" = "check"; then
> + if test "$PARTED_FOUND:$DMSETUP_FOUND" != "yes:yes"; then
> + with_storage_disk=no
> + else
> + with_storage_disk=yes
> + fi
This configure logic looks much better; thanks for persisting.
ACK; however, since this changes configure.ac and shuffles some link
libraries around in Makefile.am, I'd feel more comfortable postponing
this until after 0.8.8 is released, so that we don't introduce any
unintended compile failures compared to the release candidate.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110214/ccf90adb/attachment-0001.sig>
More information about the libvir-list
mailing list