[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

System Management Guide:
Operating System and Devices

LVM Configuration Tasks

The Logical Volume Manager (LVM) is installed with the base operating system and needs no further configuration. However, disks must be configured and defined as a physical volume before the LVM can use them. If you want to set up raw logical volumes for use by an application, see Define a Raw Logical Volume for an Application.

This section provides instructions for the following configuration tasks:

Configuring a Disk

You can configure a new disk in any of the following ways.

After a disk is configured, although it is generally available for use, the Logical Volume Manager requires that it is further identified as a physical volume.

Method 1

Use the following method when you can shut down and power off the system before attaching the disk:

  1. Physically connect the new disk to the system and then power on the disk and system according to the documentation that came with your system.
  2. During system boot, let the Configuration Manager (cfgmgr) automatically configure the disk.
  3. After system boot, with root authority, type the lspv command at the command line to look for the new disk's name. The system returns an entry similar to one of the following:
       hdisk1  none                     none

    or:

       hdisk1  00005264d21adb2e         none
    The first field identifies the system-assigned name of the disk. The second field displays the physical volume ID (PVID), if any. If the new disk does not appear in the lspv output, refer to theAIX 5L Version 5.2 Installation Guide and Reference.

At this point, the disk is usable by the system but it needs a PVID for use by the LVM. If the new disk does not have a PVID, then see Making an Available Disk a Physical Volume.

Method 2

Use the following method when you cannot shut down your system and you know the following information about the new disk:

Do the following:

  1. Physically connect the new disk to the system and then power on the disk and system according to the documentation that came with your system.
  2. To configure the disk and ensure that it is available as a physical volume, use the mkdev command with the flags shown, as in the following example:
    mkdev -c disk -s scsi -t 2200mb -p scsi3 \
    -w 6,0 -a pv=yes
    This example adds a 2.2 GB disk with a SCSI ID of 6 and logical unit number of 0 to the scsi3 SCSI bus. The -c flag defines the class of the device. The -s flag defines the subclass. The -t flag defines the type of device. The -p flag defines the parent device name that you want to assign. The -w flag designates the disk's location by SCSI ID and logical unit number. The -a flag specifies the device attribute-value pair, pv=yes, which makes the disk a physical volume and writes a boot record with a unique physical volume identifier onto the disk (if it does not already have one).

At this point, the disk is defined both as an available device and as a physical volume. You can type the lspv command on the command line to list the new disk entry. If the new disk does not appear in the lspv output, refer to the AIX 5L Version 5.2 Installation Guide and Reference.

Method 3

Use the following method when you cannot shut down your system and you know only the location of the disk:

  1. Physically connect the new disk to the system and then power on the disk and system according to the documentation that came with your system.
  2. To check which physical disks are already configured on the system, type the lspv command on the command line. The output looks similar to the following:
    hdisk0       000005265ac63976    rootvg
  3. Type cfgmgr on the command line to enter the Configuration Manager. The Configuration Manager automatically detects and configures all newly connected devices on the system, including the new disk.
  4. To confirm that the new disk was configured, type the lspv command again. The output looks similar to one of the following:
    hdisk1    none                none

    OR

    hdisk1   00005264d21adb2e     none

    The first field identifies the system-assigned name of the disk. The second field displays the physical volume ID (PVID), if any. If the new disk does not appear in the lspv output, refer to the AIX 5L Version 5.2 Installation Guide and Reference.

At this point, the disk is usable by the system but it needs a PVID for use by the LVM. If the new disk does not have a PVID, then see Making an Available Disk a Physical Volume.

Making an Available Disk a Physical Volume

A disk must be configured as a physical volume before it can be assigned to volume groups and used by the LVM. Use the following instructions to configure a physical volume:

  1. Ensure the disk is known to the operating system, is available, and is not being used by the operating system or any applications. Type the lspv command on the command line. The output looks similar to the following:
       hdisk1  none                     none

    Check the output for the following:

    If the new disk has no PVID and is not in use, continue with the next step.

  2. To change an available disk to a physical volume, type the chdev command on the command line. For example:
    chdev -l hdisk3 -a pv=yes
    The -l flag specifies the device name of the disk. The -a flag specifies the device attribute-value pair, pv=yes, which makes the disk a physical volume and writes a boot record with a unique physical volume identifier onto the disk (if it does not already have one).

At this point, the disk is defined as a physical volume. You can type the lspv command on the command line to list the new disk entry.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]