From owner-freebsd-questions@FreeBSD.ORG Sat Feb 18 00:40:53 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F196E1065678 for ; Sat, 18 Feb 2012 00:40:53 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout020.mac.com (asmtpout020.mac.com [17.148.16.95]) by mx1.freebsd.org (Postfix) with ESMTP id D54968FC15 for ; Sat, 18 Feb 2012 00:40:53 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com (unknown [17.209.4.71]) by asmtp020.mac.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LZK001ONCK55Q80@asmtp020.mac.com> for freebsd-questions@freebsd.org; Sat, 18 Feb 2012 00:40:53 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7361,1.0.260,0.0.0000 definitions=2012-02-17_04:2012-02-17, 2012-02-17, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1202170279 From: Chuck Swiger In-reply-to: <021501ccedd1$ef4201d0$cdc60570$@fisglobal.com> Date: Fri, 17 Feb 2012 16:40:52 -0800 Message-id: References: <4F3ECF23.5000706@fisglobal.com> <20120217234623.cf7e169c.freebsd@edvax.de> <20120217225329.GB30014@gizmo.acns.msu.edu> <021101ccedc9$89445cf0$9bcd16d0$@fisglobal.com> <290E977C-E361-4C7D-8F1E-C1D6D03BAD63@mac.com> <021501ccedd1$ef4201d0$cdc60570$@fisglobal.com> To: Devin Teske X-Mailer: Apple Mail (2.1084) Cc: 'FreeBSD -' Subject: Re: One or Four? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2012 00:40:54 -0000 On Feb 17, 2012, at 4:11 PM, Devin Teske wrote: >> However, for whatever reasons, the overwhelming majority of folks using MacOS >> X don't have problems using a single root partition, and while they sometimes do >> fill up their disks, that's a situation which they should be able to recover from >> without needing expert assistance. I don't recall having unusual issues in running >> a partition out of space under FreeBSD, either, or difficulty fixing things >> afterwards-- > > Recipe for disaster: > > 1. You have a cron-job that pulls down /etc/master.passwd daily > 2. Your cron-job also runs pwd_mkdb after "SUP"ing down /etc/master.passwd Yes, I agree that this is a recipe for disaster; the reasons not very correlated to disk space, however. Even twenty years ago, handling this via YP/NIS or NetInfo would have made more sense, and nowadays folks would be far more likely to use LDAP as the network user database, instead of pushing system password database changes via SUP or similar replication mechanism locally to individual hosts. > 3. A program fills "/" > 4. cron fires > 5. pwd_mkdb can't generate databases because not enough room on filesystem > 6. System can no longer be logged into #5 does not imply #6: if pwd_mkdb can't build a temporary version to /etc/pwd.db.tmp & /etc/spwd.db.tmp, it will exit with an error rather than invoke rename(2) to replace the working version of the password database with something that might be broken. To be very specific, I would expect one to get: "/: write failed, filesystem is full pwd_mkdb: /etc/pwd.db to /etc/pwd.db.tmp: No space left on device" > 7. System is rebooted > 8. Can't log in (not even as root) > 9. Go into single-user mode > 10. No space to work in > > Sure... you can call it an "edge-case," but it's pretty common and this is only > one of a myriad of ways we can reproduce the problem of filling-up "/" to cause > major headaches. I've never heard of such a thing happening to a real FreeBSD system in the past decade or more. The closest match to the issue results in a failure of adduser(8) or pw(8) to add new users, but existing users continued to work fine. Regards, -- -Chuck