From owner-freebsd-questions@FreeBSD.ORG Wed Jun 23 18:10:26 2010 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 2CC18106566C for ; Wed, 23 Jun 2010 18:10:26 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id E05508FC15 for ; Wed, 23 Jun 2010 18:10:25 +0000 (UTC) Received: from r55.edvax.de (port-92-195-117-232.dynamic.qsc.de [92.195.117.232]) by mx01.qsc.de (Postfix) with ESMTP id F2E173CBDD; Wed, 23 Jun 2010 20:10:13 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o5NIADlv001805; Wed, 23 Jun 2010 20:10:13 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 23 Jun 2010 20:10:13 +0200 From: Polytropon To: Kirk Strauser Message-Id: <20100623201013.07f68ad3.freebsd@edvax.de> In-Reply-To: <4C224C57.6000801@strauser.com> References: <20100623051418.GA80985@thought.org> <20100623183542.1d6aef45.freebsd@edvax.de> <4C224C57.6000801@strauser.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: before i even =touch= my server again.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2010 18:10:26 -0000 On Wed, 23 Jun 2010 13:03:03 -0500, Kirk Strauser wrote: > On 06/23/10 11:35, Polytropon wrote: > > Of course, all write attempts to /var will then fail. > > Or even worse: they'll succeeded. And then when you re-mount /var, > you'll lose access to all the files you've written in the mean time. True, an important advice. In case /var is not mounted, the /var directory on / will be just a "plain directory". Depending on program behaviour, it is possible that logging programs create a new file when missing a file to append. In this case, / will fill with such files in /var. It's important to remove them prior to re-mounting /var. It is possible to move them, e. g. to /tmp, and immediately append them to the correct files after re-mounting /var. But if (small) data loss is acceptable for the time needed to fix /var, it is an option. Another possibility is - but I never tried it - to force fsck to check a mounted partition that is in use. # fsck -yf /var This may (!) cause other forms of damage, allthough fsck should be able to correct most usual problems. It's a good approach to stop as many services as possible that could want to write to /var, and restart them after /var is clean and mounted again. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...