Unable to create volumes on disk pools as parted support is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Undecided
|
Unassigned | ||
Natty |
Invalid
|
Undecided
|
Unassigned |
Bug Description
SRU justification:
1. IMPACT:
libvirt is unable to create partitions to support volumes in physical disk devices (or logical disk devices).
2. HOW WAS BUG ADDRESSED: parted was added to build dependencies so that ./configure will build with its support. (libparted-dev was already in build dependencies)
3. MINIMAL PATCH - see debdiff in comment #8.
4. TEST CASE (using lvm):
Create a new logical volume:
lvcreate -n sde -L 500M <vgname>
Initialise the volume using fdisk
fdisk /dev/mapper/
Create a new pool using this device (using attached sde.xml)
virsh pool-define sde.xml
virsh pool-start sde
Create a new volume in the pool:
virsh vol-create-as --pool sde --name 1 --capacity 100M --allocation 100M
4. REGRESSION POTENTIAL - libvirt will now be built with support for parted, so any previously hidden bugs in that support could now come to light.
ORIGINAL BUG REPORT:
Ubuntu 10.10 x64
libvirt-bin:
Installed: 0.8.3-1ubuntu14
Candidate: 0.8.3-1ubuntu14
Error:
root@codis:
error: Failed to create vol 1
error: internal error ' /dev/sde mkpart --script primary ext2 17408B 106928639B' exited with non-zero status 1 and signal 0: libvir: error : cannot execute binary : No such file or directory
Similar error in syslog:
Jan 2 23:30:03 codis libvirtd: 23:30:03.221: error : virRunWithHook:857 : internal error ' /dev/sde mkpart --script primary 1000341504B 1524629503B' exited with non-zero status 1 and signal 0: libvir: error : cannot execute binary : No such file or directory#012
Pool "sde" is a disk pool using GPT format:
<pool type='disk'>
<name>sde</name>
<uuid>
<capacity>
<allocation>
<available>
<source>
<device path='/dev/sde'/>
<format type='gpt'/>
</source>
<target>
<path>
<permissions>
<
<
<
</permissions>
</target>
</pool>
From build log, looks like parted headers are found, but not the binary, causing an empty DEFINE in config.h
Really this should be handled more gracefully, but that's another story....
https:/
checking for DEVMAPPER... yes
checking for parted... no
checking parted/parted.h usability... yes
checking parted/parted.h presence... yes
checking for parted/parted.h... yes
checking for uuid_generate in -luuid... yes
checking for ped_device_read in -lparted... yes
Manually rebuilding it locally fixed the problem for me...
tags: | added: disk kvm maverick pool virsh |
description: | updated |
tags: | added: testcase |
Changed in libvirt (Ubuntu Natty): | |
status: | Fix Committed → Invalid |
Reproduced against a logical volume (used in a physical disk device pool) in 10.10 x64