Organizing large drives. (hard drives and MS-DOS) (Column)
by Tony Roberts
Having a big, fat hard drive is wonderful, but managing large amounts of storage presents a new set of challenges.
For example, how should you set up your hard disk--one huge partition or two or more smaller ones? Let's look at the advantages and drawbacks of each setup.
The main advantage of assigning the entire disk to one large partition is convenience. Navigation is a little easier with everything in one place, but you run some risks.
Keeping huge amounts of data in one partition is like carrying all your eggs in one basket. If the FAT (File Allocation Table) for that partition gets scrambled, your entire data set could end up fried.
By breaking up your disk into partitions, each with its own FAT, you have some protection. If one FAT becomes damaged, your loss will be limited to the information in that partition.
Another issue to consider is cluster size and wasted space. A cluster is the smallest unit of assignable disk space, and an unnecessarily large cluster size wastes some of that precious space.
To check the cluster size of your disk, run CHKDSK. Near the bottom of the CHKDSK display, you'll see a line saying X bytes in each allocation unit. This tells you the cluster size. Every file is allocated disk space in clusters.
If your disk is a floppy disk, that cluster will likely be 1024 bytes. A 1-byte file would be allocated one cluster and occupy 1024 bytes of disk space.
Hard disks ranging in size from about 18MB to 120MB have cluster sizes of 2048K. Larger hard disks assign space in units of 4096K. So a 1-byte file on a 100MB hard disk would occupy 2048 bytes, and the same file on a 200MB hard disk would occupy 4096 bytes.
Let's say you have a hard disk with a 4096-byte cluster. Assume the disk holds 2500 files. The data in each file fills some clusters and partially fills one--the last--cluster. Some of these last clusters will be nearly empty, some will be nearly full, and most will be somewhere in between. For the sake of discussion, let's say the last cluster of each file averages one-half cluster (2048 bytes) of unfilled space.
Multiply the average unfilled space (2048 bytes) by the number of files (2500). You get 5,120,000 bytes of space that your files occupy but don't actually use.
If you break your hard disk into smaller partitions which use 2048-byte clusters, you can recover half of that unfilled space. Assuming that the average last cluster is still half-full, you've reduced your occupied but unused space to 2,560,000 bytes.
If you keep thousands of files on your hard disk, a smaller cluster size can pay off by giving you extra room to work. On the other hand, if your disk is used to store only a few multimegabyte database files, larger partitions may be a better choice. Your database will have room to grow, and you won't be concerned about running out of real estate for your data.
Breaking up a disk into partitions also helps at backup time. Imagine backing up a 200MB disk onto floppies. You can see that you'll want to be selective about what you backup. Some data you'll want to back up daily, some occasionally, some never.
I have all of my work files on one partition, and I back up my changed files on that partition daily. I use a second partition for files I never want to back up. I use this for test files or shareware programs that I'm trying out. If I like the product and intend to use it and register it, I move it to my main partition. If not, I just delete it.
My third partition is used for telecommunications activity--files to upload or download as well as incoming and outgoing messages. I back up this partition occasionally to make sure I can restore all of my programs, scripts, and configuration files, but I'm not too concerned about the data on this partition. If the file is important, it gets either printed out or moved to my primary partition.
Because I've arranged my disk this way, my daily back-ups are much faster and less intrusive than they would be if I had to deal with the entire hard disk.
Whether you have one huge partition or many smaller ones, you still have the same amount of data, and you must take pains to protect it. The larger your hard disk, the larger your loss if something goes wrong.
At the very least, run CHKDSK on each of your hard disk partitions daily. You can put the commands to do this in your AUTOEXEC.BAT file, and you'll learn early if anything is out of whack on your drive. At the first hint of a problem, take quick corrective action.
If you have a more powerful disk-fix utility, use it rather than CHKDSK to make sure your storage areas are sound. Such utilities are more comprehensive and easier to use than CHKDSK.
If your hard disk isn't set up the way you'd like, stay tuned. Next month we'll look at the FDISK command and discuss how to use it to partition your computer's hard disk.