home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / misc / 4861 < prev    next >
Encoding:
Text File  |  1992-08-23  |  2.9 KB  |  66 lines

  1. Newsgroups: comp.os.msdos.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbfsb!cbnewsg.cb.att.com!rnichols
  3. From: rnichols@cbnewsg.cb.att.com (robert.k.nichols)
  4. Subject: Re: Hard drive utility (re-post with corrections)
  5. Message-ID: <1992Aug23.192452.21739@cbfsb.cb.att.com>
  6. Summary: Large clusters unavoidable in large partitions
  7. Keywords: cluster partition
  8. Sender: news@cbfsb.cb.att.com
  9. Organization: AT&T
  10. References: <1992Aug23.102643.28898@usenet.ins.cwru.edu>
  11. Distribution: na
  12. Date: Sun, 23 Aug 1992 19:24:52 GMT
  13. Lines: 51
  14.  
  15. In article <1992Aug23.102643.28898@usenet.ins.cwru.edu> as789@cleveland.Freenet.Edu (Francisco J. Diaz) writes:
  16. >
  17. >Hi All! I'm looking for a utility that can change my sector size
  18. >in my 150 Megs ESDI HD. It is 4k each sector and recently I have
  19. >found that such a size represents a lot of wasted space due to
  20. >all the slack that is left over in tiny. As I understand, even if
  21. >the file is just a few bytes long it will occupy the whole 4k
  22. >sector thereby wasting space. I have been told that I can make
  23. >different partitions to reduce the sector size but I'd rather
  24. >leave it as it is (1 partition) ...
  25.  
  26. I believe you are referring to CLUSTER size, not SECTOR size.  Last I knew,
  27. BIOS and DOS were pretty well hard-wired to a 512-byte sector size.  Since
  28. a cluster is the minimum allocation unit, though, everything you said is,
  29. in effect, true.
  30.  
  31. Now for the bad news.  Linking information for the chain of clusters that
  32. contain a file is kept on disk in the File Allocation Table (FAT), which,
  33. on a large hard drive, has a 16-bit entry for each cluster to indicate
  34. the next cluster in the chain.  This means that there can be at most
  35. 65518 clusters (64K less a few values which have special meaning).  So,
  36. for a given cluster size, there is a maximum partition size.  DOS requires
  37. that the number of sectors per cluster be a power of 2 (I just verified
  38. that by playing with the boot record on a floppy), so the max partition
  39. sizes for each permissible cluster size are as shown below (in round
  40. numbers):
  41.  
  42.    Sectors/Cluster  Bytes/Cluster   Max. Partition
  43.     1         512         32MB
  44.     2        1024         64MB
  45.     4        2048        128MB
  46.     8        4096        256MB
  47.  
  48. Thus, the minimum cluster size for a 150MB drive is 4906 bytes -- just what
  49. you have now.
  50.  
  51. Splitting the disk into two equal partitions would allow 2048-byte clusters,
  52. which is about as low as you would want to go.  Smaller clusters means
  53. more overhead accessing large files as well as more opportunity for
  54. fragmentation.  In addition, this eats up memory since, while a disk is in
  55. use, DOS keeps the entire FAT in memory.
  56.  
  57. Perhaps the simplest way to go would be to split the drive into 2
  58. partitions (BACK IT UP FIRST -- a high-level reformat will be required
  59. on each partition).  You can then use the JOIN command to make the
  60. second partition appear as a subdirectory on the first.
  61.  
  62. Clear as mud, right?
  63.  
  64. Bob Nichols
  65. rnichols@ihlpm.ih.att.com
  66.