xfs
[Top] [All Lists]

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

To: Eric Sandeen <sandeen@xxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxx>
Subject: Re: files in /etc/xinetd.d become 0 byte size
From: Simon Matter <simon.matter@xxxxxxxxxxxxxxxx>
Date: Tue, 19 Mar 2002 12:36:58 +0100
>received: from mobile.sauter-bc.com (unknown [10.1.6.21]) by basel1.sauter-bc.com (Postfix) with ESMTP id A17E457306; Tue, 19 Mar 2002 12:36:58 +0100 (CET)
Organization: Sauter AG, Basel
References: <3C961055.FF5DF9C6@xxxxxxxxxxxxxxxx> <3C96162B.FEBA6ABA@xxxxxxxxxxxxxxxx> <1016479523.1442.1.camel@xxxxxxxxxxxxxxxxxxxxxx> <3C964F7B.38C3C921@xxxxxxxxxxxxxxxx> <1016484305.2197.3.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Eric Sandeen schrieb:
> 
> I don't know for sure how IDE write caching works, to tell you the
> truth.  Try making sure it's off, and we'll go from there.

How can I disable write caching on the Quantum AS20.5 disks? I've tried
to find a program on www.maxtor.com but couldn't find anything. The only
thing I found is that on Apple and Windows systems they have the same
problems and it was fixed via driver modification. I tried to find a way
to disable write cache via hdparm but didn't find anything.
It's not directly a XFS problem but it seems to only happend on XFS.
Maybe software raid1 (md) has something to do with but I don't think so.
I just can't make this system work as expected...

-Simon

