AIX PV Commands

root's picture

Display status and characteristics of the PV:
#lspv hdisk69

Display PP usage of hdisk69 and allocation by region on the disk:
#lspv -p hdisk69

To list all logical volumes on PV hdisk69:
#lspv -l hdisk69

Close the PV (Used while removing PV without varyon):
#chpv -v r hdisk69

Open the PV:
#chpv -v a hdisk69

Clear the master boot record on PV hdisk69:
#chpv -c hdisk69

Clear the VGDA off the PV hdisk69:
#chpv -C hdisk69

To move PPs from PV hdisk69 to hdisk96:
#migratepv hdisk69 hdisk96

To migrate LV testlv from PV hdisk69 to hdisk96:
#migratepv -l testlv hdisk69 hdisk96

To modify ALLOCATABLE to NO:
#chpv -an hdisk69

To modify ALLOCATABLE to YES:
#chpv -ay hdisk69

To add PVID to disk:
#chdev -l hdisk69 -a pv=yes

To remove PVID of disk:
#chdev -l hdisk69 -a pv=clear

To check PVID of the disk:
#lqueryvg -h /dev/hdisk69
#od -x /dev/hdisk69 | head

To give details of the volume group info for the hard disk:
#lqueryvg -Atp /dev/hdisk69

As a side note, in specific configurations (like SSD multipathing or EMC PowerPath) it is common to see hdiskX devices without PVID and not belonging to any volume group. Pay attention, this doesn't mean they are free to use. It is perfectly normal in these configurations and the "free" disks are actually the paths of the "real" ones.

For example in case of:
- SSD multipathing, the usable disk name is: vpathX
- EMC PowerPath, the disk name is hdiskpowerX

Below you have an example of SSD multipathing configuration as shown in lspv command:

#lspv
hdisk0          00987ss9d9sds923                    rootvg          
hdisk1          none                                None
hdisk2          none                                None
hdisk3          none                                None
hdisk4          none                                None
vpath0          00cb3e924851ar12                    lamevg2

In the example above, vpath0 is the real disk and hdisk1, hdisk2, hdisk3 and hdisk4 are the paths:

vpath0  Available    Data Path Optimizer Pseudo Device Driver

hdisk1 Available 01-01-02
U789D.001.DQD35BK-P1-C2-T2-W5005076801402F1D-L22000000000000 FC 2145
hdisk3 Available 01-01-02
U789D.001.DQD35BK-P1-C2-T2-W5005076801402F2D-L22000000000000 FC 2145
hdisk3 Available 03-00-02
U789D.001.DQD35PG-P1-C6-T1-W5005076801302F2D-L22000000000000 FC 2145
hdisk4 Available 03-00-02
U789D.001.DQD35PG-P1-C6-T1-W5005076801302F1D-L22000000000000 FC 2145

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root