#!/bin/bash ############################################################################# ##### ##### ##### OSIRIDE ##### ##### ##### ##### Do not manually modify this file (it will be overwritten) ##### ############################################################################# # # lustremount Script start e stop per lustre # # chkconfig: - 40 26 # description: Script start e stop per lustre source /etc/lustre.conf /sbin/modprobe lnet /sbin/modprobe lustre start() { logger -t lustre_mclient "Ambiente $ENV_LUSTRE macchina $HOSTNAME script mount client lustre start beetween $SLP_INIT seconds" sleep $SLP_INIT for S in `seq 1 10`; do RETVAL=0 /sbin/mount.lustre -o $OPTIONS $MGS_PRI@tcp:$MGS_SEC@tcp:$FILESYSTEM $FILESYSTEM RETVAL=$? if [ "$RETVAL" -eq 0 ]; then logger -t lustre_mclient "Ambiente $ENV_LUSTRE macchina $HOSTNAME client mount success" break else logger -t lustre_mclient "Ambiente $ENV_LUSTRE macchina $HOSTNAME ERROR Lustre client - try $S/10 - attempt to connect clients between $SLP_ERR sec" sleep $SLP_ERR fi done } stop() { RETVAL=0 /bin/umount $FILESYSTEM RETVAL=$? if [ "$RETVAL" -eq 0 ]; then logger -t lustre_mclient "Ambiente $ENV_LUSTRE macchina $HOSTNAME client umount success" exit $RETVAL else logger -t lustre_mclient "Ambiente $ENV_LUSTRE macchina $HOSTNAME ERROR Lustre umount - force umount between $SLP_ERR sec" sleep $SLP_ERR /bin/umount -fl $FILESYSTEM fi } case "$1" in start) start ;; stop) stop ;; *) echo $"Usage: $0 {start|stop}" RETVAL=2 esac exit $RETVAL