From: scott@mycro.UUCP (Scott C. Sadow)
Newsgroups: comp.os.msdos.misc
Subject: Re: setting allocation unit size of a hard disk?
Date: 8 Apr 92 13:49:17 GMT

In article <1992Apr2.173145.1@cc.helsinki.fi>, news@klaava.Helsinki.FI (Uutis Ankka) writes:
>I would like to format my 10 MB hard disk to use allocation unit size
>(or cluster size) of 1024 bytes or less. There seems to be no option
>in the format command to set allocation unit size - DOS 5.0 manual says
>only that the size of the allocation unit depends on the size of the
>hard disk. If I format the hard disk with DOS 3.3 format command the
>allocation unit size will be 4096 bytes for my 10 MB hard disk.
>
>IS THERE ANY (SAFE) WAY TO FORMAT THE 10 MB HARD DISK WITH ALLOCATION
>UNIT SIZE LESS THAN 4096 BYTES?
>
>WHAT RULES DOES DOS USE IN DETERMINING ALLOCATION UNIT SIZE GIVEN HARD
>DISK SIZE?
>
>As you know, half of the last allocation unit is empty on the average
>for each file; so if I have 1000 files and allocation unit size is 4K
>I have wasted 4K*1000*0.5=2MB of disk storage, which is 20% of the
>total 10MB! That's why I want to decrease allocation unit size.

   I have a 40MB disk split into 2 20MB partitions. Formatted under DOS
5.0, the default cluster size was 2K. I changed this to 1K per cluster.
Everything has been fine for over a month, and neither CHKDSK nor the
Norton Utilities see anything wrong with the drive.

   Changing the cluster size is easy, especially with a program like the
Norton Utilities. (The program lets you edit your disk easily)  The only
problem is that when you change the cluster size, you will lose everything
on the disk. (Changing the cluster size changes the FAT, the FAT size and
where the root directory is)  Therefore, to change the cluster size, you
must copy everything off that drive.

   The cluster size can be as little as 512 bytes/cluster (1 sector), but
I have found 1K is a practical minimum for performance reasons. The only
limit on cluster size is that there can not be more than about 64K
clusters on a disk.

   With this all said, the procedure to change the cluster size is as
follows. (This is what I did convert from 2KB clusters to 1KB clusters)

   1) Copy everything off the drive. (Changing the cluster size is like
using the DOS FORMAT command)

   2) Change the disk parameters. Unfortunatly, I don't recall off the top
of my head how to do this. It is not for the sqeemish to derive the
method. I need to spend some time on it to make sure what I did is the
correct way for DOS. I may also come up with a program to check your
drive, show your current numbers, and either show new numbers or modify
you drive.

   3) Run CHKDSK and something like the Norton Utilities to verify
everything is OK. Then copy some test files onto the disk and make sure
everything looks ok. Re-run CHKDSK, etc.

   4) Copy everything back to the drive.



   Sorry I don't have the exact information in this post, but I need to
verify it. (Which will take a day or so, in between real work) The bottom
line is that it is possible to change the cluster size to something other
than what FORMAT sets it to.


   Scott C. Sadow
   scott@mycro.UUCP
   ...gatech!nanovx!mycro!scott
Newsgroups: comp.os.msdos.misc