#!/bin/sh # # xfs filesystem check and repair # script is not the final version case "$1" in info) xfs_info /mnt/data ;; check) . /etc/init.d/rc.functions echo "start xfs filesystem check for data partition" xfs_repair -n /dev/sda2 ;; repair) . /etc/init.d/rc.functions echo "starting xfs filesystem repair" xfs_repair -L /dev/sda2 ;; *) echo "Usage $0 {check, repair or info}" >&2 exit 1 esac