#!/bin/bash cat /etc/fstab | grep -v '^#' | grep lustre | while read line do set ${line} LABEL="$1" MountPoint="$2" lbl=$(echo ${LABEL} | awk -F '=' '{print $1}') if [[ 'xLABEL' == "x${lbl}" ]] then label=$(echo ${LABEL} | sed 's/LABEL=//') FileSystem=$(findfs ${LABEL}) else FileSystem="${LABEL}" fi ActualLabel=$(e2label ${FileSystem}) echo "${LABEL} => ${MountPoint} => ${FileSystem} => ${ActualLabel}" done