Can problems occur from not shutting down correctly?

I read a long time ago that Unix can have damage done to it from shutting a computer off using the power button, or whatever. Power losses, etc. Is this true of FreeBSD? If it gets shut off by a power outage or some kind of brownout happens or hitting the power button... can any problems come up?
 
Technically yes: improper file systems unmounting. To avoid possible problems after unexpected power off boot in single user mode (option 4 on the boot screen), press Enter to get to # prompt and simply run
Code:
# fsck -p
In case of heavy damage you may be prompted to run fsck manually and confirm all the actions it does.
 
Bear in mind that this is true of every operating system. Certain filesystems are just better at recovering from unexpected shutdowns than others.

Adam
 
In v5 & v6 an improper shutdown always
resulted in data loss. Lately, v7, v8,
data have not been lost (maybe I've been
lucky.) However, in the case of filesystems
mounted on mountpoints, their bsdlabel often
becomes obliterated, so one must
Code:
 mount -o async -o force /dev/ad10.journal /mnt
to access the data (I forget the
precise other filesystem-types examples, that
specific command is why I've become accustomed
to using gjournal on attached disks, the data
is (usually) still there although the drive cannot
be mounted without the "force" parameter. And
since fast writes to the external drives are often
the cause of the data/bsdlabel corruption/panic,
I've used the "bwlimit" parameter to rsync to
slow the copy down to where it is reliable. (See
other posts).
.....
Probably irrelevant mostly to permanently
attached disks.
.....
 
Back
Top