#!/bin/bash dir='/proc/fs/lustre/mdt/' if [[ ! -d ${dir} ]] then echo "Either this is not an active MDS or Lustre is not started" exit fi cnt=$(ls -1 ${dir} | grep MDT | wc -l) if ((cnt < 1)) then echo "lustre is started -- but no MDTs are present on this machine" exit fi # peocess each MDT for mdt in $(ls -1 ${dir} | grep MDT) do ans=$(lctl get_param mdt.${mdt}.identity_upcall | awk -F'=' '{print $2}') if [[ 'X' == "X${ans}" ]] then echo "lctl get_param mdt.${mdt}.identity_upcall produced unexpected results!" fi if [[ 'NONE' != "${ans}" ]] then logger "The following command was executed: lctl set_param mdt.${mdt}.identity_upcall=NONE" lctl set_param mdt.${mdt}.identity_upcall=NONE fi done