System Administration Guide, Volume 1

About Disk Slices

Files stored on a disk are contained in file systems. Each file system on a disk is assigned to a slice--a group of cylinders set aside for use by that file system. Each disk slice appears to the operating system (and to the system administrator) as though it were a separate disk drive.

See Chapter 34, Managing File Systems (Overview) for information about file systems.


Note -

Slices are sometimes referred to as partitions. This book uses slice but certain interfaces, such as the format utility, refer to slices as partitions.


When setting up slices, remember these rules:

Slices are set up slightly differently on SPARC and IA platforms. The table below summarizes the differences:

Table 28-1 Slice Differences on Platforms

SPARC Platforms 

IA Platforms 

Whole disk is devoted to Solaris environment 

Disk is divided into fdisk partitions, one per operating environment

Disk is divided into eight slices, numbered 0-7 

The Solaris fdisk partition is divided into 10 slices, numbered 0-9

SPARC: Disk Slices

On SPARC based systems, Solaris defines eight disk slices and assigns to each a conventional use. These slices are numbered 0 through 7. The table below summarizes the contents of the eight Solaris slices on a SPARC based system.

Table 28-2 SPARC: Customary Disk Slices

Slice 

File System 

Usually Found on Client or Server Systems? 

Purpose 

root 

Both 

Holds files and directories that make up the operating system. 

swap 

Both 

Provides virtual memory, or swap space. Swap space is used when running programs are too large to fit in a computer's memory. The Solaris operating environment then "swaps" programs from memory to the disk and back as needed.

-- 

both 

Refers to the entire disk, by convention. It is defined automatically by the format and the Solaris installation programs. The size of this slice should not be changed.

/export

Server only 

Holds alternative versions of the operating system. These alternative versions are required by client systems whose architectures differ from that of the server. Clients with the same architecture type as the server obtain executables from the /usr file system, usually slice 6.

/export/swap

Server only 

Provides virtual memory space for client systems. 

/opt

Both 

Holds application software added to a system. If a slice is not allocated for this file system during installation, the /opt directory is put in slice 0.

/usr

Both 

Holds operating system commands--also known as executables-- designed to be run by users. This slice also holds documentation, system programs (init and syslogd, for example) and library routines.

/home or

/export/home

Both 

Holds files created by users. 

IA: Disk Slices

On IA based systems, disks are divided into fdisk partitions. An fdisk partition is a section of the disk reserved for a particular operating environment, such as Solaris.

Solaris places ten slices, numbered 0-9, on a Solaris fdisk partition as shown in the following table.

Table 28-3 IA: Customary Disk Slices

Slice 

File System 

Usually Found on Client or Server Systems? 

Purpose 

root 

Both 

Holds the files and directories that make up the operating system. 

swap 

Both 

Provides virtual memory, or swap space. Swap space is used when running programs are too large to fit in a computer's memory. The Solaris operating environment then "swaps" programs from memory to the disk and back as needed.

-- 

Both 

Refers to the entire disk, by convention. It is defined automatically by the format utility and the Solaris installation programs. The size of this slice should not be changed.

/export

Server only 

Holds alternative versions of the operating system. These alternative versions are required by client systems whose architectures differ from that of the server.  

/export/swap

Server only 

Provides virtual memory space for the client systems. 

/opt

Both 

Holds application software added to a system. If a slice is not allocated for this file system during installation, the /opt directory is put in slice 0.

/usr

Both 

Holds operating system commands--also known as executables--that are run by users. This slice also holds documentation, system programs (init and syslogd, for example) and library routines.

/home or /export/home

Both 

Holds files created by users. 

-- 

Both 

Contains information necessary for Solaris to boot from the hard disk. It resides at the beginning of the Solaris partition (although the slice number itself does not indicate this), and is known as the boot slice. 

-- 

Both 

Provides an area reserved for alternate disk blocks. Slice 9 is known as the alternate sector slice. 

Using Raw Data Slices

The SunOS operating system stores the disk label in block 0, cylinder 0 of each disk. This means that using third-party database applications that create raw data slices must not start at block 0, cylinder 0, or the disk label will be overwritten and the data on the disk will be inaccessible.

Do not use the following areas of the disk for raw data slices, which are sometimes created by third-party database applications:

  1. Block 0, cylinder 0, where the disk label is stored.

  2. Avoid cylinder 0 entirely for improved performance.

  3. Slice 2, which represents the entire disk.

Slice Arrangements on Multiple Disks

Although a single disk that is large enough can hold all slices and their corresponding file systems, two or more disks are often used to hold a system's slices and file systems.


Note -

A slice cannot be split between two or more disks. However, multiple swap slices on separate disks are allowed.


For instance, a single disk might hold the root (/) file system, a swap area, and the /usr file system, while a separate disk is provided for the /export/home file system and other file systems containing user data.

In a multiple disk arrangement, the disk containing the operating system software and swap space (that is, the disk holding the root (/) or /usr file systems or the slice for swap space) is called the system disk. Disks other than the system disk are called secondary disks or non-system disks.

Locating a system's file systems on multiple disks allows you to modify file systems and slices on the secondary disks without having to shut down the system or reload operating system software.

Having more than one disk also increases input-output (I/O) volume. By distributing disk load across multiple disks, you can avoid I/O bottlenecks.

Determining Which Slices to Use

When you set up a disk's file systems, you choose not only the size of each slice, but also which slices to use. Your decisions about these matters depend on the configuration of the system to which the disk is attached and the software you want to install on the disk.

The system configurations are:

Each system configuration requires the use of different slices. The table below lists these requirements.

Table 28-4 System Configurations and Slice Requirements

Slice 

Servers 

Standalone 

Systems 

root 

root 

swap 

swap 

-- 

-- 

/export

-- 

/export/swap

-- 

/opt

/opt

/usr

/usr

/export/home

/home

See "Overview of System Types" for more information about system configurations.


Note -

The Solaris installation program provides slice size recommendations based on the software you select for installation.