Solaris Volume Manager Administration Guide

Volumes

A volume is a name for a group of physical slices that appear to the system as a single, logical device. Volumes are actually pseudo, or virtual, devices in standard UNIX® terms.


Note –

Historically, the Solstice DiskSuiteTM product referred to these logical devices as “metadevices.” However, for simplicity and standardization, this book refers to these devices as “volumes.”


Classes of Volumes

You create a volume as a RAID 0 (concatenation or stripe) volume, a RAID 1 (mirror) volume, a RAID 5 volume, a soft partition, or a transactional logging volume.

You can use either the Enhanced Storage tool within the Solaris Management Console or the command-line utilities to create and administer volumes.

The following table summarizes the classes of volumes:

Table 3–2 Classes of Volumes

Volume 

Description 

RAID 0 (stripe or concatenation)

Can be used directly, or as the basic building blocks for mirrors and transactional devices. RAID 0 volumes do not directly provide data redundancy.  

RAID 1 (mirror)

Replicates data by maintaining multiple copies. A RAID 1 volume is composed of one or more RAID 0 volumes that are called submirrors. 

RAID 5

Replicates data by using parity information. In the case of disk failure, the missing data can be regenerated by using available data and the parity information. A RAID 5 volume is generally composed of slices. One slice's worth of space is allocated to parity information, but the parity is distributed across all slices in the RAID 5 volume. 

Transactional

Used to log a UFS file system. (UFS logging is a preferable solution to this need, however.) A transactional volume is composed of a master device and a logging device. Both of these devices can be a slice, RAID 0 volume, RAID 1 volume, or RAID5 volume. The master device contains the UFS file system. 

Soft partition 

Divides a slice or logical volume into one or more smaller, extensible volumes. 

How Are Volumes Used?

You use volumes to increase storage capacity, performance, and data availability. In some instances, volumes can also increase I/O performance. Functionally, volumes behave the same way as slices. Because volumes look like slices, the volumes are transparent to end users, applications, and file systems. Like physical devices, volumes are accessed through block or raw device names. The volume name changes, depending on whether the block or raw device is used. See Volume Names for details about volume names.

You can use most file system commands, including mkfs, mount, umount, ufsdump, ufsrestore, and others on volumes. You cannot use the format command, however. You can read, write, and copy files to and from a volume, as long as the volume contains a mounted file system.

Example—Volume That Consists of Two Slices

Figure 3–2 shows a volume “containing” two slices, one slice from Disk A and one slice from Disk B. An application or UFS treats the volume as if it were one physical disk. Adding more slices to the volume increases its capacity.

Figure 3–2 Relationship Among a Volume, Physical Disks, and Slices

Diagram shows two disks, and how slices on those disks are presented by Solaris Volume Manager as a single logical volume.

Volume and Disk Space Expansion

Solaris Volume Manager enables you to expand a volume by adding additional slices. You can use either the Enhanced Storage tool within the Solaris Management Console or the command line interface to add a slice to an existing volume.

You can expand a mounted or unmounted UFS file system that is contained within a volume without having to halt or back up your system. Nevertheless, backing up your data is always a good idea. After you expand the volume, use the growfs command to grow the file system.


Note –

After a file system has been expanded, the file system cannot be shrunk. Not shrinking the size of a file system is a UFS limitation. Similarly, after a Solaris Volume Manager partition has been increased in size, it cannot be reduced.


Applications and databases that use the raw volume must have their own method to “grow” the added space so applications can recognize it. Solaris Volume Manager does not provide this capability.

You can expand the disk space in volumes in the following ways:

The growfs Command

The growfs command expands a UFS file system without loss of service or data. However, write access to the volume is suspended while the growfs command is running. You can expand the file system to the size of the slice or the volume that contains the file system.

The file system can be expanded to use only part of the additional disk space by using the -s size option to the growfs command.


Note –

When you expand a mirror, space is added to the mirror's underlying submirrors. Likewise, when you expand a transactional volume, space is added to the master device. The growfs command is then run on the RAID 1 volume or the transactional volume, respectively. The general rule is that space is added to the underlying devices, and the growfs command is run on the top-level device.


Volume Names

Volume Name Requirements

There are a few rules that you must follow when assigning names for volumes:

Table 3–3 Sample Volume Names

/dev/md/dsk/d0

Block volume d0

/dev/md/dsk/d1

Block volume d1

/dev/md/rdsk/d126

Raw volume d126

/dev/md/rdsk/d127

Raw volume d127

Volume Name Guidelines

The use of a standard for your volume names can simplify administration, and enable you at a glance to identify the volume type. Here are a few suggestions: