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

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



Alan Pevec wrote:
workaround, when ro mount fails but rw succeeds

This seems counter-intuitive... You would think that rw would fail and ro would be the fallback. What kind of partitions allow rw but *not* ro?

On the other hand, if this is the behavior you're seeing and the below patch fixes this then it probably should be committed. So ACK

Perry

Signed-off-by: Alan Pevec <apevec 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
 }

--
|=-        Red Hat, Engineering, Emerging Technologies, Boston        -=|
|=-                     Email: pmyers redhat com                      -=|
|=-         Office: +1 412 474 3552   Mobile: +1 703 362 9622         -=|
|=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|


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