[Ovirt-devel] [PATCH node] retry mounting OVIRT partition

Alan Pevec apevec at redhat.com
Wed Sep 24 17:03:29 UTC 2008


workaround, when ro mount fails but rw succeeds

Signed-off-by: Alan Pevec <apevec at redhat.com>
---
 scripts/ovirt-functions |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 68e9aa3..e251eac 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -50,9 +50,11 @@ ovirt_setup_libvirtd() {
 
 ovirt_mount() {
     if [ -e /dev/disk/by-label/$OVIRT_LABEL ]; then
-      mount -r /dev/disk/by-label/$OVIRT_LABEL $1
+      mount -r /dev/disk/by-label/$OVIRT_LABEL $1 \
+        || mount /dev/disk/by-label/$OVIRT_LABEL $1
     else
-      mount -r /dev/live $1
+      mount -r /dev/live $1 \
+        || mount /dev/live $1
     fi
 }
 
-- 
1.5.5.1




More information about the ovirt-devel mailing list