>-Steve Lord [05 Dec 2001 10:28 -0600] wrote:
> On Wed, 2001-12-05 at 10:14, Xianglong Yuan wrote:
> > >-Joshua Baker-LePain [05 Dec 2001 10:07 -0500] wrote:
> > >
> > > On Wed, 5 Dec 2001 at 10:00am, Xianglong Yuan wrote
> > >
> > > > First, I modify a file with vim, save it, and go back to bash
> > > > shell. Then, I hit the power button to crash the system
> > > > instantly. Now I restart the system and the XFS FS comes back
> > > > gracefully. However, when I try to open the just saved file,
> > > > nothing is there, not the new modified content, not even the old
> > > > content. All the content in the file is wiped off by a stream
> > > > of weird symbols. Is the XFS FS supposed to behavior like that?
> > > > It seems to me XFS is really not a safe FS to count on when
> > > > system crashing. I presumed that I should have my old content
> > > > back. Did I asked too much here? Thanks in advance.
> > > >
> > > http://oss.sgi.com/projects/xfs/faq.html#nulls
> > Is there any way to recover the old content? It is still at
> > somewhere in the disk, isn't it?
> No, it was in the memory on your machine when you turned off the power,
> now it is gone. The problem here is partially the editor, partially you,
> and partially XFS.
> o The editor because it does not use a call such as fsync on the new
> file before renaming it over the original.
> o You for pulling the power at the wrong moment (OK, it could be the
> power company, or the fuse box too).
> o XFS for allowing a size update out to disk before the file data, not
> that this helps too much, you would just get a zero length file
> instead of a file with NULLs in it.
I presume there is a log that has the information when the
data-flashing is scheduled to start, whether it has done or not,
and what the original file state (meta-data?) is. Now, if the
system crashed before the data-flashing is done, could it be
possible to trace the log back to the point before the unfinished
data-flashing and give the original file state (meta-data?) back
instead of the meta-data of the new file as it gives nothing? (I
believe the content of the old file is still on the disk and not
zeroed by other program, and could be recovered if we know its
locations (meta-data?).) Update the new meta-data only after a
successful data-flashing. Am I missing something here?
> > >
> > > --
> > > Joshua Baker-LePain
> > > Department of Biomedical Engineering
> > > Duke University
> > >
> > Xianglong Yuan
> > --
> > Dept. Materials Science and Engineering
> > MIT, Room 13-4050
> > Cambridge, MA 02139
> Steve Lord voice: +1-651-683-3511
> Principal Engineer, Filesystem Software email: lord@xxxxxxx
Dept. Materials Science and Engineering
MIT, Room 13-4050
Cambridge, MA 02139