Re: fsck strange output

From: Kirk McKusick <mckusick_at_mckusick.com>
Date: Mon, 25 Jan 2021 15:40:12 -0800
> From: Rozhuk Ivan <rozhuk.im_at_gmail.com>
> Date: Mon, 25 Jan 2021 23:29:33 +0300
> To: freebsd-current_at_freebsd.org
> Cc: Rozhuk Ivan <Rozhuk.IM_at_gmail.com>
> Subject: fsck strange output
> 
> Hi!
> 
> I am on fresh 13 and on auto fsck got:
> 
> Jan 25 23:14:13 3des kernel: Starting file system checks:
> Jan 25 23:14:13 3des kernel: /dev/gptid/81241708-8948-11e9-b1ae-049226c061d6: CANNOT READ BLK: 11072
> Jan 25 23:14:13 3des kernel: /dev/gptid/81241708-8948-11e9-b1ae-049226c061d6: UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY.
> Jan 25 23:14:13 3des kernel: File system preen failed, trying fsck -y -T ffs:-R,-r -T ufs:-R,-r
> Jan 25 23:14:13 3des kernel: ** /dev/gptid/81241708-8948-11e9-b1ae-049226c061d6
> Jan 25 23:14:13 3des kernel: ** Last Mounted on /
> Jan 25 23:14:13 3des kernel: ** Root file system
> Jan 25 23:14:13 3des kernel: ** Phase 1 - Check Blocks and Sizes
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CANNOT READ BLK: 11072
> Jan 25 23:14:13 3des kernel: UNEXPECTED SOFT UPDATE INCONSISTENCY
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CONTINUE? yes
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: THE FOLLOWING DISK SECTORS COULD NOT BE READ:
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CANNOT READ BLK: 5129280
> Jan 25 23:14:13 3des kernel: UNEXPECTED SOFT UPDATE INCONSISTENCY
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CONTINUE? yes
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: THE FOLLOWING DISK SECTORS COULD NOT BE READ:
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CANNOT READ BLK: 6411520
> Jan 25 23:14:13 3des kernel: UNEXPECTED SOFT UPDATE INCONSISTENCY
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CONTINUE? yes
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: THE FOLLOWING DISK SECTORS COULD NOT BE READ:
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CANNOT READ BLK: 7693888
> Jan 25 23:14:13 3des kernel: UNEXPECTED SOFT UPDATE INCONSISTENCY
> Jan 25 23:14:13 3des kernel: 
> Jan 25 23:14:13 3des kernel: CONTINUE? yes
> ....
> 
> Disk is 100% alive, got same on other HW.
> fsck -y - have no this strange problem with reading.
> 
> Is it OK "CANNOT READ BLK ..." ?
> 
> 
> >From my rc.conf:
> fsck_y_enable="YES"		# Set to YES to do fsck -y if the initial preen fails.
> fsck_y_flags="-T ffs:-R,-r -T ufs:-R,-r" # Additional flags for fsck -y
> background_fsck="NO"		# Attempt to run fsck in the background where possible.

Please try this patch to fsck_ffs and see if it fixes your problem.

	Kirk McKusick

=-=-=

*** sbin/fsck_ffs/inode.c.orig	2021-01-07 15:04:04.969086284 -0800
--- sbin/fsck_ffs/inode.c	2021-01-25 15:29:06.404803358 -0800
***************
*** 611,618 ****
  	    sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode));
  	readpercg = inosused / fullcnt;
  	partialcnt = inosused % fullcnt;
! 	partialsize = partialcnt * ((sblock.fs_magic == FS_UFS1_MAGIC) ?
! 	    sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode));
  	if (partialcnt != 0) {
  		readpercg++;
  	} else {
--- 611,619 ----
  	    sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode));
  	readpercg = inosused / fullcnt;
  	partialcnt = inosused % fullcnt;
! 	partialsize = fragroundup(&sblock,
! 	    partialcnt * ((sblock.fs_magic == FS_UFS1_MAGIC) ?
! 	    sizeof(struct ufs1_dinode) : sizeof(struct ufs2_dinode)));
  	if (partialcnt != 0) {
  		readpercg++;
  	} else {
Received on Mon Jan 25 2021 - 22:36:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC