Using Hard DisksAll disk drives must be initialised before they can be used to store information. This process organises the areas of the disk in a way that can be understood by the computer. Most modern machines come with the internal drive already prepared, allowing you to start work immediately. However, if something really nasty happens you may need to re-initialise the disk.
A typical disk formatting application splits the job up into more than one operation. For best results on a damaged disk you should begin with low-level formatting, which is invariably followed by high-level formatting. Unfortunately, some applications refer to low-level formatting simply as formatting, whilst high-level formatting is confusingly known as initialisation.
The three operations performed by a formatting application are:-
This allows the drive work with a computer at its most basic level. The formatting process organises the usable sectors in each track or cylinder of the disk into packages known as allocation blocks, each of which is given an address marker. The largest possible block can occupy an entire cylinder, whilst the smallest possible block is the same size as a single sector.
Usually, one or more alternate or spare sectors are assigned to replace any faulty sectors that are found in each track. Details about these bad data blocks are stored in a special area of RAM assigned to the drive, allowing the computer to use the spare sectors instead of faulty blocks.
This process, also known as logical formatting, rebuilds the disk directory, forming a logical disk structure that can be understood by the operating system. It creates the following items:-
In the case of the Mac OS, this is basically the same as erasing a disk, although some formatting applications use a more extensive initialisation process that removes and replaces soft partitions and drivers (see below) prior to erasing the disk.
Most formatting applications let you to manually update the driver software that’s hidden away on your hard disk. In most instances a high-level format will also install it. Ideally, you should update your driver whenever you upgrade your Mac OS, although this is often impractical if you have a drive that’s incompatible with Apple’s formatting applications. Even so, it’s a good idea to contact the vendor of a non-standard drive to see if there’s an update available.
Using a Formatting ApplicationIf you have an Apple drive, you usually initialise it using the software that came with the Mac OS. A third-party drive can be more difficult, although if it doesn’t have its own software you can try using the Mac OS applications. For example, if you have a PowerPC-based machine with an IDE drive, you may find that your disk can be formatted with Apple’s Drive Setup application (see below). However, you should be aware that many drives can’t be formatted with Apple software.
The following points are important:-
Before using a formatting application you should take the following steps:-
Your chosen formatting application must be on a different drive to the one your about to format. You can accommodate this by selecting the drive containing the application in the Startup Disk control panel: you must then select Special ➡ Restart in the Finder.
Ideally, before running a formatting application you should start your computer without any extensions enabled. If you’ve restarted using one of the methods described above this isn’t a problem. However, if you want to start up from another drive containing the formatting application and a normal system you should disable all non-Apple or unnecessary items in the Extensions Manager control panel. Alternatively, you can hold down Shift during startup.
The following applications can be used for formatting:-
Drive SetupThis application, which is provided with modern versions of the Mac OS, can format Apple drives and some third-party drives of the IDE/EIDE or ATA (IDE) variety, as found in PowerPC-based computers and also in some later 680x0-based machines.
The range of supported drives varies with the version of Drive Setup, but can include models by Avid, Conner, Fujitsu, IBM, Iomega, Quantum, Ricoh, Seagate, Sharp, Sony and SyQuest, as well as most PowerBook drives. If you’re uncertain, just run the application to see if your device appears in the window: if it isn’t there, you’ll have to use another formatting program. As a first option, you should try Apple HD Setup (see below). Failing this, you’ll have to use third-party software.
Apple HD SC SetupThis application, supplied with older versions of the Mac OS, is suitable for a 680x0-based computer with a SCSI internal drive and can be used to format both internal or external SCSI drives. However, it can only be used with drives that are recognised by Apple.
Third-party SoftwareIf your drive isn’t recognised by the above applications you’ll have to use third party software, such as HDT Primer (part of HD Toolkit), SpotOn, Silverlining or a similar application. Fortunately, drives are often supplied with such software, in some instances customised to suit a particular device.
Most formatting applications let you choose a range of special options. Unless you’re an expert, many of these are best left at their default settings.
Block Size and HFSMost drives formatted before Mac OS 8.1 use the Hierarchical Filing System (HFS), known in Apple terminology as the Mac OS Standard format. During HFS initialisation, each drive or partition (see below) is divided into a maximum of 65,536 blocks, giving a block size that’s always a multiple of 512 bytes. This table shows the relationship between drive size and block size:-
| Drive Size (MB) | Block Size (bytes) |
|---|---|
| 1 - 32 | 512 |
| 33 - 64 | 1024 |
| 65 - 96 | 1536 |
| 97 - 128 | 2048 |
| 129 - 160 | 2560 |
| 161 - 192 | 3072 |
| 193 - 224 | 3584 |
| 225 - 256 | 4096 |
… and so on
Hence a very modest 600 MB drive ends up with a block size of 9.5 KB whilst a larger drive has blocks of 64 KB or more. Unfortunately, even the smallest file will occupy an entire block. For example, with blocks of 4096 bytes, a 500 byte file will use all 4096 bytes of one block. If you have numerous small files this is a terrible waste of disk space.
One solution is to split the drive into partitions (see below), so that it can be initialised with smaller blocks. This creates one or more divisions in the drive (which may or may not be a useful feature), making the drive appear as two or more icons on the desktop.
HFS+Mac OS 8.1 and higher solves the block size problem by using Hierarchical Filing System Plus (HFS+), also known as the Mac OS Extended format. This allows up to 4.25 billion allocation blocks to be used, giving the following results:-
| Drive Size (MB) | Block Size (bytes) |
|---|---|
| Up to 256 | 512 |
| 257 - 512 | 1024 |
| 513 - 1 GB | 2048 |
| Over 1 GB | 4096 |
Typically, using HFS+ on a 1 GB drive gains 100 MB of usable space compared with ordinary HFS. It also provides for long file names containing up to 255 Unicode characters, although these aren’t supported with Mac OS 9.x or earlier. It also accommodates files of 2 GB or larger and enables extended file attributes. Apart from this, there isn’t much advantage in using it for drives smaller than 1 GB. In fact, drives of less than 32 MB can’t be initialised using HFS+.
To initialise a disk with HFS+ you should select the drive and choose Special ➡ Erase Disk in the Finder. Then select Mac OS Extended format in the next dialogue’s pop-up menu. Alternatively, you can run Drive Setup, version 1.4 or later, select Initialise and then choose Mac OS Extended format, together with any other options you require. Drive Setup can also partition a disk into multiple volumes, each partition having its own format.
Other OptionsThe most common options provided by a formatting application include:-
This feature, which is only provided in advanced formatting applications, prevents the computer from checking data as it’s recorded onto the drive. Although this can double the writing speed, there’s a serious risk to data integrity. For this reason, you should leave this option turned off!
In most applications you can enter a name for the drive, such as Macintosh or Hard Disk. When reformatting a drive for existing software it’s advisable to keep the drive’s original name, otherwise some applications may lose track of the disk and the files that are on it.
Most non-Apple applications let you choose an icon before formatting. If those provided aren’t to your taste just use any icon. Then, once formatting is complete, you can highlight the disk in the Finder, choose File ➡ Get Info ➡ General Information and then paste a new icon of your own choice in place of the original. If you have a drive with partitions (see below) you can paste a different icon onto each one.
Sectors can be interleaved to help a processor read the data from the drive. Older Macs used a 2:1 or 3:1 interleave whilst the Apple II used 4:1. All modern machines use 1:1, which means that they don’t employ interleave at all!
A drive always work faster if the machine’s preferred interleave matches that used to format the disk. For example, a drive initialised on an ancient Mac Plus and then used on a modern machine won’t be as fast as one formatted on a newer model, since the new machine has to wait for every second or third block of data, rather than using the blocks in sequence.
A drive formatted on a modern machine and then used with a Mac Plus is even worse! The blocks are in sequence but the old machine can’t accept data that fast. Hence the disk has to turn almost a full rotation before the next block again passes the head and the data is extracted.
Before updating the Mac OS on an Apple-compatible drive you should update its driver using the latest version of Drive Setup or Apple HD SC Setup, as supplied with the Mac OS. If you have a non-Apple drive you should check with your supplier to see if an updated driver is available.
Mounting a DiskA drive is mounted whenever you can see it on the desktop. When a removable disk is inserted it should mount automatically, a process known as auto-mount. A drive inserted before startup always mounts automatically since the Mac OS reads the driver from it during the startup process.
A drive can’t mount if the data identifying its type and size is lost. If you have a SCSI drive you can mount it manually using SCSIProbe or HDT Prober. Failing this you can run Disk First Aid (supplied with the Mac OS), select the drive and click on Repair. If this doesn’t work the first time, keep trying! As a final resort you can try Norton Utilities. If the drive still refuses to mount, run your disk initialisation application and proceed with the following steps until its icon appears:-
Partitioning splits a drive into separate compartments known as logical volumes. At least one of these, usually the largest, is used by the Mac OS for files created within the Mac’s environment. Others can be used for HFS or HFS+, other operating systems, disk driver(s) and optional free space.
You can add extra partitions for your own convenience or to minimise the block size of a drive (see above). If inclined, you can create three Mac OS partitions: for example, you could use the first to store your System Folder, the next for the Applications folder and the last for your Documents folder. Each of these partitions then appear as a separate drive icon on the desktop.
Two types of partitioning are used:-
Hard partitions are created during low-level formatting by dividing the disk into groups of tracks.
Soft partitions, which can be created using a formatting application such as HDT Primer, Norton Utilities, allow you choose your partitions after initialisation. Although the size of partitions can be altered at any time you should back up your data before making any adjustments.
Drive verification checks the disk’s reliability. The process is often undertaken automatically by a formatting application after initialisation a disk or may be implemented manually.
Two methods are used:-
This test, which is almost completely foolproof, records onto the entire surface of the disk, destroying all the data, identifying any faulty sectors in the process. A record is kept of these sectors, allowing them to be avoided in all subsequent operations.
A cyclic redundancy check (CRC) is a non-destructive process in which the data in each sector is compared with related redundant values located at the start of each sector. The process doesn’t normally harm your data but may identify faulty sectors, making them inaccessible.
The most common system is known as CRC-16, in which data is split into blocks of 128 bits (16 bytes). A single bit is then chosen from each byte, in a defined sequence, to create the CRC block itself. These redundant bits are then used to check the validity of the data. Unfortunately, the technique isn’t foolproof, since two wrongs can often make a right!
Drive SolutionsAfter a period of use, a disk can become fragmented. Parts of each file get scattered across the disk and are interspersed with other material, slowing down the drive as it hunts for all the pieces.
This problem can be solved by optimising or defragmenting the drive, using an application such as Speed Disk, CP Optimiser or DiskExpress. In some applications the process can also check for weak sectors and can mark bad blocks to avoid them in future.
The optimisation process extracts files from the disk and writes them back into contiguous sectors on the same drive. Each file then occupies less disk area, thereby reducing wear and tear on the mechanism. However, a small amount of disk capacity can be lost in the process.
©Ray White 2004.