Change in vdsm[ovirt-3.5-gluster]: gluster: create pv with custom dataalignment value
tjeyasin at redhat.com
tjeyasin at redhat.com
Tue Aug 25 07:09:35 UTC 2015
Hello Piotr Kliczewski, Nir Soffer, Bala.FA, Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/45278
to review the following change.
Change subject: gluster: create pv with custom dataalignment value
......................................................................
gluster: create pv with custom dataalignment value
Blivet creates pv with 1mb dataalignment forcefully for
whatever given value. This patch uses lvm pvcreate command till
this bug fixed in blivet.
Change-Id: I5eb58f81679729af4d3dc34bc9f7edba757acc67
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1225831
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/42782
Continuous-Integration: Jenkins CI
Reviewed-by: Bala.FA <barumuga at redhat.com>
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin at redhat.com>
---
M vdsm/gluster/storagedev.py
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/45278/1
diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py
index eb8b103..af250417 100644
--- a/vdsm/gluster/storagedev.py
+++ b/vdsm/gluster/storagedev.py
@@ -32,7 +32,6 @@
from blivet.devices import LVMThinLogicalVolumeDevice
from blivet import udev
-import storage.lvm as lvm
from vdsm import utils
import fstab
@@ -41,6 +40,9 @@
log = logging.getLogger("Gluster")
+_pvCreateCommandPath = utils.CommandPath("pvcreate",
+ "/sbin/pvcreate",
+ "/usr/sbin/pvcreate",)
_vgCreateCommandPath = utils.CommandPath("vgcreate",
"/sbin/vgcreate",
"/usr/sbin/vgcreate",)
@@ -156,9 +158,12 @@
def _createPV(deviceList, alignment=0):
def _createAlignedPV(deviceList, alignment):
for dev in deviceList:
- rc, out, err = lvm._createpv(
- [dev.path], metadataSize=0,
- options=('--dataalignment', '%sK' % alignment))
+ # bz#1178705: Blivet always creates pv with 1MB dataalignment
+ # Workaround: Till blivet fixes the issue, we use lvm pvcreate
+ rc, out, err = utils.execCmd([_pvCreateCommandPath.cmd,
+ '--dataalignment',
+ '%sk' % alignment,
+ dev.path])
if rc:
raise ge.GlusterHostStorageDevicePVCreateFailedException(
dev.path, alignment, rc, out, err)
--
To view, visit https://gerrit.ovirt.org/45278
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5eb58f81679729af4d3dc34bc9f7edba757acc67
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5-gluster
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
More information about the vdsm-patches
mailing list