we want to check the filesystem on the disks as /deb/sdc .... /dev/sdg on each linux redhat machine
the target is to find what are the disks that required e2fsck ( as e2fsck -y /dev/sdb . etc )
according to man page
-n Open the filesystem read-only, and assume an answer of `no' to all questions. Allows e2fsck to be used non-interactively. This option may not be specified at the same time as the -p or -y options.
when we run the command ( only example )
e2fsck -n /dev/sdXX
e2fsck 1.42.9 (28-Dec-2013) Warning! /dev/sdc is mounted. Warning: skipping journal recovery because doing a read-only filesystem check. /dev/sdc: clean, 94/1310720 files, 156685/5242880 blocks
so what need to capture from e2fsck output , that required to run e2fsck ?
init 1 umount /dev/sdXX e2fsck -y /dev/sdXX ( or e2fsck -C /dev/sdXX for full details ) init 3