Bug 74779 - Background-fsck checks one filesystem twice and omits another
Summary: Background-fsck checks one filesystem twice and omits another
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 5.3-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-06 16:50 UTC by Bernd Luevelsmeyer
Modified: 2018-02-02 23:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Luevelsmeyer 2004-12-06 16:50:19 UTC
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.
Comment 1 Bruce Cran freebsd_committer freebsd_triage 2010-09-24 21:59:29 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:59 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Eugene Grosbein freebsd_committer freebsd_triage 2018-02-02 23:22:32 UTC
union file system should have zero and not 2 in the sixth field of its line in fstab, as documented in the fstab(5) manual page, as it does not need to be checked with fsck.