Physical Volume In AIX – A Primer

March 27th, 2009

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:

  1. It has 16 digit unique identifier. This is called Physical Volume Identifier(PVID). Without this Physical Volume can not be used under LVM.
  2. The properties of Physical Volume can be changed on the fly.
  3. Physical Volume can be made available or unavailable to a Volume Group through command line or smitty.
  4. Physical Volume can be set to removed state through command line.
  5. Its possible to list characteristics of Physical Volume using command line or smitty.
  6. 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.
  7. Physical Volume allows us to specify, where exactly on Physical Volume to store the data.
  8. 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:

  1. Restart the server. The command cfgmgr is used during boot stage. So, Physical Volume is configured.
  2. Run cfgmgr command. In this case you don’t need to reboot server.
  3. 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.

Tags: , , , , , , , , , , , , , ,
Posted in LVM | 5 Comments »

Comments

5 Responses to “Physical Volume In AIX – A Primer”

  1. File Systems In AIX – A Primer | World is Welcome To The World of Unix!!! Says:

    […] File System is native to AIX. This File System retain a journal for every I/O transaction on a Physical Volumes. One Logical Volume can contain only one Journaled File System. In order to use the File System, […]

  2. How Does AIX Deal With Bad Blocks | World is Welcome To The World of Unix!!! Says:

    […] This is slightly more complex way of data relocation. The operation is initiated and instructed by Physical Volume. In this case data is moved from one Physical Partition to another reserved physical partition. So, […]

  3. Volume Group In AIX - A Primer | World is Welcome To The World of Unix!!! Says:

    […] Thanks for visiting! Volume Group is at the highest level in LVM hierarchy. Hard disks are used as Physical Volumes in LVM. Then Physical partitions are mapped to Logical Partitions. Logical Partitions are combined […]

  4. Logical Volume In AIX – A Primer | World is Welcome To The World of Unix!!! Says:

    […] to my RSS feed. Thanks for visiting! Users can not access directly, the disk space available on Physical Volumes with in Volume Group. In order to access the space available, the users and applications need to […]

  5. How To Work With Physical Volumes | World is Welcome To The World of Unix!!! Says:

    […] to my RSS feed. Thanks for visiting! I’ve written in my previous posts about introduction to Physical Volumes. There I also discussed some operations to be carried out on Physical Volumes. Now, I’ll be […]

Leave a Reply

 Comment Form 

 



More articles from the category: LVM


The mkvg FAQs

Here in this post I’m presenting few things in the form of FAQs. The can be used as a ready reference while creating Volume Groups. To know how to create Volume Group read the article: How To Create Volume Group.

How To Create Volume Group

Lots of things need to be considered while creating Volume Groups. In this post I’m presenting various scenarios of Volume Group creation. In the previous post I introduced you to listing of Volume Groups. For the ones interested in fundamentals of Logical Volume Manager read the previous article: Aix Logical Volume Manager A Brief Introduction…

How To List Volume Groups and Their Characteristics

I introduced Volume Groups in one of my previous posts. In this post I’m going to discuss, how to carry out common operations on Volume Groups. For more information you can see the previous article: Aix Logical Volume Manager A Brief Introduction.
Here are few things which I’m gonna discuss in this post:

Reorganize Volume Group What Is It And How To Do It?

What is reorganization of a Volume Group and why its needed, is a bit confusing for the system administrators. Here in this article I am explaining it to make it easier for the reader

How To Work With Physical Volumes

I’ve written in my previous posts about introduction to Physical Volumes. There I also discussed some operations to be carried out on Physical Volumes. Now, I’ll be discussing some other operations on Physical Volumes like listing Physical Volumes, Logical Volumes on Physical Volumes, Physical Partitions allocations etc. For more information you can see the previous article: Aix Logical Volume Manager A Brief Introduction.

File Systems In AIX-A Primer

Generally talking, the File Systems are collection of files, directories etc. within a single partition or Logical Volume in a Volume Group. Collecting files and directories from different Logical Volumes or Partitions does not qualify to be named as File System. Aix supports mainly three types of File Systems: JFS, NFS and CDRFS. All these are being discussed here in this article. For more information you can see the previous article: Aix Logical Volume Manager A Brief Introduction

Logical Volume In AIX A Primer

Users can not access directly, the disk space available on Physical Volumes with in Volume Group. In order to access the space available, the users and applications need to access File Systems which are created on Logical Volumes. Therefore to manage Physical Volume space you need to manage Logical Volumes. For more information you can see the previous article: Aix Logical Volume Manager A Brief Introduction….

Volume Group In AIX – A Primer

Volume Group is at the highest level in LVM hierarchy. Hard disks are used as Physical Volumes in LVM. Then Physical partitions are mapped to Logical Partitions. Logical Partitions are combined to Logical Volumes. These Logical Volumes comprise the Volume Group. For more information you can see the previous article: Aix Logical Volume Manager A Brief Introduction..

How Does AIX Deal With Bad Blocks

The biggest concern for any organization using a server is data integrity. The various solutions like Network Attached Storage, Storage Area Networks, high availability servers, online data backup and disaster recovery solutions are among the available solutions.

AIX Logical Volume Manager A Brief Introduction

The storage in Aix can be divided in two layers: Physical and Logical.

On physical level the two things come into picture:

1. Physical Volume(PV).
2. Physical Partition(PP).

On logical level the storage is divided in three parts:

1. Logical Partition(LP).
2. Logical Volume(LV).
3. Volume Group(VG).

Physical Volume In AIX – A Primer

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…

Non Concurrent, Concurrent and Enhanced Concurrent Volume Groups

Often the confusion arises among these types. I am trying to clarify the differences.The terms often apply in clustering scenario.

Non Concurrent VG
In Non Concurrent VG, application runs typically on a single node only and data of VG is accessible to that node only. If however present…

Quorum-What it is and Why is it Needed

The importance of Quorum concept lies in fact that if quorum is enabled and VGDAs fall below 51% then the data on VG may be corrupted if VG remains varied on. Thats why quorum enabled VG is varied off if quorum falls below 51%. This way data is safe on VG because disk