Sponsored Content
Full Discussion: Power failure: file damage?
Top Forums UNIX for Dummies Questions & Answers Power failure: file damage? Post 302895107 by Corona688 on Friday 28th of March 2014 01:30:22 PM
Old 03-28-2014
Quote:
Originally Posted by raylier
~#hello -all,
Many UNIX/Linux/BSD/etc books warn about turn off the puter without a proper shutdown. This can damage files which are open at that moment. Seems logical to me. My question is.. does the system warn you when there are damaged files when the system is up again? I had a power failure this week (twice) while my Linux and freeBSD servers were running. (for study so no power backup). Everything works fine. But is it possible that there are damaged files I don't know of but can cause trouble later on? Thanks for reading.
They will have checked and repaired themselves. It can tell, because it leaves a flag for itself to check whether the filesystem was unmounted safely or not. Your system would refuse to boot if it couldn't repair them.

The damage isn't completely random. It happens when a filesystem operation was left half-finished because of a power-failure or other crash. This means that, if anything happened, things(files or folders) which were being often modified are the most likely to be damaged, truncated, or missing.

This also means that a partition which almost never gets written to is very unlikely to be damaged by a power outage. This is one good reason to split up your system into partitions instead of lumping everything into /...
This User Gave Thanks to Corona688 For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Xstartup file failure - HELP !!

Hi, dear Experts ! I need some help, again. Earlier in my work I experienced that one script included in '/etc/dt/config/Xstartup' file caused some serious troubles. But this is another story. The point here is: I changed the script so that it worked again. But... After restart of... (3 Replies)
Discussion started by: DGoubine
3 Replies

2. UNIX for Dummies Questions & Answers

Restart on power failure

How do I configure my workstation (Solaris 9) to restart and perform any check disk automatically if there is a power failure? Thanks. (1 Reply)
Discussion started by: here2learn
1 Replies

3. Solaris

Automatic reboot does not work after power failure

Hi all, I have a server SUN FUJITSU in solaris 10 ; result of uname -a is : SunOS MOBD1 5.10 Generic_118833-03 sun4us sparc FJSV,GPUZC-M I have configured the eeprom to auto-boot as usual and this automatic reboot does not work in case of power failure. I must type "boot" on the prompt "ok"... (5 Replies)
Discussion started by: aribault
5 Replies

4. Shell Programming and Scripting

writting a shell script to delete damage files

hi, I have 100 files say File1.mp3, File2.mp3 .......file100.mp3 i found that File1.mp3 to File50.mp3 are damaged. I want to delete the damaged files from the directory using sed with regex how can i do this. thanks (5 Replies)
Discussion started by: pchangba
5 Replies

5. SCO

file system not getting mounted in read write mode after system power failure

After System power get failed File system is not getting mounted in read- write mode (1 Reply)
Discussion started by: gtkpmbpl
1 Replies

6. UNIX for Dummies Questions & Answers

boot up failure unix sco after power failure

hi power went out. next day unix sco wont boot up error code 303. any help appreciated as we are clueless. (11 Replies)
Discussion started by: fredthayer
11 Replies

7. Solaris

After power failure, SunFireV240 with SOLARIS 5.9 cannot start

SUNW, Sun Fire V240 Spare Sun OS Release 5.9 After a power failure we try to start the server We have the following messages: Thanks for your assistance (7 Replies)
Discussion started by: doudou2012
7 Replies

8. Shell Programming and Scripting

Failure of sftp send to log file

I want to transfer all details of sftp connection into a log file and spawn sftp $PCMSu@$FTP_LOC >> log_file is not working for me. Please suggest how to send the data to a log file that has all information if sftp connection is successful or not? Script that I am using: #!/usr/bin/expect... (7 Replies)
Discussion started by: Geeta Yadav
7 Replies
Damage(3U)						    InterViews Reference Manual 						Damage(3U)

NAME
Damage - repairs damaged graphics SYNOPSIS
#include <Unidraw/Graphic/damage.h> DESCRIPTION
Damage objects store damaged areas of a graphic for subsequent incremental repair. Areas of a graphic are "damaged" if they need to be redrawn for any reason, e.g., if their state has been modified or if under/overlapping graphics change their appearance. Damage objects try to minimize the amount of redrawing needed to repair a graphic. They are most useful when the graphic is complicated enough that it would be undesirable to redraw the entire canvas when the graphic is modified. Damage objects do not eliminate the need for an interac- tor's Redraw member function, though they could be used to implement it. PUBLIC OPERATIONS
Damage(Canvas* = nil, Painter* = nil, Graphic* = nil) Create a new Damage object for a graphic on the given canvas. The painter is used to erase damaged areas using its ClearRect func- tion prior to redrawing them. virtual void Incur(Graphic*) virtual void Incur(BoxObj&) virtual void Incur( Coord left, Coord bottom, Coord right, Coord top ) Notify the damage object that a rectangular area has been damaged, either by passing the graphic that contributed the area or the area itself. virtual void Added(Graphic*) Notify the damage object that the given graphic was appended (not inserted) to the graphic but never drawn. The damage object can thus be responsible for drawing newly added graphics as well. virtual void Repair() Repair all damage incurred since the last Repair (or since the damage object was created if this is the first Repair). virtual void Reset() Reset the damage object. Any damage incurred is lost. virtual boolean Incurred() Returns true if any damage has been incurred. void SetCanvas(Canvas*) void SetPainter(Painter*) void SetGraphic(Graphic*) Canvas* GetCanvas() Painter* GetPainter() Graphic* GetGraphic() Set and get attributes of the damage object. PROTECTED OPERATIONS
int Area(BoxObj&) A helper function that returns the area in square pixels occupied by the given BoxObj. virtual void DrawAreas() virtual void DrawAdditions() Explicitly draw the areas of incurred and added damage, respectively. virtual void Merge(BoxObj&) Merge the given BoxObj into the list of incur-damaged areas, coalescing it into an existing area if the number of non-overlapping areas exceeds 2. void FirstArea(Iterator&) void FirstAddition(Iterator&) void Next(Iterator&) boolean Done(Iterator) BoxObj* GetArea(Iterator) Graphic* GetAddition(Iterator) Operations for iterating over the lists of damaged areas (represented with BoxObj objects) and added Graphics. FirstArea and FirstAddition initialize the iterator to point to the first item on the corresponding list, Next advances the iterator, and Done returns true if the iterator points beyond the end of the list. GetArea and GetAddition return the BoxObj or Graphic to which the iterator points. UList* Elem(Iterator) A helper function for returning the UList to which an iterator points. The _areas protected member is a UList that stores the list of damaged areas, and the _additions protected stores the list of added graphics. void DeleteArea(BoxObj*) void DeleteAreas() DeleteArea is a helper function for deleting the storage associated with a damaged area, including the area itself and the UList element. DeleteAreas is a helper function that deletes the list of damaged areas. SEE ALSO
Canvas(3I), Graphic(3U), Iterator(3U), Painter(3I), UList(3U), geomobjs(3U) Unidraw 30 January 1991 Damage(3U)
All times are GMT -4. The time now is 05:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy