cancel
Showing results for 
Search instead for 
Did you mean: 
  • 16.5K Views

Physical Partition vs Physical Volume?

Jump to solution

What is the difference between the two?

I know a Physical Volume relates to Volume Groups. Does a Physical Partition mean it should be a Primary partition or does it matter at all weather it is Primary/Extended or Logical in nature?

 

Thanks,

Labels (1)
6 Solutions

Accepted Solutions
Ricardo
Flight Engineer Flight Engineer
Flight Engineer
  • 16.5K Views

Physical partition is a concept from partition tables using msdos type, which supports only 4 physical partitions, but can have 3 physical and 1 extended, with several logical partitions. This is a way to devide a disk into multiple units. 

A Physical Volume (PV) is used as a base for Logical Volume Management (LVM), and it's a kind of filesystem that you format your partition (physical or logical). Than you can agregate it with others PV's into a unique Volume Group (VG) to create your Logical Volume (LV).  The usage of LVM gives you the ability of have a bigger disk,  combining small ones, and even moving data from one disk to another with the system alive, if one of the disks are failing or too small. 

View solution in original post

Tracy_Baker
Starfighter Starfighter
Starfighter
  • 16.5K Views

@solutionsville 

I’m sorry, but there is some very misleading information here. I would humbly suggest that this should not previously have been marked as having a solution,

A physical partition doesn't have anything to do with "msdos" – it isn’t even a partition type in Red Hat. To state as much is terribly misleading.

Red Hat supports many types of physical partitions; normally, its default partition type is "Linux" (type 83 - fdisk or type 8300 - gdisk).

Quite simply, a block device (a hard drive or SSD) must have at least 1 physical partition on it to be used.

Here's a decent definition, "A [physical] partition is a section of a storage device, such as a hard disk drive or solid state drive. It is treated by the operating system as a separate ... volume, which makes it function similar to a separate physical device." (https://techterms.com/definition/partition)

That's why, in Windows, physical partitions are represented by drive letters: C:\, D:\, etc.

In Red Hat, they look like: /dev/sda1 (first discovered block device, first partition), /dev/sda2 (first discovered block device, second partition), /dev/sdb1 (second discovered block device, first partition), etc.

Physical partitions are in no way filesystems! Filesystems are what is done to a partition (or logical volume) once created – this is sometimes known as “formatting.”

The easiest way to think of a physical volume (PV) is that it is a physical partition that [1] has a partition type of “Linux LVM” (type 8e - fdisk or type 8e00 - gdisk) and [2] has been "marked" as a PV using pvcreate -- meaning that it can now be added to a volume group (VG). From the VG, logical volumes (LV) can be created.

PVs, VGs, and LVs are part Red Hat’s Logical Volume Manager (LVM) system. You can read more about it here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager...

Generally, a single primary partition is created on a block device that is to be used (ultimately) in a logical volume.

I mentioned two utilities, fdisk, and gdisk. These are used to make partitions. Each support a different set of partition types (with some overlap). Here’s a quick break-down of their differences:

fdisk

  • Older
  • Used mostly with systems that use BIOS
  • Uses a Master Boot Record (MBR) that:
    • Supports up to 4 primary, OR 3 primary partitions and 1 extended partition (which can have a number of logical partitions)
    • Has a maximum partition size of 2Tb

gdisk

  • Newer
  • Used mostly with systems that use UEFI
  • Uses a GUID Partition Table (GPT) that:
    • Supports 128 primary physical partitions (no extended)
    • Has a maximum size of 8 Zb (~4 billion times the max. size of an MBR partition)
Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College

View solution in original post

Tags (1)
varelov
Flight Engineer Flight Engineer
Flight Engineer
  • 16.4K Views

You got it right Ricardo- that's exactly what the difference is between physical volume and physical partition. A partition can be primary or extended- primary and extended are just types of a physical partition, doesn't matter if a particular partition is primary or extended. Both are physical.  Physical volume is related to Logical Volume realm- the view on the logical configuration is abstracted from its underlying physical configuration. Out of physical volumes you create volume groups and then logical volumes. Partitioning scheme stops being as relevant as it was before you started using LVM.

