Chapter 1. Introduction to the XVM Volume Manager

The XVM Volume Manager provides a logical organization to disk storage that enables an administrator to combine underlying physical disk storage into a single logical unit, known as a logical volume. Logical volumes behave like standard disk partitions and can be used as arguments anywhere a partition can be specified.

A logical volume allows a filesystem or raw device to be larger than the size of a physical disk. Using logical volumes can also increase disk I/O performance because a volume can be striped across more than one disk. Logical volumes can also be used to mirror data on different disks.


Note: To use XVM under SGI ProPack, you must obtain and install the appropriate FLEXlm license.

Under IRIX, the XVM Volume Manager can be used in a clustered environment with CXFS filesystems. The XVM Volume Manager can also be used as a standalone volume manager; this requires that you be running the 6.5.19f release leg of the IRIX operating system. The 6.5.19m leg does not support XVM as a standalone volume manager; this support will be added in a later release. For information on CXFS filesystems, see CXFS Version 2 Software Installation and Administration Guide.

This chapter provides an overview of the XVM Volume Manager and includes sections on the following topics:

XVM Volume Manager Features

The XVM Volume Manager provides all of the basic features of logical volumes that were provided with XLV logical volumes, an older logical volume design developed at SGI. These features include the following:

  • Self-identifying volumes

    Persistent configuration and attribute information for a logical volume is distributed among all disks that are part of the logical volume. The information is stored in a label file on a disk, removing any dependence on the filesystem. Whole sets of disks can be moved within and between systems.

  • Multiple storage types

    Logical volumes support aggregate storage through concatenation and striping. Logical volumes also support redundant storage through mirroring.

  • Multiple address spaces

    A logical volume can support multiple mutually exclusive address spaces in the form of subvolumes. Each subvolume within a logical volume has a different usage defined by the application accessing the data. The XVM Volume Manager supports a log subvolume for separating filesystem meta-data from the data itself, a real-time subvolume for guaranteed rate I/O performance, and a data subvolume where most data, including user files, resides. (XVM on Linux does not support real-time subvolumes.)

  • Path failover

    The XVM Volume Manager supports system failover with redundant components, both within hosts and between hosts. As long as you have a working connection to a disk, the system will attempt to complete the operations you have specified, even in the face of host failure.

  • Online configuration changes

    The XVM Volume Manager allows an administrator to perform certain volume reconfigurations without taking the volume offline. Volume reconfigurations that can be performed online include increasing the size of a concatenated volume and adding or removing a piece of a mirror.

