On Sat, Mar 03, 2018 at 07:48:07PM +0000, Thomas Huber wrote:
> Hi,
> 
> can someone give me a recomendations for ffs mount options or further
> tuning to prevent file-system corruption on power-outage?
> 
> I run a PC-Engines APU2c3 with -stable in a rural place where power-outage
> takes place approx. once a month. Most of the time every things starts fine
> when power is back, but sometimes (now the third time in one year) I end up
> with an corrupted /var and I´ve to go to that place and do manual fsck_ffs
> which could always repair the fs.
> I already tried with the softdep option but it didn´t prevent fs-corruption.
> 

Don't use softdep, that will just make things worse

> $ mount
> /dev/sd0f on /var type ffs (local, nodev, nosuid)

If you can, some parts of /var can be mounted read-only.
If you have a webserver under /var/www and it doesn't write anything,
add that as a seperate partition and mount it ro.
The log files can be somewhere else than /var/www/logs. (I am correct
about that, right? Wrong?)
You could as break up /var directories into different partitions, still
rw, but less evil to lose a directory versus the whole /var partition.

I always tend to use up all the possible partitions and ro everything I
can.
mount -u -o rw..... is nice.

Trust me. manual fsck does fail sometimes. Then there is a big mess to
fix up. Losing /var is a very nasty one to fix. Been there, done that!

And getting a UPC is a good idea, unless you're outside doing something
and the battery fails. Never had a UPC, always needed one in some
places.

May all the rest of your days been filled with never failing power!
Chris Bennett


Reply via email to