Bug 673455
Summary: | Capacity and allocation sizes display much bigger than defined in LVM based volumes | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Min Zhan <mzhan> |
Component: | libvirt | Assignee: | Osier Yang <jyang> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | dallan, dyuan, eblake, jyang, llim, mzhan, xen-maint, yoyzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-01-28 10:10:25 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Min Zhan
2011-01-28 09:38:37 UTC
libvirt uses lvcreate to create logical volume, and the command according to above xml "vol.xml" is: /sbin/lvcreate --name vol -L 2097153K /dev/test Tried with above command directly: [root@dhcp ~]# /sbin/lvcreate --name vol2 -L 2097153K /dev/test Rounding up size to full physical extent 2.00 GiB Logical volume "vol2" created lvm> lvdisplay --units k --- Logical volume --- LV Name /dev/test/vol2 VG Name test LV UUID ECr9uN-bVX2-hQLD-c119-e72s-DWvT-QHAMha LV Write Access read/write LV Status available # open 0 LV Size 2101248.00 KiB Current LE 513 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 lvm> lvdisplay --- Logical volume --- LV Name /dev/test/vol2 VG Name test LV UUID ECr9uN-bVX2-hQLD-c119-e72s-DWvT-QHAMha LV Write Access read/write LV Status available # open 0 LV Size 2.00 GiB Current LE 513 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 So, we pass the correct size to lvcreate, and also gets correct size of the volume, the problem here is "lvcreate" rounds up the size. 2 more examples: --------------------------- [root@dhcp ~]# /sbin/lvcreate --name vol3 -L 2097152K /dev/test Logical volume "vol3" created [root@dhcp ~]# /sbin/lvcreate --name vol4 -L 2097151K /dev/test Rounding up size to full physical extent 2.00 GiB Logical volume "vol4" created And it's resonable for lvcreate doing like so, as if it rounds down the capacity, there will be a bug for lvm (user will fail when trying to write to the volume with the size he specified), just like https://bugzilla.redhat.com/show_bug.cgi?id=670529 for libvirt. Thus, close it as NOTABUG. |