In addition to the features that XLV logical volumes provide, the XVM Volume Manager provides the following significant features:

  • Support for a cluster environment

    Under IRIX, the XVM Volume Manager supports a cluster environment, providing an image of the XVM devices across all nodes in a cluster and allowing for administration of XVM devices from any node in the cluster. Disks within a cluster can be assigned dynamically to the entire cluster or to individual nodes within the cluster, as local volumes.(SGI ProPack does not currently support SGI's CXFS cluster environment.)

  • Flexible volume layering and configuration

    The elements that make up an XVM logical volume can be layered in any configuration. For example, using the XVM Volume Manager, an administrator can mirror disks at any level of the logical volume configuration, or use stripe-on-stripe layering rather than a simple striped volume in situations where this results in better volume throughput.

  • System disks with logical volumes

    Under IRIX, the XVM Volume Manager allows you to label an XVM disk so that it can be used as a system disk. This allows you to create XVM logical volumes that include the partitions of a system disk. You can mirror root partitions and you can use usr and swap partitions in any logical volume configuration.(XVM on Linux does not support labeling XVM disks as system disks.)

  • Support for a graphical user interface

    Under IRIX, XVM Manager Graphical User Interface (GUI) provides access to the tasks that help you set up and administer your logical volumes and provides icons representing status and structure.(XVM on Linux does not currently support the XVM Manager GUI.)

  • Large number of slices

    The layout of a disk under XVM is independent of the underlying device driver. The XVM Volume Manager determines how the disk is sliced. Because of this, the XVM Volume Manager can divide a disk into an arbitrary number of slices.

  • Large number of volumes

    The XVM Volume Manager supports thousands of volumes on a single disk and allows for the expansion of the label file as needed. Under XVM, there are no restrictions on volume width, which is the number of volume elements that make up the widest layer of a volume.

  • Improved mirror performance

    The XVM Volume Manager allows you to specify the read policy for an XVM mirror element, allowing you to read from the mirror in a sequential or round-robin fashion, depending on the needs of your configuration. You can also specify whether a particular leg of a mirror is to be preferred for reading.

    The XVM Volume Manager also allows you to specify when a mirror does not need to be synchronized at creation, and to specify that a particular mirror, such as a mirror of a scratch filesystem, will never need to be synchronized.

  • Built-in statistics support

    The XVM Volume Manager tracks statistics at every level of the volume tree and provides type-specific statistics. Statistics are tracked per host, and interfaces are provided to Performance Co-Pilot (PCP) to present a global state.

  • Device hot plug

    A disk containing XVM logical volumes can be added to a running system and the system will be able to read the XVM configuration information without rebooting. This feature allows you to move disks between systems and to configure a new system from existing disks that contain XVM logical volumes.

  • Insertion and removal

    The XVM administration commands provide the ability to insert and remove components from existing disk configurations, allowing you to grow and modify a disk configuration on a running system with open volumes.

  • Snapshot feature

    Under IRIX, the XVM snapshot feature provides the ability to create virtual point-in-time images of a filesystem without causing a service interruption. The snapshot feature requires a minimal amount of storage because it uses a copy-on-write mechanism that copies only the data areas that change after the snapshot is created.(SGI ProPack does not currently support the snapshot feature.)


    Note: To use the mirroring feature of the XVM Volume Manager or to access a mirrored volume from a given node in a cluster, you must purchase the XFS Volume Plexing software option and obtain and install a FLEXlm license.


XVM Logical Volume Device Directories

Logical volumes appear as block and character devices in subdirectories of the /dev directory.

Table 1-1 shows the directories that contain XVM logical volumes in the IRIX operating system.

Table 1-1. XVM Logical Volume Device Directories under IRIX

Device Directory

Contents

/dev/cxvm

Block special files for XVM logical volumes used in a CXFS cluster

/dev/rcxvm

Character special files for XVM logical volumes used in a CXFS cluster

/dev/lxvm

Block special files for XVM logical volumes used for a host's local volume

/dev/rlxvm

Character special files for XVM logical volumes used for a host's local volume

If you are not running in a cluster environment, then all the logical volumes are considered to be local volumes.

The device names for XVM logical volumes in these directories are volname,subvolname where volname is the name of the XVM logical volume and subvolname is the name of the subvolume to be accessed under that volume.

Under Linux, block devices are contained in the following directory:

/dev/xvm/local/vol/volname/data/block

For further information on XVM logical volume device directories, see “XVM Device Directories and Pathnames” in Chapter 3. For information on names of objects within XVM logical volumes, see “Object Names in XVM” in Chapter 3.

Partition Layout under XVM

Before you create XVM logical volumes on a disk, you must label the disk as an XVM disk. The XVM Volume Manager controls the partitioning of an XVM disk. Partitions are not used to define the storage available for XVM slices, as they are for XLV logical volumes; labeling a disk as an XVM disk removes the 16-piece partition limit of an IRIX filesystem.


Note: Before you can label a disk as an XVM disk, it must be formatted as an SGI disk. Under IRIX, if your disk has not been initialized during factory set-up, use the fx(1M) command to initialize the disk.Under Linux, use the fdisk command to format the disk as an SGI disk.

When you label a disk as an XVM disk, you can specify whether the disk will be an XVM option disk, an XVM system disk with combined root and  usr filesystems, or an XVM system disk with separate root and usr filesystems. An XVM disk is labeled as an option disk by default.

For information on labeling a disk as an XVM disk, see “Creating Physical Volumes” in Chapter 2, and “Assigning Disks to the XVM Volume Manager with the label Command” in Chapter 4. For specific information on labeling XVM disks as system disks, see “XVM System Disks” in Chapter 4.

Figure 1-1 shows the partition layout of an XVM option disk. In an XVM option disk, partition 10 contains the entire disk and partition 8 contains the volume header. The remainder of the disk that is not part of partition 8 is divided into slices that you specify using the XVM Volume Manager.

Figure 1-1. XVM Option Disk Partition Layout

XVM Option Disk Partition Layout

Figure 1-2 shows the partition layout of an XVM system disk with combined root and usr filesystems. Partition 8 contains the volume header, partition 9 contains the XVM label area where the information about the XVM volume elements on a disk is stored, partition 0 contains the root partition, and partition 1 contains the swap partition. Partition 10 contains the entire disk.

Figure 1-2. Partition Layout of XVM System Disk with Combined root and usr Filesystems

Partition Layout of XVM System Disk with Combined root and usr Filesystems

Figure 1-3 shows the partition layout of an XVM system disk with separate root and usr filesystems. Partition 8 contains the volume header, partition 9 contains the XVM label area where the information about the XVM volume elements on a disk is stored, partition 0 contains the root partition, partition 1 contains the swap partition, and partition 6 contains the usr partition. Partition 10 contains the entire disk. In this illustration the XVM system disk includes space on the disk that can be used for other filesystems besides root, swap and usr.

Figure 1-3. Partition Layout of XVM System Disk with Separate root and usr Filesystems

Partition Layout of XVM System Disk with Separate root and usr Filesystems


Note: Under IRIX, if you attempt to use the fx(1M) command to modify the partition layout on an XVM disk, a warning message is generated. You can determine which disks are managed by XVM by executing a hinv -c disk -v command.


Figure 1-4 shows the partition layout of an XVM system disk with multiple root filesystems as well as a separate usr filesystem. Partition 8 contains the volume header, partition 9 contains the XVM label area where the information about the XVM volume elements on a disk is stored, partition 0 contains the first root partition, partition 1 contains the swap partition, partitions 2 and 3 contain additional root filesystems, and partition 6 contains the usr partition. Partition 10 contains the entire disk.

Figure 1-4. Partition Layout of System Disk with Multiple Root Filesystems

Partition Layout of System Disk with Multiple Root Filesystems

Composition of XVM Logical Volumes

XVM logical volumes are composed of a hierarchy of logical storage objects: volumes are composed of subvolumes; subvolumes are composed of stripes, mirrors, concats (concatenated volume elements), and slices combined in whatever hierarchy suits your system needs; and, at the bottom of the hierarchy, each logical storage object is ultimately made up of slices, which define an area of physical storage. Each of these logical storage objects is known as a  volume element or a ve.

The concat, stripe, and mirror logical volume elements can be arranged and stacked arbitrarily. There is a limit of ten levels from the volume through the slice, inclusive.

A logical volume element beneath another volume element in the hierarchy is known as a child or piece of the higher-level volume element. Volumes are limited to 255 children, subvolumes are limited to 1 child, and mirrors are limited to 8 children. Other volume elements are limited to 65,536 children.

Figure 1-5 shows an example of a simple XVM logical volume. In this example, there is one data subvolume that consists of a single two-way stripe.

Figure 1-5. Basic XVM Striped Logical Volume

Basic XVM Striped Logical Volume

Figure 1-6 shows an XVM logical volume with three subvolumes and a mirrored stripe in the data subvolume.

Figure 1-6. XVM Logical Volume with Mirrored Stripe and Three Subvolumes

XVM Logical Volume with Mirrored Stripe and Three Subvolumes

Figure 1-7 shows the example illustrated in Figure 1-6 after the insertion of a concat. In this example, additional slices were created on the unused disk space on the disks that made up the data subvolume. These slices were used to create a parallel mirrored stripe, which was combined with the existing mirrored stripe to make a concat.

Figure 1-7. XVM Logical Volume after Insertion of Concat

XVM Logical Volume after Insertion of Concat

The following subsections describe the XVM volume elements in greater detail.

Volumes

A volume is the topmost XVM volume element. It is a collection of subvolumes, which are grouped together into a single volume name.

Each volume can be used as a single filesystem. Volume information used by the system is stored in logical volume labels in the volume header of each disk used by the volume.

You can create volumes, delete volumes, and move volumes between systems.

The subvolumes that make up a volume can be marked as data subvolumes, log subvolumes, and real-time subvolumes. These are the system-defined subvolume types, and are described in “Subvolumes”. You can also mark a subvolume as being of a user-defined type. (XVM on Linux does not support real-time subvolumes.)

You cannot have more than one subvolume of a particular system-defined subvolume type under the same volume. In other words, a volume can contain only one data subvolume, only one log subvolume, and only one real-time subvolume. This restriction does not apply to subvolumes of user-defined types.

Figure 1-8 shows an XVM volume with system-defined subvolume types.

Figure 1-8. XVM Volume with System-Defined Subvolume Types

XVM Volume with System-Defined Subvolume Types

Figure 1-9 shows an XVM volume with user-defined subvolume types, which have been defined as types 16, 17, and 18. In this example, the volume is named animation and the subvolumes are named wire-data, shading, and texturemap. For information on subvolumes, see “Subvolumes”. For information on XVM object names, see “XVM Object Specification” in Chapter 3.

Figure 1-9. XVM Volume with User-Defined Subvolume Types

XVM Volume with User-Defined Subvolume Types

Subvolumes

A subvolume is the entry point for XVM logical volume I/O. Each subvolume is a distinct address space and a distinct type. There can be only one volume element beneath a subvolume in an XVM topology.

Subvolumes can be of the following system-defined types:

Data subvolume 

An XFS data subvolume is required for all XVM logical volumes acting as filesystem devices.

Log subvolume 

The log subvolume contains a log of XFS filesystem transactions and is used to expedite system recovery after a crash. A log subvolume is optional for an XVM logical volume; if one is not present, the filesystem log is kept in the data subvolume.

Real-time subvolume 

Real-time subvolumes are generally used for data applications such as video, where guaranteed response time is more important than data integrity. A real-time subvolume is optional for an XVM logical volume.

Volume elements that are part of a real-time subvolume should not be on the same disk as volume elements used for data or log subvolumes. This separation is required for files used for guaranteed-rate I/O with hard guarantees.


Note: XVM on Linux does not support real-time subvolumes.


System-defined subvolume types cannot have user-defined names.

A subvolume can also be marked as being of a user-defined type. You can specify a name for a subvolume of a user-defined type.

Subvolumes enforce separation among data types. For example, user data cannot overwrite filesystem log data. Subvolumes also enable filesystem data and user data to be configured to meet goals for performance and reliability. For example, performance can be improved by putting subvolumes on different disk drives.

Each subvolume can be organized independently. For example, you can mirror the log subvolume for fault tolerance and stripe the real-time subvolume across a large number of disks to give maximum throughput for video playback.

Figure 1-10 shows four examples of the composition of an XVM subvolume, showing that an XVM subvolume can contain only one child volume element.

Figure 1-10. XVM Subvolume Examples

XVM Subvolume Examples

Slices

Slices are the lowest level in the hierarchy of XVM logical volumes. Slices define physical storage; they map address space of a physical disk onto a volume element.

Concats

A concat is an XVM volume element that combines other volume elements so that their storage is combined into one logical unit. For example, two slices can be combined into a single concat.

Figure 1-11 shows a concat that is composed of two slices.

Figure 1-11. Concat Composed of Two Slices

Concat Composed of Two Slices

Figure 1-12 shows a concat that is composed of two mirrors.

Figure 1-12. Concat Composed of Two Mirrors

Concat Composed of Two Mirrors

Stripes

A stripe is an XVM volume element that consists of two or more underlying volume elements. These elements are organized so that an amount of data called the stripe unit is written to and read in from each underlying volume element in a round-robin fashion.

Striping can be used to alternate sections of data among multiple disks. This provides a performance advantage by allowing parallel I/O activity.

Figure 1-13 shows a three-way stripe.

Figure 1-13. Three-Way Stripe

Three-Way Stripe

A stripe configured on top of another stripe may provide performance benefits over a single wider stripe. In Figure 1-14, two three-way stripes are created and then striped again using a larger stripe unit size. If configured correctly, disjoint sequential access (where different processes are doing sequential I/O to different parts of the address space) will end up on different halves of the top-level stripe. The advantage of this configuration is that for parallel large accesses, the two halves of the top-level stripe can operate independently, whereas with a single six-way stripe, multiple I/O operations would be outstanding to each disk, causing the need for a disk seek.

Figure 1-14. Stripe on Stripe Volume Element

Stripe on Stripe Volume Element

Mirrors

A mirror is an XVM volume element that maintains identical data images on its underlying volume elements. This data redundancy increases system reliability. The components of a mirror do not have to be identical in size, but if they are not there will be unused space in the larger components.


Note: To use the mirroring feature of the XVM Volume Manager or to access a mirrored volume from a given node in a cluster, you must purchase the XFS Volume Plexing software option and obtain and install a FLEXlm license.

Figure 1-15 shows a mirror that is composed of two slices.

Figure 1-15. Mirror Composed of Two Slices

Mirror Composed of Two Slices

Figure 1-16 shows a mirror that is composed of two stripes.

Figure 1-16. Mirror Composed of Two Stripes

Mirror Composed of Two Stripes

Figure 1-17 shows a mirror composed of a stripe and a concat.

Figure 1-17. Mirror Composed of a Stripe and a Concat

Mirror Composed of a Stripe and a Concat

Writing Data to Logical Volumes

A logical volume can include slices from several physical disk drives. If the logical volume is not striped, data is written to the first component of a volume element until that component is full, then to the second component, and so on. Figure 1-18 shows the order in which data is written to a concatenated logical volume. In this figure, each wedge represents a unit of data that is written to disk. Data is written to the first component until it is filled, and then data is written to the second component until it is filled, and so forth.

Figure 1-18. Writing Data to a Non-Striped Logical Volume

Writing Data to a Non-Striped Logical Volume

If the logical volume is striped, an amount of data called the stripe unit is written to each underlying volume element in a round-robin fashion. Figure 1-19 shows the order in which data is written to a striped volume element with a three-way stripe. Each wedge represents a stripe unit of data. One stripe unit of data is written to the first component of the stripe, then one stripe unit of data is written to the second component of the stripe, then one stripe unit of data is written to the third component of the stripe. After this, the next stripe unit of data is written to the first component, and so forth.

Figure 1-19. Writing Data to a Striped Logical Volume

Writing Data to a Striped Logical Volume

XVM Logical Volumes in a CXFS Cluster

Under IRIX, the XVM Volume Manager is used by CXFS filesystems, which are shared among the nodes in a CXFS cluster.Because of this, an XVM physical volume has a domain, which can be cluster or local. An XVM physical volume with a cluster domain is owned by a CXFS cluster, while an XVM physical volume with a local domain is owned by a single node.


Note: SGI ProPack does not currently support SGI's CXFS cluster environment.

An XVM physical volume that has a cluster domain can be configured and modified by any node in the CXFS cluster that owns it. An XVM physical volume that has a local domain can be configured and modified only by the local node that owns it. The XVM logical volumes that are contained on XVM physical volumes with a local domain are considered to be local volumes.

For information on XVM domains, see “XVM Domains” in Chapter 2. For information on CXFS, see CXFS Version 2 Software Installation and Administration Guide.

XVM Logical Volumes and Failover

If your XVM configuration requires that you spread I/O across controllers, you must have a complete failover.conf file configured. This is necessary to ensure that I/O is restricted to a chosen primary path. For example, if you want a striped volume to span two host bus adapters, you must configure a failover.conf file to specify a primary path.

For information on configuration of failover for storage devices, see your SGI support provider. Information on the failover.conf file can also be found on the failover(7M) man page and in the /etc/failover.conf file itself.

Installing the XVM Logical Volume Manager under IRIX

If you are running the “f” release leg of the IRIX operating system, you can use the XVM Volume Manager as a standalone volume manager, a separate product from CXFS.


Note: If you will be using the mirroring feature of XVM, you must obtain and install the XFS Volume Plexing option, which requires a FLEXlm license. Contact SGI or your local service provider for information on obtaining and installing this license.

To use XVM as a standalone product under IRIX, you will need to specify that the eoe.sw.xvm module is installed when you install your system. This module is not installed by default.

If you are already running the “f” release leg of IRIX and wish to add support for running XVM as a standalone volume manager, use the following procedure:

  1. To ensure that you are running IRIX 6.5.Xf, use the following command to display the currently installed system:

    # uname -aR
    

    IRIX 6.5.Xm does not support XVM as a standalone volume manager.

  2. Insert CD-ROM #2 into the CD drive.

  3. Instruct inst to read the already inserted CD-ROM as follows:

    # inst
    Inst> from /CDROM/dist
    


    Caution: Do not install to an alternate root using the inst -r option. Some of the exit operations (exitops) do not use pathnames relative to the alternate root, which can result in problems on both the main and alternate root filesystem if you use the -r option. For more information about exitops, see the inst(1M) man page.


  4. Press <ENTER> to read the CD-ROM:

    Install software from : [/CDROM/dist] <ENTER>
    

  5. Install the XVM module:

    Inst> keep *
    Inst> install eoe.sw.xvm
    

  6. Exit from inst:

    Inst> quit
    

    The requickstarting process may take a few minutes to complete.

After you have installed the software and you have quit the inst interface, you are prompted to reboot the system and apply the changes.