SU+J Lost files after a power failure

Thomas Mueller mueller6724 at
Sun Oct 13 19:39:27 UTC 2013

> On 13.10.2013 12:16, CeDeROM wrote:
> > On 13 Oct 2013 11:30, "David Demelier" <demelier.david at
> > <mailto:demelier.david at>> 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,

> 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.


More information about the freebsd-questions mailing list