Monday 6 June 2011

AIX Data Storage - Part 5

WORKING WITH LOGICAL VOLUME MANAGER (LVM) - SUB-PART 3:


Objectives for the module
>Working with Physical Volumes


Physical Volumes

Explanation:

Physical Volumes are nothing but the hard disks. These physical volumes belong to a volume group.

Physical Partitions (PP) is the smallest allocatableunit on your physical volume. These physical partitions should be the same size across the entire Volume Group. However, since there can be multiple Volume Groups on a single system, each volume group can have different PP size. The PP size can be in the range 1-1024 MB.

Default number of PPs per Physical Volume is 1016 but can be increased to suit your requirements.

Physical Volumes Menu



You can use the fastpath # smit pv to get into this screen. Each of these options will be discussed shortly one by one as follows:

List physical Volume Information

Explanation:

The command lspv which stands for list all physical volumes in the system, internally uses the undocumented command getlvodm –C to list the physical volumes in the system.

The lspv command without any parameter can be used to list the physical volume name, the PV identifier, and the Volume Group name that it belongs to.

The command lspv <pvname> gives the status information, number of PPs, PP size, to which volume group it belongs to, free PPs and its distribution in terms of intra policy etc.

Listing physical Volume Information..(continued..)


Explanation:
The command lspv –l hdisk0 lists all the logical volumes present on a physical volume. The output of the command would give information about the LV name, number of LPs, number of PPs, Its distribution and its mount point.

Listing physical Partition map for a Physical Volume


Explanation:

The command lspv –p pvname lists all the logical volumes on a disk and they physical partitions to which its logical partitions are mapped.

The output of the command would display, the PP number, its STATE  ie whether its free or used up, intra region where the PP is situated, LV name, type of the LV and mount point.

Add/Move contents of a physical volume


•Add a disk -> Can be done using SMIT or by cfgmgr when the system boots up.
•To move the contents of a physical volume
# migratepv –l lv00 hdisk0 hdisk1


Explanation in detail:

To add a physical volume to the system, you can use the Add a Disk option from the fixed disks menu under Devices  main menu in SMIT.

Once the disk is added to the system, it has to be made part of a volume group so that you can start using the disk.

Another method of adding a disk to the system is, power off the system, add the new disk physically to the system. Power On the system during which the program called cfgmgr will be invoked to configure the newly added disk.
Once the new disk is added, if you want to migrate a existing logical volume from old disk to the new one, you can use the command called migratepv.

The syntax for migratepv command is
# migratepv –l lv00 hdisk0 hdisk1
I.e. –l option to specify the logical volume name that you are planning to migrate followed by the source hard disk name and the destination hard disk name.

Documenting the Disk Storage


•List of the disks on the system (PVID and volume group):
# lspv
•List the volume groups:
# lsvg
•List what logical volumes are contained in each volume group:
# lsvg -l vgname
•List the logical volumes on each disk:
# lspv -l pvname





Incoming Search Terms:
LVM
LVM in detail
Details of LVM
Details of LVM in AIX
AIX LVM
Physical volumes in AIX
AIX physical volumes
physical volume explained
Everything about physical volume
Everything about AIX physical volume

No comments:

Post a Comment