Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2005 14:15:07 -0400 (EDT)
From:      Vivek Khera <vivek@khera.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/86423: backgroud fsck leaves incorrect free block count
Message-ID:  <20050921181507.2A0E6B811@yertle.kcilink.com>
Resent-Message-ID: <200509211820.j8LIK4SE055634@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         86423
>Category:       kern
>Synopsis:       backgroud fsck leaves incorrect free block count
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 21 18:20:04 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Vivek Khera
>Release:        FreeBSD 5.4-RELEASE-p1 amd64
>Organization:
>Environment:
System: FreeBSD yertle.int.kciLink.com 5.4-STABLE FreeBSD 5.4-STABLE #7: Tue May 31 11:38:22 EDT 2005 khera@yertle.int.kciLink.com:/usr/obj/usr/src/sys/YERTLE amd64


	
>Description:
	

I had a 5.4-RELEASE-p1 box lockup (not sure if hardware is at fault).
Background fsck ran when the system was reset, and all seems well.  However,
when I went to do an upgrade to 5.4-R-p7 and I ran fsck after kernel install,
boot into single user, before installworld.  Below is what I saw.  Basically,
the file systems are marked clean, but in reality some have incorrect free
block count.

# fsck -p
/dev/amrd0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/amrd0s1a: clean, 112993 free (553 frags, 14055 blocks, 0.4% fragmentation)
/dev/amrd0s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/amrd0s1d: clean, 352825 free (5865 frags, 43370 blocks, 1.2% fragmentation)
/dev/amrd1s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/amrd1s1d: clean, 21768850 free (154 frags, 2721087 blocks, 0.0% fragmentation)
/dev/amrd0s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/amrd0s1e: clean, 8011569 free (2977 frags, 1001074 blocks, 0.0% fragmentation)
# fsck
** /dev/amrd0s1a
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
630 files, 13846 used, 112993 free (553 frags, 14055 blocks, 0.4% fragmentation)
** /dev/amrd0s1d
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
17901 files, 153662 used, 352825 free (5865 frags, 43370 blocks, 1.2% fragmentation)
** /dev/amrd0s1e
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
SUMMARY BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? [yn] y

43033 files, 6672834 used, 8011567 free (2983 frags, 1001073 blocks, 0.0% fragmentation)

***** FILE SYSTEM WAS MODIFIED *****
** /dev/amrd1s1d
** Last Mounted on /u/d01
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? [yn] y

623 files, 31557828 used, 21768850 free (154 frags, 2721087 blocks, 0.0% fragmentation)

***** FILE SYSTEM WAS MODIFIED *****
# 


>How-To-Repeat:
	

pull the plug on an active file system.  reboot, let bg fsck run, then
go to single user mode and run fsck.

>Fix:

	

this is way beyond my capabilities.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050921181507.2A0E6B811>