88

To list the disks currently known and available on the computer:

$ diskutil list

If your system is an Xserve computer, you can use this command to determine which drive is in which bay.

To get mount info about a partition:

$ diskutil info diskvol

ParameterDescription

diskvol

Device name (for example, disk0s9) for the partition.

This command tells you the device file that corresponds to the mounted partition (or device name) you specify.

To mount a drive:

$ diskutil mountDisk diskvol

ParameterDescription

diskvol

Device name.

To erase and repartition a disk:

$ diskutil partitionDisk disk numberOfPartitions part1Format part1Name

part1Size

Parameter

Description

disk

Device name (such as disk0).

 

 

numberOfPartitions

 

 

 

part1Format

HFS+ or UFS.

 

 

part1Name

 

 

 

part1Size

Can be either bytes (such as 98187445B), kilobytes (such as

 

810240K), megabytes (such as 4024M), gigabytes (such as 4G), or

 

terabytes (such as 1T).

 

 

Because HFS+ is case preserving but not case sensitive, there may be times when you would want to set the file system to be case sensitive. You can use the diskutil tool to format a drive for case-sensitive HFS+.

Note: Volumes you format as case-sensitive HFS+ are also journaled.

Chapter 7 Working with Disks and Volumes

Page 88
Image 88
Apple Mac OS X Server manual To get mount info about a partition, To mount a drive, To erase and repartition a disk