df reports incorrect # of blocks on floppy with mkfs

Derek E. Terveer det at hawkmoon.MN.ORG
Sun Nov 25 17:40:59 AEST 1990


Hmmm, I noticed this just today, when one of my programs (that does a df -t on
floppies) reported a wild value for the number of blocks on a 5.25" floppy.
Looks like df can't tell the type of file system it is dealing with...?
It must assume that it is a FFS.

Script started on Sun Nov 25 01:32:46 1990
hawkmoon$ format /dev/rdsk/f0t
formatting................
Formatted 160 tracks: 0 thru 159, interleave 2.
hawkmoon$ mkfs /dev/dsk/f0t 2400
Mkfs: /dev/dsk/f0t? 
(DEL if wrong)
bytes per logical block = 1024
total logical blocks = 1200
total inodes = 288
gap (physical blocks) = 7
cylinder size (physical blocks) = 400 
mkfs: Available blocks = 1179
hawkmoon$ df -t /dev/dsk/f0t
          (/dev/dsk/f0t    ): 2147482992 blocks      286 i-nodes
                      Total :     2400 blocks      288 i-nodes
hawkmoon$ hawkmoon$ /etc/ffs/mkfs /dev/dsk/f0t 2400
Warning: 160 sector(s) in last cylinder unallocated
/dev/dsk/f0t:	2400 sectors in 5 cylinders of 16 tracks, 32 sectors
	1.2Mb in 1 cyl groups (16 c/g, 4.19Mb/g, 512 i/g)
Volname: 	BSD directory format (255 char. filename)
super-block backups (for fsck -b#) at:
 32,
hawkmoon$ df -t /dev/dsk/f0t
          (/dev/dsk/f0t    ):     2188 blocks      508 i-nodes
                      Total :     2206 blocks      512 i-nodes
hawkmoon$ labelit /dev/dsk/f0t
Current fsname:, Current volname: Blocks: 2206, Inodes: 512
FS Units: 512b, Date last modified: Sun Nov 25 01:34:52 1990
hawkmoon$ 
script done on Sun Nov 25 01:35:21 1990
-- 
Derek Terveer						det at hawkmoon.MN.ORG
Minnesota Field Hockey Association,  North Central Section
University of Minnesota Women's Lacrosse,  Midwest District



More information about the Comp.unix.sysv386 mailing list