e2fsck -n + how to know if need to run e2fsck in order to fix corrupted blocks?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
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
we get
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 ?
e2fsck process
init 1
umount /dev/sdXX
e2fsck -y /dev/sdXX ( or e2fsck -C /dev/sdXX for full details )
init 3
linux filesystems disk fsck e2fsck
add a comment |Â
up vote
0
down vote
favorite
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
we get
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 ?
e2fsck process
init 1
umount /dev/sdXX
e2fsck -y /dev/sdXX ( or e2fsck -C /dev/sdXX for full details )
init 3
linux filesystems disk fsck e2fsck
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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
we get
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 ?
e2fsck process
init 1
umount /dev/sdXX
e2fsck -y /dev/sdXX ( or e2fsck -C /dev/sdXX for full details )
init 3
linux filesystems disk fsck e2fsck
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
we get
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 ?
e2fsck process
init 1
umount /dev/sdXX
e2fsck -y /dev/sdXX ( or e2fsck -C /dev/sdXX for full details )
init 3
linux filesystems disk fsck e2fsck
edited Nov 12 '17 at 14:44
asked Nov 12 '17 at 14:27
yael
2,0251145
2,0251145
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You probably are looking for the output of tune2fs rather than e2fsck
tune2fs -l /dev/sdXX |grep "Filesystem state|Last checked|Check interval"
which should yield something like this:
Filesystem state: clean
Last checked: Mon Nov 28 16:03:44 2016
Check interval: 31536000 (12 months)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You probably are looking for the output of tune2fs rather than e2fsck
tune2fs -l /dev/sdXX |grep "Filesystem state|Last checked|Check interval"
which should yield something like this:
Filesystem state: clean
Last checked: Mon Nov 28 16:03:44 2016
Check interval: 31536000 (12 months)
add a comment |Â
up vote
1
down vote
accepted
You probably are looking for the output of tune2fs rather than e2fsck
tune2fs -l /dev/sdXX |grep "Filesystem state|Last checked|Check interval"
which should yield something like this:
Filesystem state: clean
Last checked: Mon Nov 28 16:03:44 2016
Check interval: 31536000 (12 months)
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You probably are looking for the output of tune2fs rather than e2fsck
tune2fs -l /dev/sdXX |grep "Filesystem state|Last checked|Check interval"
which should yield something like this:
Filesystem state: clean
Last checked: Mon Nov 28 16:03:44 2016
Check interval: 31536000 (12 months)
You probably are looking for the output of tune2fs rather than e2fsck
tune2fs -l /dev/sdXX |grep "Filesystem state|Last checked|Check interval"
which should yield something like this:
Filesystem state: clean
Last checked: Mon Nov 28 16:03:44 2016
Check interval: 31536000 (12 months)
answered Nov 26 '17 at 4:46
RubberStamp
1,4551216
1,4551216
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f404047%2fe2fsck-n-how-to-know-if-need-to-run-e2fsck-in-order-to-fix-corrupted-blocks%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password