When is a 3-1/2" 'bar' floppy full?

Glenn Roberts gfr at cobra.mitre.org
Fri May 5 17:12:13 AEST 1989


I'm trying to find a way to reliably determine when a 3-1/2" floppy is
nearly full (using 'bar' with the Z compression option).  When the floppy
fills up, 'bar' will prompt for you to pop in a second disk.  I took such
a "full" disk and used an awk program to add up the block counts (the file
'disk1' contains the output from the bar command that wrote to the disk):

{cobra:36} awk '{sum+=$3} END { print sum}' <disk1
2765

but dkinfo shows that there are 2880 sectors on the disk:

{cobra:39} dkinfo fd0c
Unknown controller at addr e0001000, unit # 0
80 cylinders 2 heads 18 sectors/track
can't get partition info
Not a valid partition.
{cobra:40} bc
80*2*18
2880

so maybe bar files always take up an even number of blocks?:

{cobra:41} awk '{sum+=$3; if ($3%2!=0) sum++} END { print sum}' <disk1
2816

I get close to the 2880 number, but not quite there.  Could one
cylinder be reserved for detecting when the disk is full or something?
Can anyone shed some light on this? 

(p.s. the March 89 STB shows how to make a file system on a floppy
disk:)

	mkfs /dev/rfd0c 2880 18 2 4096 512 8 5 6


- Glenn Roberts, The MITRE Corporation, McLean VA (703) 883-6820
  gfr at cobra.mitre.org



More information about the Comp.sys.sun mailing list