xfs
[Top] [All Lists]

Re: Data destruction

To: ivandi@xxxxxxxxxxxxxxx
Subject: Re: Data destruction
From: Nathan Scott <nathans@xxxxxxx>
Date: Wed, 29 Aug 2001 19:23:55 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.33.0108291058140.1805-100000@xxxxxxxxxxxxxxxxxxx>; from ivandi@xxxxxxxxxxxxxxx on Wed, Aug 29, 2001 at 11:05:02AM +0300
References: <20010829182949.I323889@xxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.33.0108291058140.1805-100000@xxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
hi,

On Wed, Aug 29, 2001 at 11:05:02AM +0300, ivandi@xxxxxxxxxxxxxxx wrote:
> 
> On Wed, 29 Aug 2001, Nathan Scott wrote:
> 
> > On Wed, Aug 29, 2001 at 10:17:40AM +0300, Ivan Ivanov wrote:
> > > ...
> > > I have downloded the latest versions last night so I will try.
> > > The problem with xfs_check is that it trys to make a temporary file and if
> > > the filesystem is readonly it fails - why !
> >
> > I wasn't aware that xfs_check (xfs_db) would attempt to create
> > a temporary file ... thats news to me, not sure where that is
> > happening but sounds like it shouldn't be.
> > ...[snip]...
> 
> It outputs a message about trying to create tmpfile.
> I can't send the exact text because I am not on my test machine.
> This hapens only when xfs_check is checking root filesystem, when other
> readonly filesystem is checked everything is OK.
> 

Ah - I see where this is coming from now... looks like its
cmd/xfsprogs/db/init.c, around line 65.

So, it looks like xfs_check wont be able to run on root
without a bit of work to make it so.  It currently seems
to set up a tmpfile for all of the commands coming in via
the xfs_db "-c" option (xfs_check == xfs_db), so that it
can batch multiple -c options up and run them all at once.
[creating a tmp file seems like a bit of overkill.. hmm]

Anyway, "xfs_repair -n" should be able to check the root
filesystem though (I used xfs_repair for testing the libxfs
readonly root changes, IIRC).

Or, you can run xfs_db directly, and just type the commands
in by hand rather than using xfs_check (xfs_check is just a
shell script - see what it does and feed the commands in by
hand).

cheers.

-- 
Nathan


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