Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!ns-mx!ns-mx.uiowa.edu!rpruess From: rpruess@umaxc.weeg.uiowa.edu (Rex Pruess) Newsgroups: comp.sys.next Subject: Re: Misc questions Message-ID: Date: 5 Mar 91 16:45:47 GMT References: Sender: news@ns-mx.uiowa.edu Organization: U of Iowa, Iowa City, IA Lines: 45 In-reply-to: aberno@questor.wimsey.bc.ca's message of 5 Mar 91 00:12:58 GMT In article aberno@questor.wimsey.bc.ca (Anthony Berno) writes: > Does anyone else have this problem with missing disk space? If you wouldn't > mind, please do the above calculation and tell me what you get. I'm curious Hmmm. I'm curious now. Looking at the mkfs and df output, there is a fair amount of space used before you even get a chance to save files on the disk. I assume mkfs takes a good chunk of space for overhead (e.g., superblocks, inode allocation, and reserved space for efficiency). Here's a chopped down version of the mkfs output: /etc/mkfs -N /dev/rsd0a 357560 22 10 8192 1024 32 10 60 4096 /dev/rsd0a: 357560 sectors in 1626 cylinders of 10 tracks, 22 sectors 366.1Mb in 51 cyl groups (32 c/g, 7.21Mb/g, 1728 i/g) The mkfs parm 357560 is the number of 1024 byte sectors. This yields a total space of: 357,560 * 1024 = 366,141,440 bytes The third to last mkfs parm is the minfree parm which is 10 in this case. Thus, 10% of the disk is reserved. See the mkfs man page for details. Output from the df command follows: % df Filesystem kbytes used avail capacity Mounted on /dev/sd0a 345711 225040 86099 72% / Note that used+avail is 311139 or about 10% less than kbytes (345711). This is due to the space reserved to allow the file system to work well. See the df man page for details. (I assume this 10% is a direct result of the mkfs minsiz parm.) The df output shows the partition has 354,008,064 bytes in it: 345711 * 1024 = 354,008,064 The difference between mkfs & df is about 3%. Again, I assume this is the overhead for superblocks, inode tables, etc. 366,141,440 (mkfs) - 354,008,064 (df) ----------- 12,133,376 (about 3% diff) -- Rex Pruess, Weeg Computing Center, Univ of Iowa, Iowa City, IA 52242 rpruess@umaxc.weeg.uiowa.edu (NeXTmail) (319) 335-5452