Disks, Slices, Partitions, and Volumes

Each hard disk is typically split into a number of separate, different sized units called partitions or slices. Note that is not the same as a partition in PC terminology. Each disk contains some form of partition table, called a VTOC (Volume Table Of Contents) in SVR4 terminology, which describes where the slices start and what their size is. Each slice may then be used to store bootstrap information, a filesystem, swap space, or be left as a raw partition for database access or other use.

Disks can be managed using a number of utilities. For example, on Solaris and many SVR4 derivatives, the prtvtoc and fmthard utilities can be used to edit the VTOC to divide the disk into a number of slices. When there are many disks, this hand editing of disk partitions becomes tedious and very error prone.

For example, here is the output of running the prtvtoc command on a root disk on Solaris:

# prtvtoc  /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
*
* Dimensions:
*      512 bytes/sector
*      135 sectors/track
*       16 tracks/cylinder
*     2160 sectors/cylinder
*     3882 cylinders
*     3880 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                           First    Sector      Last
*Partition  Tag  Flags     Sector     Count    Sector   Mount Dir
      0       2     00          0    788400    788399   /
      1       3     01     788400   1049760   1838159
      2       5     00          0   8380800   8380799
      4       0     00    1838160   4194720   6032879   /usr
      6       4     00    6032880   2347920   8380799   /opt

The partition tag is used to identify each slice such that c0t0d0s0 is the slice that holds ...

Get UNIX Filesystems: Evolution, Design, and Implementation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.