Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 May 2010 16:51:01 -0500 (CDT)
From:      Robert Bonomi <bonomi@mail.r-bonomi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: File system
Message-ID:  <201005092151.o49Lp1mR029794@mail.r-bonomi.com>

next in thread | raw e-mail | index | archive | help
P
> From owner-freebsd-questions@freebsd.org  Sat May  8 21:04:45 2010
> Date: Sat, 8 May 2010 21:36:17 -0400
> From: Ansar Mohammed <ansarm@gmail.com>
> To: freebsd-questions@freebsd.org
> Subject: File system
>
> Hello All,
> I have a FreeBSD VM running. Whenever I reboot the VM without a clean
> shutdown it boots into single user mode and I have to run fsck.
>
> When I run fsck, the file system clearly has issues.
>
> Is there any way to have FreeBSD run on a better file system that wont crap
> out on me everytime I do and unclean shutdown?

This is a "DDT" problem -- as in "<D>on't <D>o <T>hat".
The -correct- fix is to 'change your expectations' -- and change your 
behavior.  *DO* a clean shutdown _before_ repooting the VM.  solves all your 
self-induced(!!) "problems".

Unix-type operating systems are intended for use by people who -know- what
they are doing. As such, it makes little effort to protect admins from 
_their_own_ mistakes.  Unix, and by derivation FreeBSD, _will_ "*WILLINGLY*
give you enough rope to hang yourself", if you ask for it.  This is one 
of the _strengths_ of Unix -- it does *NOT* restrict you to what 'someone
else' thinks is "reasonable".  Corollary: more 'smarts' are required on the
part of the admin, _because_ you do not have the 'restricted choices' of
"someone else's" criteria.

You can either "Do things the _right_ way", as described in the 'fine manual',
which it is _necessary_ to read, or you can persist in risky/wrong/stupid
behaviors, and 'hope for' less-than-catatstrophic results from that 'bad
behavior'.  *YOUR* choice.

That said, If you intend to persist in doing things the 'wrong way', ther
are some things you can try, to ameliorate the problems you're having:

1) You can try running with all disks restricted to 'synchronous' operations;
   This =will= keep the filesystem 'clean' _almost_ all the time, and your 
   BAD IDEA(TM) arbitrary reboots will find only minimal (if any) fsck issues.
   You _will_ pay a *tremendous* price in system performance for using this
   option, however.

2) You could try using a 'journaling' filesystem, *BUT* you'd have to build/
   implement it yourself.  Journaling filesystems are deliberately _not_ 
   provided with FreeBSD, due to security issues/implications with them.
   _You_ will have to decide if the security risks in *your* envrionment are
   worth the (limited) benefits.

3) you can switch to an OS _intended_ for use by the ill-informed; where the
   provider makes all the decisions for you, and allows only what they think
   is reasonable.  BUT, such an OS isn't going to look like Unix, nor feel
   like it, nor act like it.

Again, _YOUR_ choice.

To quote from one of the Indiana Jones movies: "choose wisely."








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