Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 2021 16:12:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253048] unionfs shows old file with link count of zero
Message-ID:  <bug-253048-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253048

            Bug ID: 253048
           Summary: unionfs shows old file with link count of zero
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: janm@transactionware.com

After executing pwd_mkdb on a system with a unionfs mount above /etc, the
/etc/spwd.db file is the old version of the file with a link count of zero.

Filesystems:

/dev/gpt/root1 on / (ufs, local, read-only)
/dev/gpt/cfg on /cfg (ufs, local, synchronous, soft-updates)
<above>:/cfg/etc on /etc (unionfs, local, read-only)

Command:

pwd_mkdb -p -d /cfg/etc /cfg/etc/master.passwd

Results:

$ ls -il /etc/*pwd.db
65721 -rw-r--r--  1 root  wheel  40960 27 Jan 16:32 /etc/pwd.db
65720 -rw-------  0 root  wheel  40960 26 Jan 14:04 /etc/spwd.db

$ ls -il /cfg/etc/*pwd.db
65721 -rw-r--r--  1 root  wheel  40960 27 Jan 16:32 /cfg/etc/pwd.db
65724 -rw-------  1 root  wheel  40960 27 Jan 16:32 /cfg/etc/spwd.db

The /etc/spwd.db file with inode number 65720, and a link count of zero, is
identical to the /cfg/etc/spwd.db file from before the pwd_mkdb command
(checked against a backup).

Removing /cfg/etc/spwd.db removes the file from /cfg/etc/spwd.db, but the
/etc/spwd.db version does not change.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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