New patch submitted by Juan Hernandez (juan.hernandez(a)redhat.com)
You can review this change at:
http://gerrit.usersys.redhat.com/734
commit f35033484a7e8d32b32077c3cd8f2bdaa14c363c
Author: Juan Hernandez <juan.hernandez(a)redhat.com>
Date: Fri Jul 22 20:56:33 2011 +0200
BZ#716964 - Add "devcapacity" to PV info
Add a new "devcapacity" field to the PV info provided by VDSM.
This is obtained from the "dev_size" from "pvs". This and change
Ic0bd3c94a6e4999cb91f96c798a0108890321fbd in RHEV-M are required
to fix the bug.
Change-Id: Ic0bd3c94a6e4999cb91f96c798a0108890321fbd
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index ef472af..f0294e7 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1398,6 +1398,7 @@ class HSM:
info["fwrev"] = "0000"
info["devtype"] = devtype
info["capacity"] = str(pv.size)
+ info["devcapacity"] = str(pv.dev_size)
info["vgUUID"] = str(pv.vg_uuid)
info["pvUUID"] = str(pv.uuid)
info["GUID"] = str(pv.guid)
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index ef60c02..076b776 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -131,7 +131,7 @@ log = logging.getLogger("Storage.LVM")
LVM_DEFAULT_TTL = 100
-PV_FIELDS =
"uuid,name,size,vg_name,vg_uuid,pe_start,pe_count,pe_alloc_count,mda_count"
+PV_FIELDS =
"uuid,name,size,vg_name,vg_uuid,pe_start,pe_count,pe_alloc_count,mda_count,dev_size"
VG_FIELDS =
"uuid,name,attr,size,free,extent_size,extent_count,free_count,tags"
LV_FIELDS = "uuid,name,vg_name,attr,size,seg_start_pe,devices,tags"