Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Aug 2009 14:46:42 +0200
From:      Ruben de Groot <mail25@bzerk.org>
To:        Sebastian Seidl <seba@sebaseidl.com>
Cc:        questions@freebsd.org
Subject:   Re: Recovering files after a crash
Message-ID:  <20090820124641.GA51846@ei.bzerk.org>
In-Reply-To: <4A8D13CA.7090504@sebaseidl.com>
References:  <4A8A5887.1080304@locolomo.org> <20090818171528.GA35403@slackbox.xs4all.nl> <4A8BB0E4.2020806@locolomo.org> <20090819160956.GA71105@slackbox.xs4all.nl> <4A8CFCC5.4070303@locolomo.org> <4A8D13CA.7090504@sebaseidl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Erik Norgaard wrote:
> >
> >Ok, maybe I didn't make myself clear: I wish to protect my filesystem 
> >against corruption in case of a crash such that it will boot.
> >
> >- How can I configure my system to reduce the probability that a crash 
> >will cause file system inconsistencies that require single user mode 
> >intervention?
> >
> >backups does not answer that question, they are great for recovering 
> >lost data but don't prevent the crash.
> >
> >KVM and serial console don't answer the question either. Certainly, it 
> >makes it easier to work headless. But neither prevent disk corruption.
> >
> >UPS reduces the likelyhood of a crash in case of a power failure, but 
> >that doesn't answer the question either.
> >
> >Asume that a crash will happen, how do I prevent or reduce the risk of 
> >a crash causing disk corruption such that the system will boot up 
> >nicely again?

You could mount all system partitions ro (using memory fs for /tmp and /var)
Setting the "noauto" option for your data partitions in fstab will 
allmost guarantee the system to boot to multiuser after a crash. You can then 
mount these partitions from a script in for example rc.local. If these
mounts fail, the system will then not drop to single user mode.

Ruben




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090820124641.GA51846>