0

From man mount errors=continue in /etc/fstab means:

ignore errors and just mark the file system erroneous and continue

Where is the filesystem marked erroneous? I would like to set up an alert based on this (cron->email for example), but don't know what to check for the error state.

Magneon
  • 193
  • 5

1 Answers1

1

According to the filesystem howto:

Ext2fs keeps track of the filesystem state. A special field in the superblock is used by the kernel code to indicate the status of the file system. When a filesystem is mounted in read/write mode, its state is set to Not Clean. When it is unmounted or remounted in read-only mode, its state is reset to Clean. At boot time, the filesystem checker uses this information to decide if a filesystem must be checked. The kernel code also records errors in this field. When an inconsistency is detected by the kernel code, the filesystem is marked as Erroneous.

So you're probably looking for device states that do not mention "clean", or otherwise match grep -i error; dumpe2fs should show the state.

$ dumpe2fs -h /dev/sda1 | grep state
dumpe2fs 1.42.9 (28-Dec-2013)
Filesystem state:         not clean
$
thrig
  • 1,626
  • 9
  • 9