Installation guide

7.8 Partitioning Disks
This section provides the information you need to change the partition
scheme of your disks. In general, you allocate disk space during the initial
installation or when adding disks to your configuration. Usually, you do not
have to alter partitions; however, there are cases when it is necessary to
change the partitions on your disks to accommodate changes and to
improve system performance.
The disk label provides detailed information about the geometry of the disk
and the partitions into which the disk is divided. You can change the label
with the disklabel command. You must be the root user to use the
disklabel command.
There are two copies of a disk label, one located on the disk and one located
in system memory. Because it is faster to access system memory than to
perform I/O, when the system boots, it copies the disk label into memory.
Use the disklabel
−r command to directly access the label on the disk
instead of going through the in-memory label.
_______________________ Note _______________________
Before you change disk partitions, back up all the file systems if
there is any data on the disk. Changing a partition overwrites
the data on the old file system, destroying the data. Refer to
Section 7.1.1 for more information on disk partitions.
The following rules apply to changing partitions:
• You cannot change the offset, which is the beginning sector, or shrink
any partition on a mounted file system or on a file system that has an
open file descriptor.
• If you need only one partition on the entire disk, use partition c.
• Specify the raw device for partition a, which begins at the start of the
disk sector (sector 0), when you change the label.
Before changing the size of a disk partition, review the current partition
setup by viewing the disk label. The disklabel command allows you to
view the partition sizes. The bottom, top, and size of the partitions are in
512-byte sectors.
To review the current disk partition setup, use the following disklabel
command syntax:
disklabel -r device
Administering the UNIX File System 7–27