xfs
[Top] [All Lists]

Re: files in /etc/xinetd.d become 0 byte size

To: Eric Sandeen <sandeen@xxxxxxx>
Subject: Re: files in /etc/xinetd.d become 0 byte size
From: Simon Matter <simon.matter@xxxxxxxxxxxxxxxx>
Date: Tue, 19 Mar 2002 17:44:13 +0100
>received: from mobile.sauter-bc.com (unknown [10.1.6.21]) by basel1.sauter-bc.com (Postfix) with ESMTP id B599C57306; Tue, 19 Mar 2002 17:44:13 +0100 (CET)
Cc: Juri Haberland <juri@xxxxxxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxx>
Organization: Sauter AG, Basel
References: <Pine.LNX.4.33.0203190839410.19919-100000@xxxxxxxxxxxxxxxxxxxxxxxx> <3C97591B.FF456D25@xxxxxxxxxxxxxxxx> <3C975DB7.4010201@xxxxxxxxxxxxxx> <3C9760EA.3874D744@xxxxxxxxxxxxxxxx> <1016554052.4383.4.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Eric Sandeen schrieb:
> 
> On Tue, 2002-03-19 at 10:01, Simon Matter wrote:
> 
> > This is a fresh install of 7.2 XFS. I have the mentioned lines in
> > /etc/rc.d/init.d/halt.
> >
> > I think that something in the shutdown process is not okay. I remember
> > the bdflush discussion and the vim story. So I think the remount
> > readonly trick does not make shure data is flushed to disk.
> > I enabled write cache again because it doesn't help and tried this
> >
> > [root@gw-linux-dev xinetd.d]# ntsysv ; sleep 40 ; reboot
> >
> > No zeroed files !
> 
> Odd.
> 
> You said that echoing something into a file just before shutdown did not
> exhibit this problem.  Was the target file also on the root filesystem?
> 

It was on the same partition. I also used to copy the files from
/root/xinetd.d/ to /etc/xinetd.d and just rebooted after and no zeros.
But I can reproduce it now very easily.

ntsysv (en/disabling rsh) ; reboot                 : gives zeroed files
ntsysv (en/disabling rsh) ; sleep 40 ; reboot      : is okay.

I'm sure ntsysv does something 'interesting' here but from my
understanding it should not be possible to damage the FS in such way. It
seems to me that somehow bdflush does not update the changes ntsysv did.

Is there a way to ensure bdflush does it's job immediately? sync seems
not to do it in this case but what else?
My question is how does the proper shutdown process look like? What we
have is

- kill all processes by SIGTERM
- kill all processes by SIGKILL
- turn off swap, accounting and quota
- unmounting all filesystems
- remount anything left readonly

Now, my stupid question: ntsysv changes depend on bdflush to get written
to disk. Does bdflush survive killall?

BTW: I've just found my .bash_history file zeroed.

> It might also be worth temporarily trying a more recent kernel, just in
> case we're chasing an old bug.

Will also try this.

> 
> Otherwise, I wonder if remount,ro is not behaving correctly in this
> case.
> 
> -Eric
> 
> --
> Eric Sandeen      XFS for Linux     http://oss.sgi.com/projects/xfs
> sandeen@xxxxxxx   SGI, Inc.

-- 
Simon Matter              Tel:  +41 61 695 57 35
Fr.Sauter AG / CIT        Fax:  +41 61 695 53 30
Im Surinam 55
CH-4016 Basel             [mailto:simon.matter@xxxxxxxxxxxxxxxx]



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