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.
9.1 Features and Benefits
Table 9-1 summarizes the LSM features and benefits.
This chapter provides an overview of LSM concepts and some commonly
used commands. The volintro
(8) reference page provides a quick reference of
LSM terminology and command usage. Refer to the manual Digital
UNIX Logical Storage Manager for more complete information on
LSM concepts and commands.
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.
9.2 Understanding the LSM Components
LSM
consists of physical disk devices, logical entities, and the mappings that
connect the physical and logical objects.
Figure 9-1: LSM Disk Storage Management
9.2.1 LSM Objects
LSM
logically binds together the disk devices into a volume that represents the
disks as a single virtual device to applications and users. LSM uses a structure
of LSM objects to organize and optimize disk usage and guard against media
failures. The structure is built with the objects in the following logical
order:
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.
Figure 9-2: LSM Objects and Their Relationships
9.2.2 LSM Disks
You must add physical disks to the LSM environment as LSM disks before
you can use them to create LSM volumes. Refer to Section 9.6.3
and the 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.
Figure 9-3: Types of LSM Disks
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:
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.
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.
The LSM volume daemon, vold, uses the volboot file during startup to locate copies of the rootdg
configuration database. This file may list disks that contain configuration
copies in standard locations, and can also contain direct pointers to configuration
copy locations. The volboot file is located in /etc/vol.
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.
9.2.3 Naming LSM Disks
When you perform disk operations, you should understand the disk-naming
conventions for a disk access name and disk
media name.
Disk access names and disk media names are
treated internally as two types of LSM disk objects. Some operations require
that you specify the disk access name, while others require the disk media
name.
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 example, rz in the device name
rz3 represents a pseudonym for a SCSI disk, and rzb10h (LUN 1) represents
a disk access name for a Digital SCSI RAID device having a LUN of one and
using partition h.
9.2.4 LSM Disk Groups
You can organize a collection of physical disks that share a common
configuration or function into disk groups. LSM volumes are created within
a disk group and are restricted to using disks within that disk group.Note
Each disk group maintains an LSM configuration database that contains
detailed records and attributes about the existing disks, volumes, plexes,
and subdisks in the disk group.
9.2.5 LSM Configuration Databases
An LSM configuration database contains records describing all the objects
(volumes, plexes, subdisks, disk media names, and disk access names) being
used in a disk group.
9.2.6 Moving and Replacing LSM Disks in a Disk Group
When a disk is added to a disk group it is given a disk media name,
such as disk02. This name relates directly to the physical
disk. LSM uses this naming convention (described in Section 9.2.3)
because it makes the disk independent of the manner in which the volume is
mapped onto physical disks. If a physical disk is moved to a different target
address or to a different controller, the name disk02 continues
to refer to it. You can replace disks by first associating a different physical
disk with the name of the disk to be replaced, and then recovering any volume
data that was stored on the original disk (from mirrors or backup copies).
9.3 LSM System Administration
Once a disk is under the control of LSM, all system
administration tasks relating to that disk must be performed using LSM utilities
and commands. For instance, if you install a file system on an LSM-controlled
disk using physical disk paths rather than the LSM interfaces, LSM will be
unaware that the new file system exists and will reallocate its space.
9.4 LSM System Administration Commands
The following sections summarize some useful commands from the command
line interface. Examples of how to use some of these commands are included
in Section 9.6.
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.
9.4.1 Top-Down Command
The top-down approach to managing storage means placing disks in one
large pool of free storage space. You then use the volassist
utility to specify to LSM what you need, and LSM allocates the space from
this free pool. You can use volassist to create, mirror,
grow, or shrink a volume. With volassist, you can use the
defaults that the utility provides, or you can specify volume attributes on
the command line.
9.4.2 Bottom-Up Commands
The bottom-up approach to storage management allows you to control the
placement and definition of subdisks, plexes, and volumes. Bottom-up commands
allow a great deal of precision control over how LSM creates and connects
objects together. You should have a detailed knowledge of the LSM architecture
before using these commands.
9.4.3 Information Command
The volprint command, which has built-in parsing
and formatting features, displays most of the LSM configuration and status
information. The volprint command has the following syntax:
9.5 Planning an LSM Configuration
Before setting up LSM volumes, plexes, and subdisks, you should consider
the needs of your site, the hardware available to you, and the rationale for
creating volumes and disk groups.
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:
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.
The volsetup utility prompts you to estimate how
many disks will be managed by LSM. The utility uses the estimate to define
optimal values for the private region size (in sectors), and the number of
configuration and log copies per disk.
Follow these steps to use volsetup:
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.
To initialize a disk without adding it to a disk group, use the
To add a physical disk to LSM with a specific private region size, use
the
Use the voldg command to add the LSM disk to a disk
group.
To create a volume in a disk group, use the instructions in the following
list, or use the dxlsm graphical user interface (GUI).
9.6 Implementing an LSM Configuration
After installing and licensing the LSM software (as described in the Installation Guide), you can use the information in the following
sections to quickly get LSM up and running.
9.6.1 Reenabling LSM
If you are already running LSM and the rootdg disk
group is already initialized, you do not need to reenable LSM. For example,
if you performed an upgrade installation, skip this section.
# cp /backup/volboot /etc/volboot
# /sbin/volinstall
# /sbin/vol-startup
9.6.2 Setting up LSM
If you are setting up LSM for the first time, you can use the volsetup utility to initialize LSM and create the LSM configuration
database for the first time. Then, use the voldiskadd utility
to add more disks into LSM. This is the simplest method to set up an LSM configuration.
# /sbin/volsetup rz1
In 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.
Note
inittab
(4) for more information.)Note
9.6.3 Adding a Disk to a Disk Group
Once LSM has been initialized
with the /sbin/volsetup utility, you can add more physical
disks or disk partitions to the rootdg disk group or add
a new disk group by executing the interactive voldiskadd
utility. This utility requires that a disklabel already exist on the device.
Refer to the 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
voldisksetup
(8)
command. This command allows you to add an LSM simple disk or sliced disk.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
9.6.4 Creating a Volume in a Disk Group
After you create
a disk group and add disks, use the volassist command to
create volumes. For example:
# volassist -g disk_group make volume length attribute=value
# 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
9.6.5 Mirroring a Volume
Once a volume is created and enabled, use
the volassist utility to create and attach new plexes to
the volume.
# volassist -g dg1 mirror vol02 nmirror=3 &
# volassist -g rootdg make vol05 30m mirror=yes
9.6.6 Changing the Size of a Volume
You can use the volassist utility to increase or decrease the size of a volume. To change
the size of a volume, use the following examples as guidelines:
# volassist growby vol01 2m
# volassist shrinkby vol01 1024k
Caution