LSM replaces the Logical Volume Manager (LVM) on Digital UNIX systems. Refer to the Logical Storage Manager manual for information about how to migrate from LVM to LSM.
Feature | Benefit |
---|---|
Manages disks | Frees you from the task of partitioning disks and allocating space. However, LSM allows you to keep control over disk partitioning and space allocation, if desired. |
Allows transparent disk configuration changes | Allows you to change the disk configuration without rebooting or otherwise interrupting users. Also allows routine administrative tasks, such as file system backup, with reduced down time. |
Stores large file systems | Enables multiple physical disks to be combined to form a single, larger logical volume. This capability, called concatenation, removes limitations imposed by the actual physical properties of individual disk sizes. It does this by combining the storage potential of several devices. |
Note that disk concatenation is available on all systems, including those that do not have an LSM software license. | |
Ease of system management | Simplifies the management of disk configurations by providing convenient interfaces and utilities to add, move, replace, and remove disks. |
Protects against data loss | Protects against data loss due to hardware malfunction by creating a mirror (duplicate) image of important file systems and databases. |
Increases disk performance | Improves disk I/O performance through the use of striping, which is the interleaving of data within the volume across several physical disks. |
LSM builds virtual disks, called volumes, on top of UNIX system disks. A volume is a special device that contains data managed by a UNIX file system, a database, or other application. LSM transparently places a volume between a physical disk and an application, which then operates on the volume rather than on the physical disk. A file system, for instance, is created on the LSM volume rather than a physical disk. Figure 9-1 shows disk storage management in an LSM configuration.
On a system that does not have LSM installed, I/O activity from the UNIX system kernel is passed through disk device drivers that control the flow of data to and from disks. When LSM is installed, the I/O passes from the kernel to the LSM volume device driver, then to the disk device drivers.
The LSM software maps the logical configuration of the system to the physical disk configuration. This is done transparently to the file systems, databases, and applications above it because LSM supports the standard block device and character device interfaces to store and retrieve data on LSM volumes. Thus, you do not have to change applications to access data on LSM volumes.
The block device special files associated with LSM volumes exist in the /dev/vol directory and the character device special files associated with LSM volumes exist in the /dev/svol directory.
Each object has a dependent relationship on the next-higher element, with subdisks being the lowest-level objects in the structure and volumes the highest level. LSM maintains a configuration database that describes the objects in the LSM configuration and implements utilities to manage the configuration database. Multiple mirrors, striping, and concatenation are additional techniques you can perform with the LSM objects to further enhance the capabilities of LSM.
Table 9-2 describes the LSM objects used to represent portions of the physical disks.
Object | Description |
---|---|
Volume | Represents an addressable range of disk blocks used by applications, file systems, or databases. A volume is a virtual disk device that looks to applications and file systems like a regular disk-partition device. In fact, volumes are logical devices that appear as devices in the /dev directory. The volumes are labeled fsgen or gen according to their usage and content type. Each volume can be composed of from one to eight plexes (two or more plexes mirror the data within the volume). |
Due to its virtual nature, a volume is not restricted to a particular disk or a specific area thereof. You can change the configuration of a volume (using LSM utilities) without disrupting applications or file systems using that volume. | |
Plex | A collection of one or more subdisks that represent specific portions of physical disks. When more than one plex is present, each plex is a replica of the volume; the data contained at any given point on each is identical (although the subdisk arrangement may differ). Plexes can have a striped or concatenated organization. |
Subdisk | A logical representation of a set of contiguous disk blocks on a physical disk. Subdisks are associated with plexes to form volumes. Subdisks are the basic components of LSM volumes that form a bridge between physical disks and virtual volumes. |
Disk | A collection of nonvolatile, read/write data blocks that are indexed and can be quickly and randomly accessed. LSM supports standard disk devices including SCSI and DSA disks. Each disk LSM uses is given two identifiers: a disk access name and an administrative name. |
Disk Group | A collection of disks that share the same LSM configuration database. The rootdg disk group is a special disk group that always exists. |
LSM objects have the following relationships:
Figure 9-2 shows an LSM configuration that includes two plexes to protect a file system or a database against data loss.
voldiskadd
(8) reference page for information about adding physical
disks to LSM.An LSM disk typically uses the following two regions on each physical disk:
Figure 9-3 illustrates the three types of LSM disks: simple, sliced, and nopriv. You can add all of these types of disks into an LSM disk group.
In Figure 9-3:
LSM configuration databases are stored on the private region of each LSM disk except the nopriv disk. The public regions of the LSM disks collectively form the storage space for application use. For purposes of availability, each simple and sliced disk contains two copies of the configuration database. A sliced disk takes up the entire physical disk, but simple and nopriv disks can reside on the same physical disk. The disk label tags identify the partitions to LSM as LSM disks.
The following definitions describe these disk-naming conventions:
The device name or address used to access a physical disk. A disk access name is of the form:
dd [l]n [nnn] [p]
The elements in the disk access name are described in the following table:
Element | Description |
---|---|
dd | A two-character device mnemonic that shows the disk type. Use ra for DSA disks and rz for SCSI disks. |
[l] | The SCSI logical unit number (LUN), in the range from a to h, to correspond to LUNs 0 through 7. This argument is optional and used for SCSI Redundant Arrays of Independent Disks (RAID) devices. |
n[nnn] | The disk unit number ranging from 1 to 4 digits. |
[p] | The partition letter, in the range from a to h, to correspond to partitions 0 through 7. This argument is optional. |
For an LSM simple disk or an LSM nopriv disk, you must specify a partition letter (for example, rz3d). For an LSM sliced disk, you must specify a physical drive that does not have a partition letter (for example, rz3). The proper full pathname of the d partition on this simple device is /dev/rz3d. For easier reading, this document often lists only the disk access name and /dev is assumed. Also, note that you do not specify /dev in front of the device name when using LSM commands.
An administrative name for the disk, such as disk01. If you do not assign a disk media name, it defaults to disknn, where nn is a sequence number if the disk is being added to rootdg. Otherwise, the default disk media name is groupnamenn, where groupname represents the name of the disk group to which the disk is added.
Use disk groups to simplify management and provide data availability. For example:
All systems with LSM installed have the rootdg disk group. By default, operations are directed to this disk group. Most systems do not need to use more than one disk group.
You do not have to add disks to disk groups when a disk is initialized; disks can be initialized and kept on standby as replacements for failed disks. Use a disk that is initialized but has not been added to a disk group to immediately replace a failing disk in any disk group. Note
Two identical copies of the LSM configuration database are located in the private region of each disk within a disk group. LSM maintains two identical copies of the configuration database in case of full or partial disk failure.
The contents of the rootdg configuration database is slightly different from that of an ordinary database in that the rootdg configuration database contains records for disks outside of the rootdg disk group in addition to the ordinary disk-group configuration information. Specifically, a rootdg configuration includes disk-access records that define the disks and disk groups on the system.
LSM provides three interfaces for managing LSM disks: a command line interface, a menu interface, and a graphical user interface. You can use any of these interfaces (or a combination of the interfaces) to change volume size, add plexes, and perform backups or other administrative tasks. You can use the LSM interfaces interchangeably. LSM objects created by one interface are fully interoperable and compatible with objects created by the other interfaces. Table 9-4 describes these LSM interfaces.
Interface | Type | Description |
---|---|---|
Visual Administrator (dxlsm) | Graphical | Uses windows, icons, and menus to manage LSM volumes. The dxlsm graphical interface requires a workstation. The interface interprets the mouse-based icon operations into LSM commands. The Visual Administrator (dxlsm) interface requires the LSM software license. |
Support Operations (voldiskadm) | Menu | Provides a menu of disk operations. Each entry in the main menu leads you through a particular operation by providing you with information and asking you questions. Default answers are provided for many questions. This character-cell interface does not require a workstation. |
Command line | Command | Provides two approaches to LSM administration. With the top-down approach, you use the LSM volassist command to automatically build the underlying LSM objects. With the bottom-up approach, you use individual commands to build individual objects to customize the construction of an LSM volume. |
See also the appropriate reference pages and the manual Logical Storage Manager for detailed information and examples.
The volassist command has the following syntax:
volassist[-b] [-gdiskgroup] [-Uusetype] [-dfile] keyword argument . . .
Bottom-up commands include volmake to create LSM objects, and volume, volplex, and volsd to manipulate volume, plex, and subdisk objects. The syntax for these commands is as follows:
volmake[-Uusetype] [-ouseopt] [-dfile] [type name | [attribute]]. . .
volume[-Uusetype] [-ouseopt] [-Vq] keyword argument . . .
volplex[-Uusetype] [-ouseopt] [-V] [-vvolume] keyword argument . . .
volsd[-Uutype] [-ouopt] [-V] [-vvolume] [-pplex] keyword argument . . .
volprint[-AvpsdGhnlafmtqQ] [-gdiskgroup] [-epattern] [-Ddatabase] [-F | [type:]format-spec] [name . . .]
Table 9-5 presents some configuration options and describes the planning considerations that apply to LSM configurations.
Configuration | Description |
---|---|
Concatenated volumes | You concatenate multiple LSM disks together to form a big volume. You can use a concatenated volume to store a large file or file systems that span more than one disk. Disk concatenation frees you from being limited by the actual physical sizes of individual disks so that you can combine the storage potential of several devices. Use the default disk group, rootdg, to create a concatenated volume from the public regions available. You can also add more LSM disks and create volumes from the new disks you added. |
Mirrored volumes | You associate multiple plexes with the same volume to create a mirrored volume. If you are concerned about the availability of your data, then plan to mirror data on your system. You should map plexes that are associated with the same volume to different physical disks. For systems with multiple disk controllers, you should map a volume's plexes to different controllers. |
The volassist command will fail if you specify a device that is already in the volume as the mirrored plex; the bottom-up commands will not fail. | |
Striped volumes | For faster read/write throughput, use a volume with a striped plex. On a physical disk drive, the drive performs only one I/O operation at a time. On an LSM volume with its data striped across multiple physical disks, multiple I/Os (one for each physical disk) can be performed simultaneously. |
The basic components of a striped plex are the size of the plex in multiples of the stripe width used, the actual stripe width, and number of stripes. Stripe blocks of the stripe width size are interleaved among the subdisks, resulting in an even distribution of accesses among the subdisks. The stripe width defaults to 128 sectors, but you can tune the size to specific application needs. The volassist command automatically rounds up the volume length to multiples of stripe width. | |
Mirrored and striped volumes | Use mirrored and striped volumes when speed and availability are important. LSM supports mirroring of striped plexes. This configuration offers the improved I/O performance of striping while also providing data availability. |
The different striped plexes in a mirrored volume do not have to be symmetrical. For instance, a three-way striped plex can be mirrored with a two-way striped plex as long as the plex size is the same. Reads can be serviced by any plex in a mirrored volume. Thus, a mirrored volume provides increased read performance. However, LSM issues writes to all plexes in a mirrored volume. Because the writes are issued in parallel, there is a small amount of additional overhead as the result of a write I/O to a mirrored volume. |
The following sections provide quick reference information to help you reenable LSM after an installation, start up LSM for the first time, and perform several common LSM operations. The examples provided use the command-line interface. See the Logical Storage Manager guide for complete information about using the command line interface, and for information about the LSM graphical user interface and menu interface.
If you had LSM initialized on a system before doing a full installation, you can reenable the LSM configuration by performing the following steps:
# cp /backup/volboot /etc/volboot
# /sbin/volinstall
# /sbin/vol-startup
The volsetup utility automatically modifies disk labels, initializes disks for LSM, creates the default disk group, rootdg, and configures disks into the rootdg disk group. You invoke the volsetup utility only once. To later add more disks, use the voldiskadd utility.
Follow these steps to use volsetup:
# /sbin/volsetup rz1In this example, the rz1 disk is used to initialize the rootdg disk group. If you do not give the name of a disk, LSM prompts you for one.
When you are first setting up LSM, do not include the boot disk in the disks you specify to volsetup. After you initialize LSM, you can encapsulate the root and swap partitions and add them to the rootdg disk group or another disk group. Note
inittab
(4) for more information.)
The volsetup utility creates the /etc/vol/volboot file. This file is used to locate copies of the rootdg disk group configuration when the system starts up.
Do not delete or manually update the /etc/vol/volboot file; it is critical for starting LSM. Note
disklabel
(8) reference page for complete information. For
example, you could add a disk partition to the rootdg disk
group by executing the following command: # voldiskadd rz3
To initialize a disk without adding it to a disk group, use the voldisksetup
(8)
command. This command allows you to add an LSM simple disk or sliced disk.
To add a physical disk to LSM with a specific private region size, use
the voldisksetup
(8) command. For example, use the following command
to initialize a sliced LSM disk with a private region size of 2048 sectors:
# voldisksetup -i rz3 privlen=2048
Use the voldg command to add the LSM disk to a disk group.
# volassist -g disk_group make volume length attribute=value
To create a volume in a disk group, use the instructions in the following list, or use the dxlsm graphical user interface (GUI).
# volassist -g rootdg make vol01 10m
# volassist -g dg1 make vol02 1024k
# volassist -g rootdg make vol03 200000s rz7
# volassist -g rootdg make vol03 200000s !rz9
# volassist -g rootdg make vol04 20m layout=stripe nstripe=3
# volassist -g dg1 mirror vol02 nmirror=3 &
# volassist -g rootdg make vol05 30m mirror=yes
# volassist growby vol01 2m
# volassist shrinkby vol01 1024k
The following restrictions apply to grown LSM volumes: Caution
- A volume containing one or more striped plexes cannot grow in size.
- Neither UFS nor AdvFS file systems can take advantage of the extra space in a grown LSM volume.
- Shrinking an LSM volume with either a UFS or AdvFS file system causes loss of data.