[node-patches] Change in ovirt-node[node-3.0]: Use parted to rewrite the disklabel

rbarry at redhat.com rbarry at redhat.com
Mon Nov 24 19:14:38 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(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/90/35490/1

diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index bed45ca..0456153 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1371,7 +1371,8 @@
         if "HostVG" in lv:
             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("wipefs -a \""+ drive +"\" &>>" + OVIRT_TMP_LOGFILE)
     ## zero out the GPT secondary header


-- 
To view, visit http://gerrit.ovirt.org/35490
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaaf40e8de8a4388c96c0a932a04d46d25501f177
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: node-3.0
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list