#!/bin/bash PROCPATH='/proc/fs/lustre/osc/' # get list of all file systems mounted FSs=$(cd ${PROCPATH}; ls *-osc -1d | awk -F'-' '{print $1}' | sort -u) for fs in ${FSs} do printf "Lustre File System: %s\n" ${fs} OSTs=$(cd ${PROCPATH}; ls ${fs}-*-osc -1d | awk -F'-' '{print $2}') ## printf "\tOSTs ==>" # Display list of all OSTs ## for ost in ${OSTs} ## do ## printf "%s " ${ost} ## done ## printf "\n" # Show node that each OST lives on for ost in ${OSTs} do addr=$(cat ${PROCPATH}/${fs}-${ost}-osc/ost_conn_uuid | awk -F'@' '{print $1}') node=$(grep ${addr} /etc/hosts | awk '{print $2}') if [[ 'X' == 'X${node}' ]] then node="${addr}" fi ## printf "\t\t%s %s\n" ${ost} ${node} printf "\t%s %s\n" ${ost} ${node} done done