From: "Brian J. Murrell" <brian@interlinx.bc.ca>
To: linux-ext4@vger.kernel.org
Subject: Re: e2scrub finds corruption immediately after mounting
Date: Thu, 04 Jan 2024 09:13:53 -0500 [thread overview]
Message-ID: <cf4fb33f3a60629d3b6108c1c206aa5b931d8498.camel@interlinx.bc.ca> (raw)
In-Reply-To: <20240104045540.GD36164@frogsfrogsfrogs>
[-- Attachment #1: Type: text/plain, Size: 3951 bytes --]
On Wed, 2024-01-03 at 20:55 -0800, Darrick J. Wong wrote:
> Curious. Normally e2scrub will run e2fsck twice: Once in journal-
> only
> preen mode to replay the journal, then again with -fy to perform the
> full filesystem (snapshot) check.
It is doing that. I suspect the first e2fsck is silent.
> I wonder if you would paste the output of
> "bash -x e2scrub /dev/rootvol_tmp/almalinux8_opt" here? I'd be
> curious
> to see what the command flow is.
Sure.
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/.dotnet/tools
+ (( 0 != 0 ))
+ snap_size_mb=256
+ fstrim=0
+ reap=0
+ e2fsck_opts=
+ conffile=/etc/e2scrub.conf
+ test -f /etc/e2scrub.conf
+ . /etc/e2scrub.conf
++ periodic_e2scrub=1
++ sender=e2scrub@pvr.interlinx.bc.ca
+ getopts nrtV opt
+ shift 0
+ arg=/dev/rootvol_tmp/almalinux8_opt
+ '[' -z /dev/rootvol_tmp/almalinux8_opt ']'
+ type lsblk
+ type lvcreate
+ exec
+ '[' -b /dev/rootvol_tmp/almalinux8_opt ']'
++ dev_from_arg /dev/rootvol_tmp/almalinux8_opt
++ local dev=/dev/rootvol_tmp/almalinux8_opt
+++ lsblk -o FSTYPE -n /dev/rootvol_tmp/almalinux8_opt
++ local fstype=ext2
++ case "${fstype}" in
++ echo /dev/rootvol_tmp/almalinux8_opt
++ return 0
+ dev=/dev/rootvol_tmp/almalinux8_opt
++ mnt_from_dev /dev/rootvol_tmp/almalinux8_opt
++ local dev=/dev/rootvol_tmp/almalinux8_opt
++ '[' -n /dev/rootvol_tmp/almalinux8_opt ']'
++ lsblk -o MOUNTPOINT -n /dev/rootvol_tmp/almalinux8_opt
+ mnt=/opt
+ '[' '!' -e /dev/rootvol_tmp/almalinux8_opt ']'
++ lvs --nameprefixes -o name,vgname,lv_role --noheadings /dev/rootvol_tmp/almalinux8_opt
+ lvm_vars=' LVM2_LV_NAME='\''almalinux8_opt'\'' LVM2_VG_NAME='\''rootvol_tmp'\'' LVM2_LV_ROLE='\''public'\'''
+ eval ' LVM2_LV_NAME='\''almalinux8_opt'\'' LVM2_VG_NAME='\''rootvol_tmp'\'' LVM2_LV_ROLE='\''public'\'''
++ LVM2_LV_NAME=almalinux8_opt
++ LVM2_VG_NAME=rootvol_tmp
++ LVM2_LV_ROLE=public
+ '[' -z rootvol_tmp ']'
+ '[' -z almalinux8_opt ']'
+ echo public
+ grep -q snapshot
++ date +%Y%m%d%H%M%S
+ start_time=20240104091039
+ snap=almalinux8_opt.e2scrub
+ snap_dev=/dev/rootvol_tmp/almalinux8_opt.e2scrub
+ '[' 0 -gt 0 ']'
+ setup
++ date +%s
+ lvremove_deadline=1704377469
+ lvremove -f rootvol_tmp/almalinux8_opt.e2scrub
+ '[' -e /dev/rootvol_tmp/almalinux8_opt.e2scrub ']'
+ '[' -e /dev/rootvol_tmp/almalinux8_opt.e2scrub ']'
+ lvcreate -s -L 256m -n almalinux8_opt.e2scrub rootvol_tmp/almalinux8_opt
Logical volume "almalinux8_opt.e2scrub" created.
+ '[' 0 -ne 0 ']'
+ udevadm settle
+ return 0
+ trap 'teardown; exit 1' EXIT INT QUIT TERM
+ check
+ E2FSCK_FIXES_ONLY=1
+ export E2FSCK_FIXES_ONLY
+ /usr/sbin/e2fsck -E journal_only -p /dev/rootvol_tmp/almalinux8_opt.e2scrub
+ /usr/sbin/e2fsck -f -y /dev/rootvol_tmp/almalinux8_opt.e2scrub
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/rootvol_tmp/almalinux8_opt.e2scrub: 1698/178816 files (87.0% non-contiguous), 482473/716800 blocks
+ case "$?" in
++ lvs -o lv_snapshot_invalid --noheadings /dev/rootvol_tmp/almalinux8_opt.e2scrub
++ awk '{print $1}'
+ is_invalid=
+ '[' -n '' ']'
+ echo '/dev/rootvol_tmp/almalinux8_opt: Scrub FAILED due to corruption! Unmount and run e2fsck -y.'
/dev/rootvol_tmp/almalinux8_opt: Scrub FAILED due to corruption! Unmount and run e2fsck -y.
+ mark_corrupt
+ /usr/sbin/tune2fs -E force_fsck /dev/rootvol_tmp/almalinux8_opt
tune2fs 1.47.0 (5-Feb-2023)
Setting filesystem error flag to force fsck.
+ ret=6
+ teardown
+ lvremove -f rootvol_tmp/almalinux8_opt.e2scrub
Logical volume "almalinux8_opt.e2scrub" successfully removed.
+ '[' -e /dev/rootvol_tmp/almalinux8_opt.e2scrub ']'
+ trap '' EXIT
+ exitcode 6
+ ret=6
+ '[' -n '' -a 6 -ne 0 ']'
+ exit 6
Cheers,
b.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-01-04 14:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 21:14 e2scrub finds corruption immediately after mounting Brian J. Murrell
2024-01-04 4:38 ` Theodore Ts'o
2024-01-04 14:10 ` Brian J. Murrell
2024-01-04 4:55 ` Darrick J. Wong
2024-01-04 14:13 ` Brian J. Murrell [this message]
2024-01-08 12:52 ` Brian J. Murrell
2024-01-09 6:06 ` Darrick J. Wong
2024-01-10 5:31 ` Darrick J. Wong
2024-01-10 13:44 ` Brian J. Murrell
2024-01-10 18:06 ` Darrick J. Wong
2024-01-10 23:43 ` Andreas Dilger
2024-01-16 13:29 ` Brian J. Murrell
2024-01-16 13:22 ` Brian J. Murrell
2024-01-17 19:42 ` Andreas Dilger
2024-01-17 22:20 ` Brian J. Murrell
2024-01-04 14:37 ` Brian J. Murrell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf4fb33f3a60629d3b6108c1c206aa5b931d8498.camel@interlinx.bc.ca \
--to=brian@interlinx.bc.ca \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).