Once you make a physical partition a physical volume and then later a part of a volume group, you don't need to worry or know actual disk topology anymore- you deal with volume groups, logical volumes and all the operations they can afford you as an admin. To know how to execute LV management becomes especially important when you are required to do operations that normally, if you relied only on physical partitions and their filesystem formatting, are prohibited or the cost is prohibitive and time consuming- shrinking a partition for example, vs. shrinking a logical volume. XFS, default filesystem of RHEL 7, doesn't allow shrinking but shrinking a logical volume via recovery from a snapshot is rather trivial.

View solution in original post

Joseph03
Cadet
Cadet
  • 9,591 Views

A doubt

Why is it not possible to create volume group directly out of a partition

 

View solution in original post

Fran_Garcia
Starfighter Starfighter
Starfighter
  • 9,558 Views

a volume group is an abstraction that comprises both physical volumes, logical volumes and their metadata. You can issue something like "vgcreate myvolumegroup /dev/sdXY", and that will create both a PV on /dev/sdXY, and a volume group that owns that PV. You cannot create an empty volume group without including at least one PV or device that will hold the PV.

 

 

View solution in original post

  • 8,823 Views

Hello Tracy. I run a RH 8.6. I wonder, if physical partitions slated for LVM usage have to be of type 'Linux LMV' (8e), then how come in my installation, a physical partion /dev/nvme01p3 which is used as a LVM physical volume, is of type 'Linux filesystem' (8300)

Marek_Juraszek_0-1665053275152.png

Marek_Juraszek_2-1665053393131.png

 

Marek_Juraszek_1-1665053379977.png

 

For comparison, on CentOS 7 the LVM physcial partition /dev/vda2 is indeed of type 'Linux LVM':

Marek_Juraszek_3-1665053856403.png

 

Marek_Juraszek_4-1665053894987.png

 

 

 

 

View solution in original post

8 Replies
dennisk
Flight Engineer
Flight Engineer
  • 16.5K Views

What are trying to do? Are you creating an LVM installation and need to create PVs or are you asking about MBR partitions? If we know what you are trying to accomplish we can offer more help.

0 Kudos
Ricardo
Flight Engineer Flight Engineer
Flight Engineer
  • 16.5K Views

Physical partition is a concept from partition tables using msdos type, which supports only 4 physical partitions, but can have 3 physical and 1 extended, with several logical partitions. This is a way to devide a disk into multiple units. 

A Physical Volume (PV) is used as a base for Logical Volume Management (LVM), and it's a kind of filesystem that you format your partition (physical or logical). Than you can agregate it with others PV's into a unique Volume Group (VG) to create your Logical Volume (LV).  The usage of LVM gives you the ability of have a bigger disk,  combining small ones, and even moving data from one disk to another with the system alive, if one of the disks are failing or too small. 

Tracy_Baker
Starfighter Starfighter
Starfighter
  • 16.5K Views

@solutionsville 

I’m sorry, but there is some very misleading information here. I would humbly suggest that this should not previously have been marked as having a solution,

A physical partition doesn't have anything to do with "msdos" – it isn’t even a partition type in Red Hat. To state as much is terribly misleading.

Red Hat supports many types of physical partitions; normally, its default partition type is "Linux" (type 83 - fdisk or type 8300 - gdisk).

Quite simply, a block device (a hard drive or SSD) must have at least 1 physical partition on it to be used.

Here's a decent definition, "A [physical] partition is a section of a storage device, such as a hard disk drive or solid state drive. It is treated by the operating system as a separate ... volume, which makes it function similar to a separate physical device." (https://techterms.com/definition/partition)

That's why, in Windows, physical partitions are represented by drive letters: C:\, D:\, etc.

In Red Hat, they look like: /dev/sda1 (first discovered block device, first partition), /dev/sda2 (first discovered block device, second partition), /dev/sdb1 (second discovered block device, first partition), etc.

