Check mount count
Zur Navigation springen
Zur Suche springen
Wer kennst das nicht:
EXT3-fs warning: maximal mount count reached
es folgt ein checkforce, was nicht immer gewünscht ist.
Check current mount count
tune2fs -l /dev/md2|grep -i "mount count"
Script
#!/bin/bash
#
# 19.05.2008, J. Tietz
# prints max/current mount count of all filesystems (/dev/md*)
for part in `df -h|grep "/dev/md"|awk {'print $1'}`;do
echo Partition: $part;
tune2fs -l $part|grep -i "mount count";
echo " ";
done;
Result:
servername:~# ./mount_count.sh Partition: /dev/md3 Mount count: 5 Maximum mount count: 100 Partition: /dev/md1 Mount count: 5 Maximum mount count: 100 Partition: /dev/md2 Mount count: 5 Maximum mount count: 100 Partition: /dev/md4 Mount count: 5 Maximum mount count: 100