> 
> Hm, maybe looking at the ntsysv source would be good too.  When I have
> time... :)
> 
> -Eric
> 
> On Mon, 2002-03-18 at 14:35, Simon Matter wrote:
> > Eric Sandeen schrieb:
> > >
> > > hi Simon -
> > >
> > > What happens if you just
> > >
> > > echo "test" > /etc/testfile
> >
> > Hi Eric,
> >
> > I've tried this with no problem at all. I even modified the xinetd
> > script
> > and included the statement in the stop function because this gets
> > executed
> > short before system halt/reboot. The result was still okay.
> >
> > >
> > > or something like that, and reboot - just to take ntsysv out of the
> > > picture.
> >
> > Now, how can ntsysv trigger empty files? I don't really understand that.
> >
> > >
> > > I tried ntsysv on an xfs-root system, rebooted, and had no problems.  I
> > > wonder if my reboot is slow enough that a normal data flush happens
> > > after the write.
> >
> > I have posted to bugzilla.redhat.com but it seems that the problem
> > exists only
> > with XFS.
> >
> > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=61356
> >
> > Believe me, it's not the first time I have this problem but it's the
> > first time I really care about it. I don't remember with what kind of
> > hardware I already had this.
> >
> > Now I'm thinking whether the disks could be the culprits. They are two
> > Quantum AS20.5 and they have quite big caches. If write cache is
> > enabled, could it be that this cache is not flushed to disk on reboot. I
> > will check whether cache is enabled but since I'm at home now, I guess I
> > have to do it tomorrow when I have physical access.
> > However, why are only certain files getting zeroed, I mean not all files
> > in /etc/xinetd.d are zeroed? And if it's a cache flushing problem, how
> > comes that for example the raid is stopped cleanly and other data still
> > in the drive cache is not flushed? Can the OS tell the drive which data
> > has to be flushed and which not?
> >
> > I'll modify the halt script now to ensure drive cache is synced and
> > flushed on reboot. I guess using hdparm -f should be the right thing?
> >
> > -Simon
> >
> > >
> > > -Eric
> > >
> > > On Mon, 2002-03-18 at 10:30, Simon Matter wrote:
> > > > Simon Matter schrieb:
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I'm setting up a new server, basically it's RedHat 7.2 XFS with all
> > > > > updates from RedHat applied. Kernel is 2.4.9-31SGI_XFS_1.0.2. I have 
> > > > > two
> > > > > IDE disks with software RAID1 partitions for /, /boot, /home. Nothing
> > > > > special.
> > > > >
> > > > > The problem I have is that after some installation and configuration
> > > > > work, some xinetd config files in /etc/xinetd.d became 0 byte size. 
> > > > > IIRC
> > > > > I saw the same thing some time ago with another machine but I really
> > > > > don't understand what's going on. BTW, I didn't have a crash or 
> > > > > unclean
> > > > > shutdown.
> > > > >
> > > > > [root@gw-linux-dev xinetd.d]# ll /etc/xinetd.d
> > > > > total 44
> > > > > -rw-r--r--    1 root     root          295 Mar 18 15:53 chargen
> > > > > -rw-r--r--    1 root     root          315 Mar 18 15:53 chargen-udp
> > > > > -rw-r--r--    1 root     root          295 Mar 18 15:53 daytime
> > > > > -rw-r--r--    1 root     root          315 Mar 18 15:53 daytime-udp
> > > > > -rw-r--r--    1 root     root          287 Mar 18 15:53 echo
> > > > > -rw-r--r--    1 root     root          306 Mar 18 15:53 echo-udp
> > > > > -rw-r--r--    1 root     root          317 Mar 18 15:53 finger
> > > > > -rw-r--r--    1 root     root          491 Mar 18 15:53 jftpgw-inet
> > > > > -rw-r--r--    1 root     root          257 Mar 18 15:53 ntalk
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 rexec
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 rlogin
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 rsh
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 rsync
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 talk
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 telnet
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 time
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 time-udp
> > > > > -rw-r--r--    1 root     root            0 Mar 18 15:53 wu-ftpd
> > > > >
> > > > > I have then restored the empty files from another installation.
> > > > > Everything seemed okay. I have then rebooted and now it's getting more
> > > > > interesting.
> > > > >
> > > > > [root@gw-linux-dev xinetd.d]# ll
> > > > > total 36
> > > > > -rw-r--r--    1 root     root          295 Mar 18 15:59 chargen
> > > > > -rw-r--r--    1 root     root          315 Mar 18 15:59 chargen-udp
> > > > > -rw-r--r--    1 root     root          295 Mar 18 15:59 daytime
> > > > > -rw-r--r--    1 root     root          315 Mar 18 15:59 daytime-udp
> > > > > -rw-r--r--    1 root     root          287 Mar 18 15:59 echo
> > > > > -rw-r--r--    1 root     root          306 Mar 18 15:59 echo-udp
> > > > > -rw-r--r--    1 root     root          317 Mar 18 15:59 finger
> > > > > -rw-r--r--    1 root     root          491 Mar 18 15:59 jftpgw-inet
> > > > > -rw-r--r--    1 root     root          257 Mar 18 15:59 ntalk
> > > > > -rw-r--r--    1 root     root          359 Mar 18 15:59 rexec
> > > > > -rw-r--r--    1 root     root          376 Mar 18 15:59 rlogin
> > > > > -rw-r--r--    1 root     root          428 Mar 18 15:59 rsh
> > > > > -rw-r--r--    1 root     root          317 Mar 18 15:59 rsync
> > > > > -rw-r--r--    1 root     root          245 Mar 18 15:59 talk
> > > > > -rw-r--r--    1 root     root          303 Mar 18 15:59 telnet
> > > > > -rw-r--r--    1 root     root          319 Mar 18 15:59 time
> > > > > -rw-r--r--    1 root     root          315 Mar 18 15:59 time-udp
> > > > > -rw-r--r--    1 root     root          361 Mar 18 15:59 wu-ftpd
> > > > >
> > > > > It looks okay, but then I tried this:
> > > > > [root@gw-linux-dev xinetd.d]# cat rsh
> > > > > [root@gw-linux-dev xinetd.d]#
> > > > >
> > > > > Further investigation shows that the same files that were missing 
> > > > > before
> > > > > are now filled with zero. After restarting xinetd, I guess they will 
> > > > > be
> > > > > 0 bytes in size.
> > > > >
> > > > > I have searched RedHat bugzilla but didn't find anything useful.
> > > > > What comes to mind is the problem with zero filled bytes after a crash
> > > > > but I didnt' have any crash or unclean shutdowns. It seems to be
> > > > > something similar anyway.
> > > > >
> > > > > Is it possible that xinetd performs an operation on the files which
> > > > > leaves them not cleanly flushed to disk when shutting down?
> > > > >
> > > > > Thanks for any help!
> > > > >
> > > > > -Simon
> > > >
> > > > I reproduced it now:
> > > > Using ntsysv to manage services -> reboot: Files in /etc/xinetd.d have
> > > > normal size but filled with zero. Using ntsysv again truncates them to
> > > > zero size. Maybe write cache on the disks is enabled for some reason.
> > > > That could explain why changes are not commited to disk. I don't
> > > > understand it anyway because on reboot, the cache should be flushed to
> > > > disk, doesn't it? The hole thing lets me feel quite bad because I'm
> > > > wondering what else has been lost.
> > > >
> > > > Can anybody confirm similar problems?
> > > >
> > > > -Simon
> > > >
> > > --
> > > Eric Sandeen      XFS for Linux     http://oss.sgi.com/projects/xfs
> > > sandeen@xxxxxxx   SGI, Inc.
> >
> --
> 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>