Bug#324900: nscd: umount /var fails (unclean shutdowns)
At Thu, 25 Aug 2005 17:57:00 -0400,
Daniel Jacobowitz wrote:
> On Thu, Aug 25, 2005 at 05:53:05PM +0200, Zlatko Calusic wrote:
> > GOTO Masanori <firstname.lastname@example.org> writes:
> > > At Thu, 25 Aug 2005 12:56:04 +0200,
> > > Zlatko Calusic wrote:
> > >> rc 1119 root mem REG 8,9 217016 228931 /var/db/nscd/passwd
> Note, this is a long-running bash. Not many people use file-rc (that's
> what this is, right?)
It explains why most people don't see this issue. Why does file-rc
> Does glibc open the nscd cache files directly rather than communicating
> with it via a socket? Or does it communicate via shared memory?
Quick look at the source, mmap is used to share database file with
mmap MAP_SHARED, so the main communication should be done via a
> > rc 827 root mem REG 8,9 217016 228931 /var/db/nscd/passwd
> [Is /var/db even FHS?]
FHS states as follows.
5.5.2 /var/lib/misc : Miscellaneous variable data
This directory contains variable data not placed in a subdirectory in
/var/lib. An attempt should be made to use relatively unique names in
this directory to avoid namespace conflicts.
Note that this hierarchy should contain files stored in /var/db in
current BSD releases. These include locate.database and mountdtab, and
the kernel symbol database(s).
LDAP or DB data sometimes puts their db files on /var/lib/misc (I
think "misc" is vague term, though). Actually
debian/patches/fhs-linux-paths.dpatch contains the following changes:
--- glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h~ Thu May 27 13:16:33 1999
+++ glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h Thu May 27 13:17:55 1999
@@ -71,7 +71,7 @@
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
+#define _PATH_VARDB "/var/lib/misc/"
Another chioce is to use /var/cache - it's for application specific
caching data. But currently I use /var/db instead of /var/lib/misc -
I have wondered this change is widely accepted. I would like to hear
from all you guys about this placement.