[node-patches] Change in ovirt-node[master]: remove partition table during reinstall

jboggs at redhat.com jboggs at redhat.com
Thu Apr 4 21:59:37 UTC 2013


Joey Boggs has uploaded a new change for review.

Change subject: remove partition table during reinstall
......................................................................

remove partition table during reinstall

rhbz#903894

Change-Id: I5cfd6223edf79843b824603083041c64d9521dbd
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M dracut/ovirt-cleanup.sh
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/25/13625/1

diff --git a/dracut/ovirt-cleanup.sh b/dracut/ovirt-cleanup.sh
index 8717c8c..6019c97 100755
--- a/dracut/ovirt-cleanup.sh
+++ b/dracut/ovirt-cleanup.sh
@@ -151,6 +151,11 @@
         fi
         info "Found and removing pv: $pv"
         yes | lvm pvremove -ff "$pv"
+        # remove partition table
+        disk="$(echo "$pv"|sed 's ..$  ')"
+        info "Removing partition table for: $disk"
+        kpartx -d "$disk"
+        dd if=/dev/zero of="$disk" bs=1024k count=1
     done
     IFS=,
     if [ -f "/etc/lvm/lvm.conf" ]; then


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cfd6223edf79843b824603083041c64d9521dbd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>



More information about the node-patches mailing list