Link to home
Start Free TrialLog in
Avatar of ora-what
ora-what

asked on

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

Hello,

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.
VolGroup00.bmp
VolGroup01.bmp
Avatar of Kerem ERSOY
Kerem ERSOY

Hi,

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.

Cheers,
K
Avatar of ora-what

ASKER

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?)
ASKER CERTIFIED SOLUTION
Avatar of Kerem ERSOY
Kerem ERSOY

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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:

/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd

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
You're welcome. Cheers.