[NEW PATCH] BZ#725720 Add "devcapacity" to PV info (via gerrit-bot)

Dan Kenigsberg danken at redhat.com
Mon Aug 1 07:30:36 UTC 2011


New patch submitted by Dan Kenigsberg (danken at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/734

commit cc54ef8239ed183082759cac8313c6fb92dedd2e
Author: Juan Hernandez <juan.hernandez at redhat.com>
Date:   Sat Jul 23 11:31:02 2011 +0200

    BZ#725720 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 bug #716964 in RHEV-M.
    
    Change-Id: Ic0bd3c94a6e4999cb91f96c798a0108890321fbd

diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 558e162..55176c9 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1401,6 +1401,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 9c62c00..e4ee9f4 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -133,7 +133,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"
 




More information about the vdsm-patches mailing list