From owner-freebsd-isp Sun May 16 12:15:41 1999 Delivered-To: freebsd-isp@freebsd.org Received: from host07.rwsystems.net (kasie.rwsystems.net [209.197.192.103]) by hub.freebsd.org (Postfix) with ESMTP id D9A4B14C22 for ; Sun, 16 May 1999 12:15:32 -0700 (PDT) (envelope-from jwyatt@RWSystems.net) Received: from kasie.rwsystems.net([209.197.192.103]) (2463 bytes) by host07.rwsystems.net via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Sun, 16 May 1999 13:54:44 -0500 (CDT) (Smail-3.2.0.104 1998-Nov-20 #1 built 1998-Dec-24) Date: Sun, 16 May 1999 13:54:42 -0500 (CDT) From: James Wyatt To: Andreas Klemm Cc: xiyuan qian , freebsd-isp@FreeBSD.ORG Subject: Re: Why the file size becomes so large? In-Reply-To: <19990516104742.A74673@titan.klemm.gtn.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 16 May 1999, Andreas Klemm wrote: > On Tue, May 04, 1999 at 05:05:57PM +0800, xiyuan qian wrote: > > > > Hi, today I suddenly noticed that a file locates at /usr/local/program/data dir > > its size becomes 11235678909 large. Why? This file is wrote by a running prog. > > What's the reason? > > lsof from the ports collection can be used to determine, which process > opened the file just in case you don't know which application is causing > this. lsof rocks! I had some stale ftpds holding /var/adm/wtmp open the other day and rm'd it after gzipping it. When the space didn't come back, I knew something had it open. lsof shows file size too! I owe someone a beer! > And the question why the file size becomes so large sounds a little > bit silly to me. Perhaps the application simply writes so much data ?! > Or you started the application with extra verbosity, just in case it > is a logfile. Or you enabled debugging ... Uh, it doesn't sould *that* silly... The size (11235GB or 11.2TB!) is *much* larger than the drives I use even if you count ccds. This could be wither filesystem corruption or a 'sparse' file (holes in data). I would recommend you fsck the filesys immediately. If that shows OK, do a 'du -k' on the file and see how much disk space it's *really* using. If your application ever does an lseek() and write() (or fprintf()), one wrong offset and you can generate a *huge* sparse file - much larger than the disk. You just can't edit it, back it up (other than dump), or really fill it in. As Andreas said, if you can give us more context, we would be able to help you more. What created it, how big is the filesys, 'du -k', etc... btw: Some X servers use a rather sparsee 256MB shared memory segment (for color mapping?) and run on less than that amount of VM. Weird... - Jy@ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message