Physical partitions are in no way filesystems! Filesystems are what is done to a partition (or logical volume) once created – this is sometimes known as “formatting.”

The easiest way to think of a physical volume (PV) is that it is a physical partition that [1] has a partition type of “Linux LVM” (type 8e - fdisk or type 8e00 - gdisk) and [2] has been "marked" as a PV using pvcreate -- meaning that it can now be added to a volume group (VG). From the VG, logical volumes (LV) can be created.

PVs, VGs, and LVs are part Red Hat’s Logical Volume Manager (LVM) system. You can read more about it here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager...

Generally, a single primary partition is created on a block device that is to be used (ultimately) in a logical volume.

I mentioned two utilities, fdisk, and gdisk. These are used to make partitions. Each support a different set of partition types (with some overlap). Here’s a quick break-down of their differences:

fdisk

  • Older
  • Used mostly with systems that use BIOS
  • Uses a Master Boot Record (MBR) that:
    • Supports up to 4 primary, OR 3 primary partitions and 1 extended partition (which can have a number of logical partitions)
    • Has a maximum partition size of 2Tb

gdisk

  • Newer
  • Used mostly with systems that use UEFI
  • Uses a GUID Partition Table (GPT) that:
    • Supports 128 primary physical partitions (no extended)
    • Has a maximum size of 8 Zb (~4 billion times the max. size of an MBR partition)
Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
Tags (1)
  • 8,824 Views

Hello Tracy. I run a RH 8.6. I wonder, if physical partitions slated for LVM usage have to be of type 'Linux LMV' (8e), then how come in my installation, a physical partion /dev/nvme01p3 which is used as a LVM physical volume, is of type 'Linux filesystem' (8300)

Marek_Juraszek_0-1665053275152.png

Marek_Juraszek_2-1665053393131.png

 

Marek_Juraszek_1-1665053379977.png

 

For comparison, on CentOS 7 the LVM physcial partition /dev/vda2 is indeed of type 'Linux LVM':

Marek_Juraszek_3-1665053856403.png

 

Marek_Juraszek_4-1665053894987.png

 

 

 

 

Ricardo
Flight Engineer Flight Engineer
Flight Engineer
  • 3,676 Views

I mean disk label type: msdos, gpt, etc...

man 8 parted - search for mklabel

0 Kudos
varelov
Flight Engineer Flight Engineer
Flight Engineer
  • 16.4K Views

You got it right Ricardo- that's exactly what the difference is between physical volume and physical partition. A partition can be primary or extended- primary and extended are just types of a physical partition, doesn't matter if a particular partition is primary or extended. Both are physical.  Physical volume is related to Logical Volume realm- the view on the logical configuration is abstracted from its underlying physical configuration. Out of physical volumes you create volume groups and then logical volumes. Partitioning scheme stops being as relevant as it was before you started using LVM.

Once you make a physical partition a physical volume and then later a part of a volume group, you don't need to worry or know actual disk topology anymore- you deal with volume groups, logical volumes and all the operations they can afford you as an admin. To know how to execute LV management becomes especially important when you are required to do operations that normally, if you relied only on physical partitions and their filesystem formatting, are prohibited or the cost is prohibitive and time consuming- shrinking a partition for example, vs. shrinking a logical volume. XFS, default filesystem of RHEL 7, doesn't allow shrinking but shrinking a logical volume via recovery from a snapshot is rather trivial.

Joseph03
Cadet
Cadet
  • 9,592 Views

A doubt

Why is it not possible to create volume group directly out of a partition

 

Fran_Garcia
Starfighter Starfighter
Starfighter
  • 9,559 Views

a volume group is an abstraction that comprises both physical volumes, logical volumes and their metadata. You can issue something like "vgcreate myvolumegroup /dev/sdXY", and that will create both a PV on /dev/sdXY, and a volume group that owns that PV. You cannot create an empty volume group without including at least one PV or device that will hold the PV.

 

 

Join the discussion
You must log in to join this conversation.