mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5559 Add CIFS support in ssvm-check script
This commit is contained in:
parent
bd639bf145
commit
dde7a5f43e
@ -34,6 +34,10 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
isCifs() {
|
||||||
|
mount | grep "type cifs" > /dev/null
|
||||||
|
echo $?
|
||||||
|
}
|
||||||
|
|
||||||
# ping dns server
|
# ping dns server
|
||||||
echo ================================================
|
echo ================================================
|
||||||
@ -67,12 +71,18 @@ fi
|
|||||||
|
|
||||||
# check to see if we have the NFS volume mounted
|
# check to see if we have the NFS volume mounted
|
||||||
echo ================================================
|
echo ================================================
|
||||||
mount|grep -v sunrpc|grep -v rpc_pipefs|grep nfs 1> /dev/null 2>&1
|
storage="cifs"
|
||||||
|
if [ $(isCifs) -ne 0 ] ;
|
||||||
|
then
|
||||||
|
storage="nfs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mount|grep -v sunrpc|grep -v rpc_pipefs|grep $storage 1> /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "NFS is currently mounted"
|
echo "$storage is currently mounted"
|
||||||
# check for write access
|
# check for write access
|
||||||
for MOUNTPT in `mount|grep -v sunrpc|grep -v rpc_pipefs|grep nfs| awk '{print $3}'`
|
for MOUNTPT in `mount|grep -v sunrpc|grep -v rpc_pipefs|grep $storage| awk '{print $3}'`
|
||||||
do
|
do
|
||||||
if [ $MOUNTPT != "/proc/xen" ] # mounted by xen
|
if [ $MOUNTPT != "/proc/xen" ] # mounted by xen
|
||||||
then
|
then
|
||||||
@ -96,9 +106,9 @@ else
|
|||||||
ping -c 2 $NFSSERVER
|
ping -c 2 $NFSSERVER
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Good: Can ping NFS server"
|
echo "Good: Can ping $storage server"
|
||||||
else
|
else
|
||||||
echo "WARNING: cannot ping NFS server"
|
echo "WARNING: cannot ping $storage server"
|
||||||
echo routing table follows
|
echo routing table follows
|
||||||
route -n
|
route -n
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user