[net.unix] 4.2BSD Filesystem troubles....

peterb@pbear.UUCP (01/14/86)

[cannon fodder for the line eater...]

I am working with a vanilla 4.2BSD VAX system, and I have been noticing that
disk space is vanishing from my filesystems. I have a 45Mb filesystem that
fsck says has 13Mb free, but df states is full.!!..??? (and can't be written to)

I am upset that fsck (in 4.2) has no option to FORCE it to salvage cylinder
groups. Can anybody give me any ideas (rather than the obvious rebuild the
disk from tapes)...

HELP!!!!

Peter Barada
ihnp4!ima!pbear!peterb

guy@sun.uucp (Guy Harris) (01/16/86)

> I am working with a vanilla 4.2BSD VAX system, and I have been noticing that
> disk space is vanishing from my filesystems. I have a 45Mb filesystem that
> fsck says has 13Mb free, but df states is full.!!..??? (and can't be
> written to)

4.2BSD reserves a certain percentage of the free space on a file system;
only processes running as superuser can get at that space.  The normal
percentage is 10%, although it's tunable.  The reason for this is that the
block allocation code gets slower when the free space drops below about 10%;
see the paper "A Fast File System for UNIX", in the section "Layout
Policies".  That paper comes with the 4.2BSD documentation.

"fsck" reports the total free space; "df" reports only the free space
available to non-superusers.  (That's why it sometimes reports that a file
system is more than 100% full.)

	Guy Harris

steve@jplgodo.UUCP (Steve Schlaifer x3171 156/224) (01/17/86)

> 
> I am working with a vanilla 4.2BSD VAX system, and I have been noticing that
> disk space is vanishing from my filesystems. I have a 45Mb filesystem that
> fsck says has 13Mb free, but df states is full.!!..??? (and can't be written to)
> 
I don't know if this applies in your case but on a Ridge 32 running ROS 3.3
(a derivative of system V) file space is allocated in 4K chunks.  If you
build a 100 byte file, for example, its size is reported (by ls -l) as 100
bytes but it takes up 4K bytes of disk space.  If you build lots of small files
this way, you will use up the disk but adding up the file sizes will still
indicate that there is lots of room left.  df uses the number of 4K blocks
available to report the amount of free space left and will show that the disk
is full.  One solution is to build an archive file (using ar or tar) to put
all the small files in.  This could then fit 40 100 byte files into a 4K block
rather than using 160K bytes of disk to hold them if they are seperated.

...smeagol\			Steve Schlaifer
......wlbr->!jplgodo!steve	Advance Projects Group, Jet Propulsion Labs
....group3/			4800 Oak Grove Drive, M/S 156/204
				Pasadena, California, 91109
					+1 818 354 3171