linux lvm how do you determine which physcial hard disk drive is mapped to a particular partition

Posted on 2009-07-04
Last Modified: 2013-12-06

I have a pre-installed VMware machine with Linux Red Hat Enterprise Server 5 and Oracle 11g installed.

I have 4 10GB hard drives on the machine. By hard drives I mean 4 separate real-life hard disks (well through the VMware that is).

I have been analying my partitions with the Linux Logical Volume Management graphical tool.

I can see how things are layed out but I'm confused as to what a physical and logical partition really means.

I would like to know where I can see where the so-called "physical" partitions are mapped to the 4 hard disks that I have.

It may be a simple question.

I do have 4 "physical views" or physical partitions however they are separated between two different "Volume Groups" so I'm not sure if each physical volume is mapped to a different physical hard disk.

I've attached some screenshots from my LVM.

I have a 2 volume groups, I've uploaded a screenshot for each one.
Question by:ora-what
  • 3
  • 2
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24778506

First of all LVM is organised like that:
- First of all you have Physical Volumes (Actual Hard Dsiks) with physical partitions on them. Such as /dev/sba,sbd etc and physical partitions such as /dev/sda1,/dev/sdb1. Your physical partitions will have a partition type of LVM (8e)
- You organize one or more physical partitions as logical volumes. You can see this in your second pic where you have a logical volume VolGroup01 including physical partitions (/dev/sdb,c,d)  organized as a single logical volume (VolGroup01)

While you see that there's only one physical partition allocated to your VolGroup00  in the first picture.

The good thing about LVM is that. You have a logical volume it may contain one or more physical partitions and/or physical volumes (having at least one physical partitions) so that you can expand the volume when you are out of spca on the logical volume.

If you hadn't had LVM then you'd need to add another Physical Volume (Hard-disk) to your system. Then You2d need to create a physical partition on your drive and then you'd need to mount this partition under your file tree. So that You would only be able to allocate space under this directory without having a chance to expand it when needed. If you were out of space without LVM all you would do is to format a new hard disk mount under another directory ( say /mnt) then copy the content of the entire directory to it. Unmount both and remount the new volume under the old path discarding the fisnitila smaller disk.

But with LVM you can always add physical disk (with a physical partition) and expand the space for entire tree..

I hope this helps if you have further questions I'll be happy to hear about them.


Author Comment

ID: 24778536
ok that is very good to know

so, between the 2 logical volumes I have (meaning the Volume Groups) I have a total of 4 physical volumes/partitions

(plus the uninitialized boot partition which is /dev/sda1)

according the LVM does this mean that each individual physical volume/partition is on a different hard disk?

(also, ive noticed on google references to the directory /hda, is this directory somehow related or would that be just a user named directory?)
LVL 30

Accepted Solution

Kerem ERSOY earned 500 total points
ID: 24778639
Ok letss clear about something. Physical dirves are indicated as:


For ide drives and

for SCSI and SATA / SAS drives.

/dev/sda is a physical volume and /dev/sda1 is the first physical partition on /dev/sda and /dev/sda2 is the second physical partition over the same disk.

So you have 4 physical disks /dev/sda, /dev/sdb, /dev/sdc and /dev/sdd. /dev/sda is divided into 2 partitions. The first is /dev/sda1 . This is your boot volume and currently mounted under /boot.

/dev/sda2 physical volume is mounted under the VolGroup00. VolGroup00 contains 2 logical volumes. LogVol00 and LogVol01. The LogVol01 contains your SWAP partition and LogVol00 contains your  root file system.

So when it comes to your questions:

- You have 4 physical disks
- /dev/sda1 contains 2  Phyisical Partitions
- /dev/sda1 is mounted under /boot as a physical partition.
- /dev/sda2 contains your LVM Volume Called VolumeGroup00.
- VolumeGroup00 contains 2 logical Partitions: LogVol00 and LogVol01
- LogVol00 contains your / and your LogVol01 contains your Swap Space.
- You have another VolumeGroup which is called VaoGroup01
- VolGroup01 spans to 3 physical Partitions: /dev/sdb1, /dev/sdc1 and /dev/sdd1
- Each Physical Volume /dev/sdb to /dev/sdd contain single physical partitions on each drive.
- They are all allocated to the VolumeGroup.

So yeah each volume and partitons are avore their respective volumes. and VolGout01 is a collection of physical Parttiitons and logical Volumes and maps then to each other.


Author Closing Comment

ID: 31599852
thanks for the thourogh explaination it really helped

yes I didn't notice the /dev/sda - sda1 sda2 pattern

now I can see that my 4 physical disks are:


and that numbers 1,2 ect get added to the end of those for each physical partition

I understand the mapping now, it makes sense

cheers :D
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24779325
You're welcome. Cheers.

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to take different types of Oracle backups using RMAN.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now