[node-patches] Change in ovirt-node[master]: Use parted to rewrite the disklabel
rbarry at redhat.com
rbarry at redhat.com
Tue Nov 4 14:06:18 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Use parted to rewrite the disklabel
......................................................................
Use parted to rewrite the disklabel
Make an msdos disklabel, followed by a gpt disklabel, so we can
try to make sure the initial GPT label is gone.
Change-Id: Iaaf40e8de8a4388c96c0a932a04d46d25501f177
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1158044
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirtnode/ovirtfunctions.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/81/34781/1
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index be828a3..6a558ab 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1366,6 +1366,8 @@
system_closefds("dmsetup remove " +lv + " &>>" + OVIRT_TMP_LOGFILE)
logger.info("Wiping old boot sector")
# system_closefds("dd if=/dev/zero of=\""+ drive +"\" bs=1024K count=1 &>>" + OVIRT_TMP_LOGFILE)
+ system_closefds("parted -s \""+ drive +"\" mklabel msdos &>>" + OVIRT_TMP_LOGFILE)
+ system_closefds("parted -s \""+ drive +"\" mklabel gpt &>>" + OVIRT_TMP_LOGFILE)
system_closefds("parted -s \""+ drive +"\" mklabel loop &>>" + OVIRT_TMP_LOGFILE)
system_closefds("which systemctl 2>/dev/null >&2 && wipefs -af \""+ drive +"\" >>" + OVIRT_TMP_LOGFILE + "2>&1")
system_closefds("which systemctl 2>/dev/null >&2 || wipefs -a \""+ drive +"\" >>" + OVIRT_TMP_LOGFILE + "2>&1")
--
To view, visit http://gerrit.ovirt.org/34781
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaaf40e8de8a4388c96c0a932a04d46d25501f177
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list