Alan Pevec
2008-Sep-24 17:03 UTC
[Ovirt-devel] [PATCH node] retry mounting OVIRT partition
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
Perry N. Myers
2008-Sep-26 11:38 UTC
[Ovirt-devel] [PATCH node] retry mounting OVIRT partition
Alan Pevec wrote:> workaround, when ro mount fails but rw succeedsThis 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 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 > } >-- |=- Red Hat, Engineering, Emerging Technologies, Boston -=| |=- Email: pmyers at redhat.com -=| |=- Office: +1 412 474 3552 Mobile: +1 703 362 9622 -=| |=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|