Anmelden Seite Diskussion Versionen Go to the site toolbox

Check mount count

Aus CrazyLinux

Wer kennt das nicht:

EXT3-fs warning: maximal mount count reached

es folgt ein checkforce, was nicht immer gewünscht ist.

1 Check current mount count

tune2fs -l /dev/md2|grep -i "mount count"


2 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


3 Hint

from man fstab:

The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.

Site Toolbox:

Meine Werkzeuge
Creative Commons-Lizenz
Diese Seite wurde zuletzt am 19. Mai 2008 um 21:02 Uhr geändert. - Diese Seite wurde bisher 158-mal abgerufen. - Impressum - Über CrazyLinux
Bienenwachskerzen Baumkerzenhalter