From owner-freebsd-questions@FreeBSD.ORG Sun Oct 13 19:39:27 2013 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DEB025D3 for ; Sun, 13 Oct 2013 19:39:27 +0000 (UTC) (envelope-from mueller6721@twc.com) Received: from cdptpa-oedge-vip.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.226]) by mx1.freebsd.org (Postfix) with ESMTP id A63FF23A9 for ; Sun, 13 Oct 2013 19:39:26 +0000 (UTC) Received: from [74.130.200.176] ([74.130.200.176:40534] helo=localhost) by cdptpa-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 61/07-16944-CA6FA525; Sun, 13 Oct 2013 19:38:20 +0000 Date: Sun, 13 Oct 2013 19:38:20 +0000 Message-ID: <61.07.16944.CA6FA525@cdptpa-oedge02> From: "Thomas Mueller" To: freebsd-questions@FreeBSD.org References: <525A6831.5070402@gmail.com> <525A748F.3050109@gmail.com> Subject: Re: SU+J Lost files after a power failure X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 Cc: David Demelier , CeDeROM X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 19:39:27 -0000 > On 13.10.2013 12:16, CeDeROM wrote: > > On 13 Oct 2013 11:30, "David Demelier" > > wrote: > >> Hello there, > >> I'm writing because after a power failure I was unable to log in on my > >> FreeBSD 9.2-RELEASE. The SU+J journal were executed correctly but some > >> files disappeared, including /etc/pwd.db. Thus I was unable to log in. > >> I've been able to regenerate the password database with a live cd but > >> I'm afraid that more files had disappeared somewhere else... > >> I think this is a serious issue, the journal should not truncate files, > >> so something should have gone wrong somewhere.. > >> Any ideas? Should I open a PR > > I had similar issues somewhere around 9.0 - although journal check was > > fine running fsck revealed filesystem inconsistency. I have reported > > this on the list, but it seemed unnoticed..? For me this is serious > > issue as well, if you make PR I will give +1 :-) > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info > Yes, I've also ran fsck in single user mode after and lot of incorrect > things were corrected, I wait a bit for answers (if any) before sending > a PR. Running fsck in single-user mode may not be sufficient. You may need to run fsck_ffs from a USB-stick installation or live CD. I remember reviving a FreeBSD partition that way, normal root partition not mounted. I once revived a FreeBSD partition with fsck_ffs from a USB-stick installation of NetBSD 5.1_STABLE i386 after FreeBSD couldn't do it. It helps to have a UPS to protect against short power failures and allow graceful shutdown on longer power outages. Tom