]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: lvm: lvcreate fails with allocation=0, don't do that
authorCole Robinson <crobinso@redhat.com>
Wed, 17 Oct 2012 00:30:23 +0000 (20:30 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 17 Oct 2012 01:16:44 +0000 (21:16 -0400)
commit9f0e9cba27b3e2b8409f2ce1c0ed4d24d677be9b
treec7abf6ecbc82dda0edd397987ece29b96b5223a7
parent01df6f2bff98d8fc68350ab90c212780ef9db67a
storage: lvm: lvcreate fails with allocation=0, don't do that

On F17 at least, this command fails:

$ sudo /usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt
  Unable to create new logical volume with no extents

Which is unfortunate since allocation=0 is what virt-manager tries to use
by default.

Rather than telling the user 'don't do that', let's just give them the
smallest allocation possible if alloc=0 is requested.

https://bugzilla.redhat.com/show_bug.cgi?id=866481
src/storage/storage_backend_logical.c