United States-English |
|
|
HP-UX Reference > Llvm(7)HP-UX 11i Version 3: February 2007 |
|
NAMElvm — Logical Volume Manager (LVM) DESCRIPTIONThe Logical Volume Manager (LVM) is a subsystem for managing disk space. The HP LVM subsystem offers value-added features, such as mirroring (with the optional HP MirrorDisk/UX software), high availability (with the optional HP ServiceGuard software), and striping, that enhance availability and performance. Unlike earlier arrangements where disks were divided into fixed-sized sections, LVM allows the user to consider the disks, also known as physical volumes, as a pool (or volume) of data storage, consisting of equal-sized extents. The default size of an extent is 4 MB. An LVM system consists of arbitrary groupings of physical volumes, organized into volume groups. A volume group can consist of one or more physical volumes. There can be more than one volume group in the system. Once created, the volume group, and not the disk, is the basic unit of data storage. Thus, whereas earlier one would move disks from one system to another, with LVM, one would move a volume group from one system to another. For this reason it is often convenient to have multiple volume groups on a system. Volume groups can be subdivided into virtual disks, called logical volumes. A logical volume can span a number of physical volumes or represent only a portion of one physical volume. The pool of disk space that is represented by a volume group can be apportioned into logical volumes of various sizes. The size of a logical volume is determined by its number of extents. Once created, logical volumes can be treated just like disk partitions. Logical volumes can be assigned to file systems, used as swap or dump devices, or used for raw access. CommandsLVM information can be created, displayed, and manipulated with the following commands:
The following commands are also available if the HP MirrorDisk/UX software is installed:
Device Special FilesIn this release of HP-UX 11i, the Mass Storage Stack supports two naming conventions for the device special files used to identify devices (see intro(7)). Devices can be represented using:
While LVM supports the use of both conventions within the same volume group, the examples shown in the LVM man pages are all using the legacy device special file convention. Alternate Links (PVLinks)In this release of HP-UX, LVM continues to support Alternate Links to a device to allow continued access to the device, if the primary link fails. This multiple link or multipath solution increases data availability, but continues disallowing the use of multiple paths simultaneously. A new feature was introduced in the Mass Storage Subsystem on HP-UX 11i Version 3 that supports multiple paths to a device and allows simultaneous access to these paths. The Mass Storage Subsystem will balance the I/O load across the valid paths. Multipathing is the default unless the scsimgr command is used to enable legacy multipathing and also the active path is a legacy device special file. See scsimgr(1M) for details. Even though the Mass Storage Subsystem supports 32 multiple paths per physical volume on this version of HP-UX, LVM does not support more than eight paths to any physical volume. As a result, commands like vgcreate and vgextend will not succeed in adding more than eight paths per physical volume. Additionally, vgimport and vgscan cannot write more than eight paths per physical volume in the /etc/lvmtab file. If users want to use any specific path other than these eight paths, then they have to vgreduce one of the alternate paths in the volume group and add that specific path using vgextend. It is no longer required or recommended to configure LVM with alternate links. However, it is possible to maintain the traditional LVM behavior. To do so, both of the following criteria must be met:
EXAMPLESThe basic steps to take to begin using LVM are as follows:
To configure disk /dev/dsk/c0t0d0 as part of a new volume group named vg01: First, initialize the disk for LVM with the pvcreate command. pvcreate /dev/rdsk/c0t0d0 Then, create the pseudo device file that is used by the LVM subsystem. mkdir /dev/vg01 mknod /dev/vg01/group c 64 0x010000 The minor number for the group file should be unique among all the volume groups on the system. It has the format 0xNN0000, where NN ranges from 00 to ff. Create the volume group, vg01, containing the physical volume, /dev/dsk/c0t0d0, with the vgcreate command. vgcreate /dev/vg01 /dev/dsk/c0t0d0 You can view information about the newly created volume group with the vgdisplay command. vgdisplay -v /dev/vg01 Create a logical volume of size 100 MB, named usrvol, on this volume group with the lvcreate command. lvcreate -L 100 -n usrvol /dev/vg01 This creates two device files for the logical volume, /dev/vg01/usrvol, which is the block device file, and /dev/vg01/rusrvol, which is the character (raw) device file. You can view information about the newly created logical volume with the lvdisplay command. lvdisplay /dev/vg01/lvol1 Any operation allowed on a disk partition is allowed on the logical volume. Thus, you can use usrvol to hold a file system. newfs /dev/vg01/rusrvol mount /dev/vg01/usrvol /usr SEE ALSOlvchange(1M), lvcreate(1M), lvdisplay(1M), lvextend(1M), lvlnboot(1M), lvreduce(1M), lvremove(1M), lvrmboot(1M), pvchange(1M), pvcreate(1M), pvdisplay(1M), pvmove(1M), vgcfgbackup(1M), vgcfgrestore(1M), vgchange(1M), vgcreate(1M), vgdisplay(1M), vgexport(1M), vgextend(1M), vgimport(1M), vgmodify(1M), vgreduce(1M), vgremove(1M), vgscan(1M), intro(7). Managing Systems and Workgroups. If HP MirrorDisk/UX is installed: lvmerge(1M), lvsplit(1M), lvsync(1M), vgsync(1M). If HP ServiceGuard is installed: cmcheckconf(1M), cmquerycl(1M), Managing MC/ServiceGuard. |
Printable version | ||
|