xfs
[Top] [All Lists]

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

To: <linux-xfs@xxxxxxxxxxx>
Subject: Re: files in /etc/xinetd.d become 0 byte size
From: "Bas" <weblists@xxxxxxx>
Date: Tue, 19 Mar 2002 09:27:45 +0100
References: <3C961055.FF5DF9C6@ch.sauter-bc.com> <3C96162B.FEBA6ABA@ch.sauter-bc.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
> >
> > 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

Yep, something similar here. It happened to me in 2.4.17 (and before).
If I use vi to edit a file and reboot the machine shortly after (without
properly shutting down),
the files are filled with nothing but it seems to have it's normal size.

Thanks,
Bas.


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