bin/74779: Background-fsck checks one filesystem twice and omits another

Bernd Luevelsmeyer bernd at heitec.net
Mon Dec 6 08:50:21 PST 2004


>Number:         74779
>Category:       bin
>Synopsis:       Background-fsck checks one filesystem twice and omits another
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>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:
>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:
>Unformatted:


More information about the freebsd-bugs mailing list