From bernd@heitec.net  Mon Dec  6 16:47:25 2004
Return-Path: <bernd@heitec.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E8DD816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Dec 2004 16:47:24 +0000 (GMT)
Received: from christel.heitec.net (christel.heitec.net [213.70.109.3])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EA64243D69
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Dec 2004 16:47:23 +0000 (GMT)
	(envelope-from bernd@heitec.net)
Received: from tostan.admin.er.heitec.net (paladin.heitec.net [193.101.232.30])
	by christel.heitec.net (Postfix) with ESMTP id C9F4B55418
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Dec 2004 17:47:22 +0100 (CET)
Received: (from bernd@localhost)
	by tostan.admin.er.heitec.net (8.13.1/8.13.1/Submit) id iB6GlMM9027470;
	Mon, 6 Dec 2004 17:47:22 +0100 (CET)
	(envelope-from bernd)
Message-Id: <200412061647.iB6GlMM9027470@tostan.admin.er.heitec.net>
Date: Mon, 6 Dec 2004 17:47:22 +0100 (CET)
From: Bernd Luevelsmeyer <bernd@heitec.net>
Reply-To: Bernd Luevelsmeyer <bdluevel@heitec.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Background-fsck checks one filesystem twice and omits another
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         74779
>Category:       bin
>Synopsis:       Background-fsck checks one filesystem twice and omits another
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 06 16:50:19 GMT 2004
>Closed-Date:    
>Last-Modified:  Fri Sep 24 20:59:49 UTC 2010
>Originator:     Bernd Luevelsmeyer
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD 5.3-STABLE #2: Mon Dec 6 12:13:23 CET 2004 i386

>Description:
I have two partitions mounted to the same mountpoint with the
"union" flag. The relevant lines in /etc/fstab read:

/dev/da0s1h	/ftproot	ufs	rw,noatime		2	2
/dev/da1s1e	/ftproot/pub/archive	ufs	rw,union,noatime	2	2
/dev/da2s1e	/ftproot/pub/archive	ufs	rw,union,noatime	2	2

The output of "mount" is:

/dev/da0s1a on / (ufs, local, noatime, soft-updates)
devfs on /dev (devfs, local)
/dev/da0s1e on /var (ufs, local, noatime, soft-updates)
/dev/da0s1f on /usr (ufs, local, noatime, soft-updates)
/dev/da0s1g on /home (ufs, local, noatime, soft-updates)
/dev/da0s1h on /ftproot (ufs, local, noatime, soft-updates)
/dev/da2s1f on /ftproot/pub/repo (ufs, local, noatime, soft-updates)
/dev/da1s1e on /ftproot/pub/archive (ufs, local, noatime, union, soft-updates)
/dev/da2s1e on /ftproot/pub/archive (ufs, local, noatime, union, soft-updates)
/dev/md0 on /tmp (ufs, local, noatime, nodev, nosuid, soft-updates)
/dev/md1 on /var/run (ufs, local, noatime, nodev, nosuid, soft-updates)
devfs on /var/named/dev (devfs, local)

When I pressed the "reset"-button to see how background-fsck works,
I found (with one "ps -ax" command per second) these fsck_ufs lines (the
list is shortened to show each process only once):

21210  ??  SN     0:00.04 fsck_ufs -p -B /dev/da0s1e
21740  ??  DN     0:00.02 fsck_ufs -p -B /dev/da0s1f
38925  ??  DN     0:00.02 fsck_ufs -p -B /dev/da0s1g
47919  ??  DN     0:00.04 fsck_ufs -p -B /dev/da0s1h
 2441  ??  DN     0:00.07 fsck_ufs -p -B /dev/da2s1f
35188  ??  DN     0:00.03 fsck_ufs -p -B /dev/da1s1e
70760  ??  DN     0:00.04 fsck_ufs -p -B /dev/da2s1e

However, as long as the process "fsck_ufs -p -B /dev/da1s1e"
was active, the computer's front LEDs clearly indicated activity
on /dev/da2 and idleness on /dev/da1. In addition, when I booted
(with a clean shutdown) into single-user-mode afterwards and
issued the command "fsck -p", this output showed that /dev/da1s1e
had not been fsck'd before:

Enter full pathname of shell or RETURN for /bin/sh:
# fsck -p
/dev/da0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da0s1a: clean, 465624 free (872 frags, 58094 blocks, 0.2% fragmentation)
/dev/da0s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da0s1e: clean, 488425 free (441 frags, 60998 blocks, 0.1% fragmentation)
/dev/da2s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da2s1f: clean, 2682280 free (68704 frags, 326697 blocks, 1.4% fragmentation
)
/dev/da0s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da0s1f: clean, 1718077 free (89653 frags, 203553 blocks, 2.9% fragmentation
)
/dev/da2s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da2s1e: clean, 37397755 free (1571 frags, 4674523 blocks, 0.0% fragmentatio
n)
/dev/da0s1g: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da0s1g: clean, 9852072 free (4000 frags, 1231009 blocks, 0.0% fragmentation
)
/dev/da0s1h: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/da0s1h: clean, 12837348 free (34156 frags, 1600399 blocks, 0.1% fragmentati
on)
/dev/da1s1e: 7068 files, 62664422 used, 6812021 free (1605 frags, 851302 blocks,
 0.0% fragmentation)


The Problem Report bin/19772 may be related, as it also describes
a bug with union-mounts in which one partition is acted upon twice
and the other is omitted.

>How-To-Repeat:
Create union-mounts and reboot without a clean shutdown.

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Fri Sep 24 20:59:29 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74779 
>Unformatted:
