To format a Mac OS Extended volume as case-sensitive HFS+:

$ sudo diskutil eraseVolume "Case-sensitive HFS+" newvolname volume

Parameter

Description

newvolname

The name given to the reformatted, case-sensitive volume.

 

 

volume

The path to the existing volume to be reformatted.

 

For example: /Volumes/HFSPlus

 

 

See the diskutil man page for more options and information about repairing and modifying disks.

Partitioning and Formatting Disks

Disk partitions are subsdivisions of a disk to which you apply operating-system–specific formatting.

Partitioning a Disk

You can use pdisk, located in /usr/sbin, to edit the disk partition table. You can initialize the disk, create partitions, and delete partitions. The pdisk tool is menu-driven, which means that once it is launched, you are prompted to enter a pdisk command. You can find the commands by typing ? at the pdisk prompt. The following are some of the more useful commands:

Command

Description

L

Lists the partition maps of all the drives. pdisk lists all the

 

partitions for a disk—even the unmountable partitions, such as the

 

partition containing the partition map.

 

 

e

Edits the partition map of the named device. To edit a partition

 

map, you have to use the raw device file as the argument.

 

 

Once you start editing a device, the pdisk options change. Enter ? at the pdisk prompt to see the editing commands. The following are some of the more important ones:

Command

Description

p

Prints the partition map for the current device.

 

 

i

Initializes the partition map for the current device.

 

 

C

Creates a new partition. There are two partition types, Apple_HFS

 

and Apple_UFS.

 

 

w

Writes the modifications to the partition map on-disk. Before that,

 

all edits and modifications are only in memory and not yet

 

implemented.

 

 

pdisk does not support the Intel/DOS partitioning scheme supported by fdisk. See the fdisk man page for more information about DOS partitions.

Chapter 7 Working with Disks and Volumes

89

Page 89
Image 89
Apple Mac OS X Server manual Partitioning and Formatting Disks, Partitioning a Disk, Command Description