Mac OS X supports multiple device types that can be accessed as a disk. These include physical disks such as hard drives, FireWire and USB drives, multiple hard drives combined into a RAID, CDs and DVDs, various forms of flash memory (including thumb drives and the iPod Shuffle), network disks residing on a server, and virtual disks that can exist in memory or be derived from files on another filesystem. Even though disks can take many forms, from the user perspective, a disk is a disk is a disk. As long as the disk stores data, and files can be moved and copied between them without too much thought, that’s all any user really cares about, right?
To the system, however, two layers mediate between the operating system and disks:
Device drivers that translate standard system file access calls into a form understood by the disk
Filesystems that organize data on a drive into a form that can be accessed by a device driver
Mac OS X has device drivers, in the form of kernel extensions (
kexts), for most of the devices that you will want to use as a disk including FireWire drives, USB flash memory cards, and SCSI disks.
This chapter starts out by introducing the kinds of filesystems that Mac OS X supports and shows you how to examine and work with these filesystems. It then shows you how to work with disks—both physical and virtual—including partitioning disks and moving data safely from one disk to another.
Each device stores data in a form that makes ...