[node-patches] Change in ovirt-node[master]: Also dd GPT labels
rbarry at redhat.com
rbarry at redhat.com
Thu Oct 30 16:48:16 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Also dd GPT labels
......................................................................
Also dd GPT labels
wipefs may have problems with GPT labels on 4k disks. Get rid of
them.
Change-Id: Iced15d58939b8e7e4e86d274d1c46123500e3e6d
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirtnode/ovirtfunctions.py
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/76/34676/1
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index be828a3..239d4ee 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1365,15 +1365,15 @@
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 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")
+ system_closefds("dd if=/dev/zero of=\""+ drive +"\" bs=1024K count=1 &>>" + OVIRT_TMP_LOGFILE)
## zero out the GPT secondary header
- #logger.info("Wiping secondary gpt header")
- #disk_kb = subprocess_closefds("sfdisk -s \""+ drive +"\" 2>/dev/null", shell=True, stdout=PIPE, stderr=STDOUT)
- #disk_kb_count = disk_kb.stdout.read()
- #system_closefds("dd if=/dev/zero of=\"" +drive +"\" bs=1024 seek=$(("+ disk_kb_count+" - 1)) count=1 &>>" + OVIRT_TMP_LOGFILE)
+ logger.info("Wiping secondary gpt header")
+ disk_kb = subprocess_closefds("sfdisk -s \""+ drive +"\" 2>/dev/null", shell=True, stdout=PIPE, stderr=STDOUT)
+ disk_kb_count = disk_kb.stdout.read()
+ system_closefds("dd if=/dev/zero of=\"" +drive +"\" bs=1024 seek=$(("+ disk_kb_count+" - 1)) count=1 &>>" + OVIRT_TMP_LOGFILE)
system_closefds("sync")
def test_ntp_configuration(self):
--
To view, visit http://gerrit.ovirt.org/34676
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iced15d58939b8e7e4e86d274d1c46123500e3e6d
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