[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST 3/3] Debian: erase-other-disks: rescan partition tables after erasing whole disk



This appears to happen anyway, but force it to be sure.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 Osstest/Debian.pm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 20f3de7..e7b5538 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1053,6 +1053,14 @@ zero () {
     fi
 }
 
+rescan () {
+    if ! test -b \${dev}; then
+       return
+    fi
+    log "Rescaning partition table on \${dev}"
+    echo 1 > /sys/block/\${dev#/dev/}/device/rescan
+}
+
 udevadm settle
 for sd in sd hd; do
     log "\${sd} devices present before: `echo /dev/\${sd}*`"
@@ -1063,6 +1071,7 @@ for sd in sd hd; do
 
         dev=/dev/\${sd}\${b}
         zero
+        rescan
     done
     udevadm settle
     log "\${sd} devices present after: `echo /dev/\${sd}*`"
-- 
2.6.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.