From owner-freebsd-hackers Fri May 14 7:18:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 1FDB714C2D for ; Fri, 14 May 1999 07:18:44 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id JAA18747; Fri, 14 May 1999 09:18:41 -0500 (CDT) (envelope-from dan) Date: Fri, 14 May 1999 09:18:41 -0500 From: Dan Nelson To: Roar Thron?s Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: large master.passwd Message-ID: <19990514091840.A18547@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: ; from "Roar Thron?s" on Fri May 14 11:12:18 GMT 1999 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (May 14), Roar Thron?s said: > On a site with 20k users in the master.passwd, and where NIS is not > trusted, the master.passwd is distributed to each workstation. The > pwd.db and spwd.db are sized around 10Mb. > > Sometimes, those .db files get corrupt. I suspect it has something to > do with the machines being reset etc before the sync is finished. > (The machines are dual-boot, and there are a lot of users around.) > > I did some patching, and have not seen corrupted .db-files since. > > So how usable is this patch? > Worth intregrating? > - 2048 * 1024, /* cachesize */ > + 8192 * 1024, /* cachesize */ Cachsize is already adjustable via the -s commandline switch. > + /* sync may be wise > + -roart */ > + sync(); How about an fsync() of only that file? (I don't remember whether fsync flushes metadata though) -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message