How To Work With Physical Volumes

April 11th, 2009

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.

How To List Physical Volumes In Aix
To list Physical Volumes in Aix lspv command is used. This command gives the output as name of Physical Volume, its identifier which is a 16 character serial number, the Volume Group to which it belongs and the state of the physical volume whether its active or not. The identifier is also called PVID. Below is the command:

wiw_labs:$ lspv

hdisk0 034cd34d03b25531 altinst_rootvg

hdisk1 034cd34d7533e52b altinst_rootvg

hdisk2 034cd34d753ca221 rootvg active

hdisk3 034cd34d753ca5a8 rootvg active

How To List Connectivity Information of Physical Volume
To see the connectivity information of a Physical Volume you need to issue lsdev command. Here is how you issue this command:

wiw_labs:$ lsdev -C -c disk
hdisk0 Available 23-06-00-6,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 3p-06-00-6,0 16 Bit LVD SCSI Disk Drive
hdisk2 Available 4b-06-00-6,0 16 Bit LVD SCSI Disk Drive
hdisk3 Available 5M-06-00-6,0 16 Bit LVD SCSI Disk Drive

-C: Device Class
-c: Device subclass(disk in this case)

Here you see the name of the disk, the status of the disk(available), its connectivity information and type of the disk.

How To List Overall Information About A Physical Volume
To see the overview of a physical volume let’s say hdisk2, we issue the command lspv with hdisk2 as argument as below:

wiw_labs:$ lspv hdisk2

PHYSICAL VOLUME hdisk2 VOLUME GROUP rootvg
PV IDENTIFIER 002cd34d753ca221 VG IDENTIFIER 002cd34d00004c000000010cfa6a1c1e
PV STATE active
STALE PARTITIONS 0 ALLOCATABLE yes
PP SIZE 64 megabyte(s) LOGICAL VOLUMES 11
TOTAL PPs 542 (34688 megabytes) VG DESCRIPTORS 2
FREE PPs 258 (16512 megabytes) HOT SPARE no
USED PPs 284 (18176 megabytes) MAX REQUEST 256 kilobytes
FREE DISTRIBUTION 28..13..00..108..109
USED DISTRIBUTION 81..95..108..00..00

*(Verify the distribution parameters by adding the PPs in a particular region and then check in overall information.)

The above command gives information about name, state, ID, Physical Partition Size, No of PP, Free and used PP, distribution of PPs, VG, allocatability and other parameters.

How To See What Logical Volumes Are Present On Physical Volume
To see the Logical Volume information on a Physical Volumes, you need to issue the command lspv with -l(logical volume) option. This gives information of Logical Volume name, no. of Logical Partitions in LV, No. of Physical Volume, the allocation distribution and mount point. Here is an example output:

wiw_labs:$ lspv -l hdisk2

LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd10opt

2

2

00..01..01..00..00 /opt
hd9var

39

39

00..05..34..00..00 /var
hd2

55

55

00..04..51..00..00 /usr
hd1

1

1

00..00..01..00..00 /home
hd3

32

32

00..20..12..00..00 /tmp
hd6

64

64

00..64..00..00..00 N/A
hd5

1

1

01..00..00..00..00 N/A
hd4

8

8

00..00..08..00..00 /
hd8

1

1

00..00..01..00..00 N/A
hd7

80

80

80..00..00..00..00 N/A
loglv00

1

1

00..01..00..00..00 N/A

How To See Physical Partition Information of Physical Volume
To see the Physical Partition information of a particular Physical Volume, you need to issue lspv command with -p flag.

wiw_labs:$ lspv -p hdisk2

PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-29 free outer edge
30-109 used outer edge hd7 sysdump N/A
110-173 used outer middle hd6 paging N/A
174-174 used outer middle loglv00 jfslog N/A
175-187 free outer middle
188-188 used outer middle hd10opt jfs2 /opt
189-192 used outer middle hd2 jfs2 /usr
193-212 used outer middle hd3 jfs2 /tmp
213-217 used outer middle hd9var jfs2 /var
218-218 used center hd8 jfs2log N/A
219-226 used center hd4 jfs2 /
227-277 used center hd2 jfs2 /usr
278-288 used center hd9var jfs2 /var
289-300 used center hd3 jfs2 /tmp
301-301 used center hd1 jfs2 /home
302-302 used center hd10opt jfs2 /opt
303-325 used center hd9var jfs2 /var
326-433 free inner middle
434-542 free inner edge

PP Range: Tells about Physical Partitions being used.
State: Whether PP is used or free.
Region: Where the PP is located on disk: outer edge, outer middle, center, inner middle or inner edge.
LV: Which Logical Volume is using these PPs.
Type: What type of Logical volume is there like boot, sysdump, jfs2, jfslog, paging etc.
Mount Point: It’s the mount point where a particular LV is mounted.

How To Determine Which Physical Partition is Mapped To Which Logical Partition
To determine the partition mapping from PP to LP, you need to issue lspv command with -M option. Let’s see the output below:

wiw_labs:$ lspv -M hdisk2

hdisk2:1 hd5:1:1
hdisk2:2-29
hdisk2:30 hd7:1
hdisk2:31 hd7:2
hdisk2:32 hd7:3
hdisk2:33 hd7:4
hdisk2:34 hd7:5
hdisk2:35 hd7:6
hdisk2:36 hd7:7
hdisk2:37 hd7:8

The output is truncated, because of space considerations.

The output shows which Physical Partition on hdisk2 is mapped to which Logical Partition on a Logical Volume.

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

Comments

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