|
|
|
|
|
Large Disks: How OS/2 Uses Them, Part 1
By: Walter Metcalf
Date: 07/22/98
Introduction
PC's did not always come with built-in hard disks. Microcomputers originally
ran exclusively on floppy drives whose capacity was at most 720K. Although the simple
file indexing system developed for diskettes by Microsoft
known as FAT was flawed in design, it worked reasonably well for disks of such small
capacity. The FAT system is flawed in two ways:
-
If even one bit in the small FAT table is corrupted, then the whole disk(ette) can
be lost!
-
The size of the FAT table is restricted. Therefore as disks get bigger, each bit
in the FAT table is required to represent more than one sector of disk space (known
as a cluster),
leading to the possibility of small files taking up much more space on the disk
than they should and wasting disk space. On a 2 GB drive, up to 40% of the drive can be wasted
in this way.
As long as disk storage was limited to floppies, or very small hard drives, these
problems really didn't matter too much. With the advent of very large disks, however,
the FAT system is clearly becoming unworkable, and IBM
and Microsoft are developing new technologies to handle the larger drives.
Limitations
There are several limitations, or barriers, you may encounter when using hard
drives. These barriers can usually be crossed as long as careful attention is paid
to certain details. Before dealing with these barriers, we need to briefly look
at a new file system introduced by OS/2, the High
Performance File System or HPFS.
-
HPFS was designed to overcome the limitations and inefficiencies of the FAT system.
With HPFS the cluster size is always 512 bytes, regardless of the disk size. (Throughout
Part 1 of this series, I will assume for the sake of simplicity the hard disk contains
only one partition. I'll deal with partitioning later on.) In addition HPFS uses
a far more robust indexing system which prevents the massive loss of data when a
small table is corrupted. Finally, under HPFS, when files are written, empty spaces
are deliberately left at the end and sometimes in the middle of the files to allow
room for expansion. This greatly reduces the fragmentation that so plagues FAT drives.
There are commercial HPFS "defraggers" and I've used them occasionally;
but I always come away feeling the result wasn't worth the time involved! Although
OS/2 supports the older FAT system, HPFS is preferred and should be used except
where there is a compelling reason for DOS or Windows to access the OS/2 files.
Now let's look at each of the barriers in turn.
-
Barriers Imposed by the Hardware
-
IDE and EIDE drives
The 512MB Barrier
-
By default your computer accesses data on a disk drive by specifying a cylinder
number, head number, and sector number. (Technically this is known as "logical
geometry," which differs from the internal or physical geometry used by your
drive.) Like several other computer schemes, logical geometry is inherited from
older hardware designs, in this case IDE drives. This geometry is limited to 1024
cylinders, 16 heads, and 64 sectors resulting in a maximum specification of 1,048,576
sectors or 536,870,912 bytes (512 MB). (Each sector contains 512 bytes.) This is
the infamous 512 MB barrier. Sometimes this barrier is "rounded off" to
cylinders and spoken of as the 1024
cylinder or 504 MB limit.
Since it's difficult to even buy a disk this "small" today, we need
a different access method.
-
The 512 MB barrier is crossed by selecting the Large
Block Addressing (LBA) feature available on practically all modern hard drive
controllers. This is a much a simpler scheme in which the first sector on the drive
is number 0, the second is number 1, and so on until the last physical sector of
the drive. Another important feature of LBA is that the sector number can be 32
bits long. This enables your computer to access up to 2 terabytes of data. (1 terabyte
= 1024 GB.) Note that the FAT system imposes additional limitations so that the
2 terabyte limit can only be realized if the drive is formatted as HPFS. These FAT
limitations will be discussed under "Barriers Imposed by the Software"
in Part 2 of this series. See the Quantum white paper entitled, Breaking the 2.1
Gigabyte Barrier, for more information.
-
To access the LBA feature, reboot your computer; then watch for and follow the instructions
for entering Setup. On my computer, the LBA setting is located under "Standard
CMOS Setup." (The wording on your computer may be slightly different.) Follow
the on-screen directions for changing the disk access mode to LBA. (I suggest that
for the sake of simplicity you set all your drives to LBA and leave them that way.)
-
Important note: Selecting or deselecting LBA mode will DESTROY all data on
the affected drive. So before changing the LBA setting, be sure to back up your
drive. If this drive contains your operating system you should first reboot from
floppies or from a maintenance
partition in order to get a complete backup.
-
Occasionally when installing a disk with LBA on an older computer, you may find
that you are unable to select LBA or that LBA is ineffective. It's possible that
the motherboard itself is incapable of handling large drives. Check your motherboard
manual carefully for any restrictions on hard disk size. If you find yourself in
this position, you can install Ontrack's
Disk Manager software. This software may be available for free download from your
disk manufacturer's web site. Otherwise you will have to purchase
a copy from Ontrack. Ontrack Disk Manager remaps the disk structure at boot time
so that you can access the entire disk. Another less expensive product designed
for the same purpose is EZ-Drive
from Microhouse. Unfortunately,
however, I haven't had the opportunity to test it.
-
SCSI Disks
The 1 Gigabyte Barrier
(Note: The above limit is based on the Adaptec 2940W adapter. It may be different
with your adapter. )
SCSI disk drives are handled somewhat differently from IDE, but the basic results
are the same. Here is a summary of the main differences:
-
There is no LBA option in the CMOS; the disk settings under Basic CMOS Setup are
for IDE drives only;
-
Instead of an LBA in the CMOS there is an option in your SCSI adapter to
enable large drives. On the Adaptec 2940W I have the setting is labelled "Extended
BIOS translation for DOS drives > 1 GB." The wording is likely to vary from
one manufacturer to another, but you should be able to recognize it easily.
-
Warning: Like the LBA setting, changing this setting will DESTROY data,
but in this case it will destroy the data on ALL drives connected to adapter! Be
sure you back up all those disks, first rebooting from floppies or a maintenance partition if necessary.
My next feature will continue this series by looking at "Barriers Imposed
by Software." Stay tuned!
Unless otherwise noted, all content on this site is Copyright © 2004, VOICE
|
|
|
|
|
|
|