Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!src.honeywell.com!msi.umn.edu!cs.umn.edu!dmshq!com50!rosevax!atc!cimcor!hawkmoon!det From: det@hawkmoon.MN.ORG (Derek E. Terveer) Newsgroups: comp.unix.sysv386 Subject: df reports incorrect # of blocks on floppy with mkfs Keywords: esix, df, mkfs, ffs Message-ID: <1990Nov25.064059.9951@hawkmoon.MN.ORG> Date: 25 Nov 90 06:40:59 GMT Organization: Home System (One of the Eternal Champions); Eagan, MN, 55123-2507, USA Lines: 40 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@hawkmoon.MN.ORG Minnesota Field Hockey Association, North Central Section University of Minnesota Women's Lacrosse, Midwest District