Bug 868272

Summary: 3.1 - Save the correct (raw) volume size in the metadata during createVolume
Product: Red Hat Enterprise Linux 6 Reporter: Federico Simoncelli <fsimonce>
Component: vdsmAssignee: Federico Simoncelli <fsimonce>
Status: CLOSED ERRATA QA Contact: Dafna Ron <dron>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: abaron, achan, bazulay, cpelland, hateya, iheim, ilvovsky, lpeer, thildred, ykaul
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: vdsm-4.9.6-41.0 Doc Type: Bug Fix
Doc Text:
When a raw formatted volume smaller than a multiple of the LVM physical extent size is requested, the logical volume (LV) created will be a multiple of the physical extent (PE) size. Previously, the guest system using the volume used the larger volume but the getVolumeSize API request reported back the initial requested value. The size value of the metadata has been adjusted to reflect the actual size allocated to the volume.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:13:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Federico Simoncelli 2012-10-19 11:40:27 UTC
Description of problem:
When the volume format is raw what the disk capacity seen by the guest is the actual size of the file/device therefore if the requested size doesn't match the real size (eg: extends granularity in LVM) we need to update the size value so that the metadata reflects the correct state.

Version-Release number of selected component (if applicable):
vdsm-4.9.6-38.0.el6_3

How reproducible:
100%

Steps to Reproduce:
1. create a raw preallocated volume on iscsi using a size that is not a multiple of the lvm pe (128Mb by default), eg: 10Mb (using the restapi, the ui prevents it).
2. verify that the created lv is indeed using the pe granularity (128Mb)
3. getVolumeSize reports a capacity of 10Mb (while the guest would see a 128Mb disk).
  
Actual results:
The metadata doesn't reflect what the guest actually sees in terms of disk capacity.

Expected results:
The metadata should reflect what the guest actually sees in terms of disk capacity.

Comment 1 Federico Simoncelli 2012-10-19 11:41:36 UTC
commit 097acc6eab78a54e01d920b11621f57f908fd63b
Author: Federico Simoncelli <fsimonce>
Date:   Wed Oct 17 08:07:57 2012 -0400

    volume: save the correct size during creation
    
http://gerrit.ovirt.org/#/c/8629/

Comment 4 Jakub Libosvar 2012-11-06 11:24:15 UTC
Verified vdsm-4.9.6-41.0.el6_3.x86_64

Comment 6 errata-xmlrpc 2012-12-04 19:13:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1508.html