[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What should I do after a power failure?



Fred Sloniker said:

> my attempts to educate her on computer no-nos.  What do I need to do, if
> anything, to make sure my hard drive isn't hosed after a power-off?  Is
> there an equivalent to the Windows Scandisk-after-crash thing?

there is nothing you can do to be sure a filesystem that is mounted in
read-write mode is not damaged due to poweroff, on any OS. You can
reduce the possibility of damage with things like journalling filesystems,
turning off disk caches, and running fsck(when needed). But those do
not ensure 100% that the data/filesystem will not get damaged. You may
get to 99.999% or 99.9999% by doing all of the above, but thats not 100%.

To get closer to 100% you need to have all the disks read only. my grand
father was in the market for a cheap($200 or less) computer a while back
and I had him get a think NIC. It's a CDROM based system with a 4MB flash
chip. Very limited in functionality, but it's designed in such a way that
it does not shutdown, you just shut the power off(infact I tried to shutdown
and it failed because so much of the system is missing, the only way to
do a shutdown is a 'fast' shutdown which is the same as hitting the
power switch). This way the system cannot be damaged. It is possible
that the flash could get curropted but chances are low(because writes to
it are very rare). the system automatically reformats the flash and
reinstates defaults if for some reason the filesystem on the flash is
severely damaged.

It is possible to do this on 'normal' linux distributions as well it
just takes quite a bit of work to narrow down everything that needs to
write to a filesystem, and redirect those writes to a special place(in
some cases perhaps a ramdisk, in others perhaps a very small filesystem.

another option would be to do network booting. if the system mounts everything
over NFS, flipping the switch shouldn't cause many problems. perhaps
file curroption in some files that were open(e.g. document that wasn't
saved), but the filesystem will always be intact since it's on the server.

nate





Reply to: