From f6b02aa032a82bcdcd4bc26a688f7ef1f71e6a36 Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Fri, 27 May 2011 12:21:30 +0530 Subject: [PATCH] bug 10065 : multiple secondary storage support required for ssvm-check.sh status 10065: resolved fixed checking status of multiple sec storages. the cmdline remains same --- console-proxy/scripts/ssvm-check.sh | 31 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/console-proxy/scripts/ssvm-check.sh b/console-proxy/scripts/ssvm-check.sh index e779e95fe25..4375e2b4369 100644 --- a/console-proxy/scripts/ssvm-check.sh +++ b/console-proxy/scripts/ssvm-check.sh @@ -1,7 +1,4 @@ #!/bin/bash - - - # # Copyright (C) 2010 Cloud.com, Inc. All rights reserved. # @@ -71,19 +68,23 @@ mount|grep -v sunrpc|grep nfs 1> /dev/null 2>&1 if [ $? -eq 0 ] then echo "NFS is currently mounted" - # check for write access - MOUNTPT=`mount|grep -v sunrpc|grep nfs| awk '{print $3}'` - echo Mount point is $MOUNTPT - touch $MOUNTPT/foo - if [ $? -eq 0 ] - then - echo "Good: Can write to mount point" - rm $MOUNTPT/foo - else - echo "ERROR: Cannot write to mount point" - echo "You need to export with norootsquash" - fi + for MOUNTPT in `mount|grep -v sunrpc|grep nfs| awk '{print $3}'` + do + if [ $MOUNTPT != "/proc/xen" ] # mounted by xen + then + echo Mount point is $MOUNTPT + touch $MOUNTPT/foo + if [ $? -eq 0 ] + then + echo "Good: Can write to mount point" + rm $MOUNTPT/foo + else + echo "ERROR: Cannot write to mount point" + echo "You need to export with norootsquash" + fi + fi + done else echo "ERROR: NFS is not currently mounted" echo "Try manually mounting from inside the VM"