xfs
[Top] [All Lists]

Re: Files on XFS not safe?!

To: Xianglong Yuan <yuanx@xxxxxxx>
Subject: Re: Files on XFS not safe?!
From: Steve Lord <lord@xxxxxxx>
Date: 05 Dec 2001 10:28:33 -0600
Cc: Joshua Baker-LePain <jlb17@xxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <20011205111421.B3446@xxxxxxxxxxxxxxxx>
References: <20011205100043.A3437@xxxxxxxxxxxxxxxx> <Pine.LNX.4.33.0112051005510.26602-100000@xxxxxxxxxxxxxxxxxx> <20011205111421.B3446@xxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
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.

Steve

> 
> > 
> > -- 
> > 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


<Prev in Thread] Current Thread [Next in Thread>