| United States-English |
|
|
|
![]() |
HP-UX System Administration Tasks: HP 9000 > Chapter 3 Managing Disks Using the Logical Volume Manager
(LVM) LVM Naming Conventions |
|
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. Physical volumes are identified by their device file names, for example
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:
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. 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. 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:
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:
After the logical volume in the above example has been created, it will have two device files:
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. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||