Path: news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!manawatu.planet.co.nz!manawatu.gen.nz!chch.planet.co.nz!news.plain.co.nz!news.express.co.nz!actrix.gen.nz!dempson.actrix.gen.nz!user From: dempson@actrix.gen.nz (David Empson) Newsgroups: comp.sys.apple2 Subject: Re: Quantum LPS240 Date: Fri, 02 Aug 1996 01:27:27 +1200 Organization: Empsoft Lines: 104 Message-ID: References: <31FE1726.205E@cardshow.com> NNTP-Posting-Host: dempson.actrix.gen.nz In article <31FE1726.205E@cardshow.com>, webmaster@cardshow.com wrote: >I have a QUANTUM LP240S GM24S01X Hard Drive mechanism and when >formatted, only :) 199MB are available. I thought the name meant "240MB >capacity". Is this normal? There are two points here which partially explain things. 1. The definition of "megabyte". There are two ways of interpreting the term "megabyte". You can either read it as "one million bytes", or as the nearest power of two (2^20 = 1048576 bytes = 1024 x 1024 bytes, where 1024 bytes is one kilobyte). Quantum uses the smaller figure when describing their hard drive capacities, so a Quantum "240 megabyte" disk is actually able to hold approximately 240 million bytes. Using the other measure, this works out to 228 megabytes. 2. Overhead of the file system. Every file system has a certain amount of reserved space for special functions including boot code, identifying the characteristics of the disk, directory information, file location information, disk space usage information. The organisation of this data varies between file systems, but it can add up to quite a lot on a large hard drive. I'll give an example, ProDOS (the file system with which I'm most familiar). On a large SCSI hard drive, you have to divide the disk up into multiple 32MB partitions, since this is the largest partition size supported by ProDOS. A small area at the start of the hard drive is reserved for storing information about all of the partitions. This varies in size depending on the software that was used to partition the drive, but it is probably using up about 32KB of disk space. There may also be some reserved space for device drivers for the Macintosh (a disk partitioned with Advanced Disk Utilitiy on the IIgs has provision for four 16KB drivers, so a total of 96KB is used up before you get to the first ProDOS partition). Within each ProDOS partition, the fixed overhead consists of six blocks (one for the boot code, one unused, four for the root directory), plus a number of blocks for the disk space allocation bitmap, which is proportional to the size of the disk. For a 32MB partition, the bitmap requires 65536 bits, which uses 16 blocks. You therefore have a minimum overhead of 22 blocks, or 11KB per ProDOS partition. In addition to this overhead, every subdirectory on a ProDOS volume requires at least one block. This allows for 12 files in the subdirectory. Further blocks are required if there are more files, with room for 13 files in each subsequent block. Every file that is larger than one block also requires at least one index block to keep track of where its data is located. This is one block for any file up to 128KB. For larger files, a two-level index is required. The number of index blocks will be at least three, and can be as many as 129 index blocks for a 16MB file (the largest file size supported by ProDOS). Any file which has a resource fork has one additional block of overhead, plus a duplicate of the index structure for keeping track of the resource fork. Thus on a large volume, you could have a lot of overhead within the file system. For arguments sake, if you had 500 files on the volume, each less than 128KB on average, with about 10% of the files containing small resource forks, arranged into reasonably sized directories, you would have about 700 blocks (350KB) of file system overhead on the partition. A 228MB volume would have to be subdivided into at least 7 partitions, so on a full hard drive you might have as much as 2450KB of file system overhead (about one percent). Other file systems use different methods of allocating disk space to their book-keeping data structures. The Macintosh's HFS file system, for example, pre-allocates a large amount of space for keeping track of files on the disk. You may find that it uses up a few percent of the disk space on a newly partitioned hard drive, just to allow for efficient file handling. You didn't indicate which file system you were using, but I expect it is HFS. Two other possible reasons for the low capacity come to mind: 1. There might be bad blocks on the disk, which have been locked out by the hard drive or the operating system. This is not very likely. 2. The hard drive capacity might not even be 240 million bytes. This is a rather approximate figure, and earlier drives may have been rather generously rounded up to a nice sounding figure. My Quantum Trailblazer "850 MB" drive actually holds 830149 KB, which is almost exactly 850 million bytes, but only 810 megabytes (going by one megabyte = 1024 kilobytes = 1048576 bytes). -- David Empson dempson@actrix.gen.nz Snail Mail: P.O. Box 27-103, Wellington, New Zealand