Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administration Tasks: HP 9000 > Chapter 3 Managing Disks Using the Logical Volume Manager (LVM)

LVM Naming Conventions

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

By default, HP-UX uses certain naming conventions for physical volumes, volume groups, and logical volumes. You need to refer to LVM devices or volume groups by name when using them within SAM, with HP-UX commands, or when viewing information about them.

Naming Physical Volumes

Physical volumes are identified by their device file names, for example

  • /dev/dsk/cntndn

  • /dev/rdsk/cntndn

Note that each disk has a block device file and a character or raw device file, the latter identified by the r. Which name you use depends on what task you are doing with the disk. In the notation above, the first name represents the block device file while the second is the raw device file.

Use a physical volume's raw device file for these two tasks only:

  • When creating a physical volume. Here, you use the device file for the disk. For example, this might be /dev/rdsk/c3t2d0 if the disk were at card instance 3, target address 2, and device number 0. (The absence of a section number beginning with s indicates you are referring to the entire disk.)

  • When restoring your volume group configuration.

For all other tasks, use the block device file. For example, when you add a physical volume to a volume group, you use the disk's block device file for the disk, such as /dev/dsk/c5t3d0.

For more information on device file names, see Chapter 1 of Configuring HP-UX for Peripherals. See later in the chapter for examples of using device file names in completing various tasks and for which commands to use.

All disk device files are created automatically when you boot the system, after you have physically added the disk. Refer to insf(1M) for more information.

Naming Volume Groups

When choosing a name for a volume group, the name must be identical to the name of a directory you have created under /dev. (See Steps 3 and 4 of the example following Table 3-4.) The name can have up to 255 characters.

Each volume group must have a unique name. For example, typical volume group names could be vg01, vgroot, or vg_sales. Although the name does not have to start with vg, this is highly encouraged. Often, these names take the form: /dev/vgnn. When assigned by default, the number nn starts at 00 and proceeds 01, 02, and so on, in the order that volume groups are created. By default, your root volume group will be vg00 although this name is not required; see "Creating the Root Volume Group and a Root Logical Volume" later for more information on the root volume group.

Naming Logical Volumes

Logical volumes are identified by their device file names which can either be assigned by you or assigned by default when you create a logical volume using lvcreate(1M).

When assigned by you, you can choose whatever name you wish up to 255 characters.

When assigned by default, these names take the form: /dev/vgnn/lvolN (the block device file form) and /dev/vgnn/rlvolN (the character device file form). The number N starts at 1 and proceeds 2, 3, and so on, in the order that logical volumes are created within each volume group.

When LVM creates a logical volume, it creates both block and character device files. LVM then places the device files for a logical volume in the appropriate volume group directory.

For example, the default block name for the first logical volume created in volume group vg01 would have the full path name:

/dev/vg01/lvol1

If you create a logical volume to contain raw data for a sales database, you might want to name it using a non-default name:

/dev/vg01/sales_db_lv

After the logical volume in the above example has been created, it will have two device files:

/dev/vg01/sales_db_lv
(the block device file)
/dev/vg01/rsales_db_lv
(the character, or raw, device file)

Naming Physical Volume Groups

Physical volume groups are useful for mirroring and are discussed in Chapter 7. The only naming restriction in this case is that within a volume group, each physical volume group must have its own unique name. For example, the volume group /dev/vg02 might have two physical volume groups called /dev/vg02/pvg1 and /dev/vg02/pvg2.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.