[comp.unix.questions] possible file size error

beaulieu@netcom.UUCP (Bob Beaulieu) (08/27/89)

How can I remove the message "Possible File Size Error I=3046"
from appearing each time I run fsck?

What does this exactly mean?

Thanks in advance for any advice

Bob Beaulieu
-- 
Bob Beaulieu
277-b Tyrella Avenue
Mountain View, CA 94043
(415) 967-4678

cpcahil@virtech.UUCP (Conor P. Cahill) (08/27/89)

In article <2218@netcom.UUCP>, beaulieu@netcom.UUCP (Bob Beaulieu) writes:
> How can I remove the message "Possible File Size Error I=3046"
> from appearing each time I run fsck?
> 
> What does this exactly mean?

This usually means that you have a file whose size is not compatable with 
the number of datablocks assigned to the file.  This usually occurs in
files where the software has caused a hole in the file.  This can 
be done as follows:

		fd = open("file", O_CREATE|O_TRUNC|O_WRONLY);

		lseek(fd,1024L*1024L,0); 	/* seek to 1 meg */
		
		write(fd,"I'm at 1 meg\n",13);

While my example is a bogus case, many database applications will
cause this type of event to occur. 

I have seen this caused accidentally by haveing one program writing 
to a log file in the "append" mode and the file was truncated by
another program while the first program was still running.  The 
append mode of the program caused the first program to write the
next log message at the same location it would have written the
message had it not been deleted, creating a big (37 meg) hole
in the file.  This was under SysV.2 and I don't know if that
behavior still exists in SysV or BSD.


All in all this is not a fatal problem, but you should track 
down that file (using the inode number) and verify that it is 
ok for it to have holes in it.  If not, and the data in 
the file is unneeded, remove the file.

If you really don't want to see these kind of messages, add
the -q option to fsck.
-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

will@presto.ig.com (Will Nelson) (09/04/89)

In article <2218@netcom.UUCP>, beaulieu@netcom.UUCP (Bob Beaulieu) writes:
> How can I remove the message "Possible File Size Error I=3046"
> from appearing each time I run fsck?
> 
> What does this exactly mean?
> 
> Thanks in advance for any advice
> 
> Bob Beaulieu
> -- 
> Bob Beaulieu
> 277-b Tyrella Avenue
> Mountain View, CA 94043
> (415) 967-4678

We used to see this many years ago on Onyx machines.
I don't remember exactly what caused it, but we did something like:

	ncheck -i 3046 filesystem

	cp offending_file offending_file.old
	mv offending_file.old offending_file

The offending_file is determined by the output of ncheck.
This got rid of the fsck complaint.
-- 
Will Nelson			Internet: will@presto.ig.com
Intelligenetics, Inc.		Uucp:     orc!ig.com!presto!will
700 East El Camino Real		(415) 962-7363
Mountain View, CA  94040

cpcahil@virtech.UUCP (Conor P. Cahill) (09/05/89)

In article <Sep.4.09.11.43.1989.19188@PRESTO.IG.COM>, will@presto.ig.com (Will Nelson) writes:
> In article <2218@netcom.UUCP>, beaulieu@netcom.UUCP (Bob Beaulieu) writes:
> >    [ stuff about file size errors from fsck ]
> 
> We used to see this many years ago on Onyx machines.
> I don't remember exactly what caused it, but we did something like:
> 
> 	ncheck -i 3046 filesystem
> 
> 	cp offending_file offending_file.old
> 	mv offending_file.old offending_file
> 
> The offending_file is determined by the output of ncheck.
> This got rid of the fsck complaint.

Yes, this would fill in the holes in the file with nulls that any
program would have gotten anyway, but you just increased the 
size of the file without any justification.  This file size error
message from fsck is just a warning.  If there is a reason for the
file with the hole (like a database file, or maybe an index file)
then you just caused it to take up more space than it really needs
to.

I would recommend that you just check to ensure that the file (or
the program that uses the offending_file) is supposed to have
holes in it and leave it alone.  It isn't bothering anybody.
-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+