Physical Volume in AIX is a hard drive with special characteristics which are useful for LVM(Logical Volume Control). So, if any hard drive is to be used for LVM purpose, it needs to be made as Physical Volume. Physical Volume has several properties which differentiate it from normal hard drive. These are listed as below:
- It has 16 digit unique identifier. This is called Physical Volume Identifier(PVID). Without this Physical Volume can not be used under LVM.
- The properties of Physical Volume can be changed on the fly.
- Physical Volume can be made available or unavailable to a Volume Group through command line or smitty.
- Physical Volume can be set to removed state through command line.
- Its possible to list characteristics of Physical Volume using command line or smitty.
- Physical Volume can be converted to normal hard drive through command line. In that case it can not be used under Logical Volume and all data will be lost.
- Physical Volume allows us to specify, where exactly on Physical Volume to store the data.
- Use of Physical Volume is transparent to Logical Volumes under Volume Group.
How To Configure A Hard Drive As Physical Volume
The hard drive can be configured as Physical Volume in the following ways:
- Restart the server. The command cfgmgr is used during boot stage. So, Physical Volume is configured.
- Run cfgmgr command. In this case you don’t need to reboot server.
- Run the command:
mkdev -c disk -s scsi -t 22000mb -p scsi3 -w 6,0 -a pv=yes
-s        Subclass under disk.
-t         Type of disk
-p        Parent name of device.
-w       Where the device is connected.
-a pv   Setting this attribute to yes makes the hard drive a Physical Volume.
Setting Already available disk as Physical Volume
Let’s say the disk available is hdisk2. So, change the attribute pv to yes. The command used is chpv as follows:
chdev -l hdisk2 -a pv=yes
Setting Allocation Permissions on A Physical Volume
Logical Volume can allocate Physical Partitions from a Physical Volume only if it has allocation permissions on that Physical Volume. If no allocation permissions are there, it can not allocate Physical Partitions from that Physical Volume. We’ll take hdisk2 as an example of a Physical Volume. Following is the way to set allocation permissions:
chpv -a y hdisk2
If you want to remove allocation permissions then use:
chpv -a n hdisk2
Setting Availability of A Physical Volume
Physical Volume is said to be available if Logical input or output operations can be carried out on Physical Volume. Normally Physical Volumes are made unavailable before removing them from VG or system. Again chpv comes handy.
To set Physical Volume as unavailable:         chpv -v   r   hdisk2
This is also called closing a PV.
To make it available:              chpv -v   a  hdisk2
This is also called opening a PV.
Clearing The Boot Record of Physical Volume
Physical Volume’s boot record can be cleared as:     chpv -c  hdisk2
Resetting The PVID of Physical Volume
Physical Volume’s PVID can be cleared as:  chdev -a    pv=clear  hdisk2
Removing A Physical Volume
Physical Volume can be removed from system as follows: rmdev   -l  hdisk2
In this case the entries are still there in ODM.
To remove it completely from system use -d flag as follows:
rmdev       -l      -d     hdisk2
The above command removes the Physical Volume from system and ODM as well.
Working in unix for 20 years, just switching to AIX. Like the data above, good, basic, understandable. Thanks.
Hey there, You’ve done an incredible job.
I’ll definitely digg it and personally recommend to my friends.
I’m sure they’ll be benefited from this site.