11.2 Create and Remove Physical Volumes

Key Takeaways

  • A physical volume (PV) is a disk or partition initialized for LVM with pvcreate; list with pvs, pvdisplay, and lsblk.
  • Prefer creating PVs on partitions with LVM type (or whole unused disks when the task allows); never pvcreate the wrong device that holds root without explicit need.
  • Remove PVs with pvremove only when they are free of volume-group membership (or after vgreduce); wipe signatures carefully.
  • pvs shows compact attributes (size, free, VG name); empty VG column means the PV is free for vgcreate/vgextend.
  • PV metadata lives on the device; creation is persistent across reboot, but usable storage still requires VG/LV/filesystem layers and correct mounts for user data.
Last updated: August 2026

11.2 Create and Remove Physical Volumes

Quick Answer: Initialize LVM on a disk or partition with pvcreate /dev/NAME. Inventory with pvs, pvdisplay, and lsblk. Remove an unused PV with pvremove. A PV is only the first LVM layer—next you assign it to a volume group (Section 11.3). On EX200, create PVs only on authorized free devices.

Where PVs sit in the LVM stack

LVM (Logical Volume Manager) builds capacity in layers:

LayerObjectCommon tools
1Physical volume (PV)pvcreate, pvremove, pvs, pvdisplay, pvmove
2Volume group (VG)vgcreate, vgextend, vgreduce, vgs
3Logical volume (LV)lvcreate, lvremove, lvs, lvextend

User-visible filesystems usually sit on LVs (or on plain partitions). Device-mapper exposes LVs under /dev/mapper/vgname-lvname and often /dev/vgname/lvname symlinks.

Official study points include creating and removing physical volumes—you must do this cleanly even when a single task also asks for VG/LV later.

Prerequisites: a usable block device

A PV target is typically:

  1. A partition (preferred for clarity), e.g. /dev/sdb1 with GPT type LVM (8e00 / lvm flag), or
  2. A whole disk (when the task says use the entire disk and nothing else is on it), e.g. /dev/sdc.
lsblk
sudo parted /dev/sdb print
# Ensure you are not targeting the root PV or an active mount
findmnt /dev/sdb1
sudo pvs

If the device still has an old filesystem signature, pvcreate may refuse or warn:

sudo wipefs -a /dev/sdb1    # ONLY when task allows destroying existing FS on that partition
sudo pvcreate /dev/sdb1

Use wipefs only on the spare device the task authorizes. It is a data-destroying command.

Create physical volumes: pvcreate

sudo pvcreate /dev/sdb1
sudo pvcreate /dev/sdb1 /dev/sdc1     # multiple at once
sudo pvcreate --dataalignment 1m /dev/sdb1   # occasional alignment option; defaults usually fine

Success messages mention a new physical volume. Verify immediately:

sudo pvs
sudo pvs -o+pv_all
sudo pvdisplay /dev/sdb1
lsblk -f /dev/sdb1

Reading pvs output

  PV         VG     Fmt  Attr PSize   PFree
  /dev/sdb1         lvm2 ---   20.00g  20.00g
  /dev/sda2  rhel   lvm2 a--  <39.00g  <10.00g
ColumnMeaning
PVDevice path
VGVolume group membership; empty if free
FmtUsually lvm2
PSize / PFreeCapacity and free extents still available to the VG

A free PV (blank VG) is ready for vgcreate or vgextend. A PV already in rhel (or another VG) is not free—do not pvremove it without reducing the VG first.

pvdisplay for detail

sudo pvdisplay
sudo pvdisplay /dev/sdb1

Shows PE size context once in a VG, UUID of the PV, allocatable state, and free PE counts. Useful when pvs is too terse for troubleshooting.

Multiple PVs and exam sizing

Tasks often say: “Create physical volumes on /dev/sdb1 and /dev/sdc1.”

sudo pvcreate /dev/sdb1 /dev/sdc1
sudo pvs

Sizes come from the underlying partition/disk size. You do not pass “2G” to pvcreate—you size the partition first (Section 11.1), then pvcreate consumes that whole device for LVM metadata + allocatable space.

Remove physical volumes: pvremove

sudo pvremove /dev/sdb1

Requirements for a clean remove:

  • PV is not in a VG, or you already ran vgreduce so it left the VG
  • No open LVs depending on remaining PE layout in a way that still needs this PV (after reduce, free PVs are removable)

If the PV is still in a VG:

sudo pvs
# /dev/sdb1 is listed under VG data
sudo vgreduce data /dev/sdb1    # must have enough free PE on other PVs if LVs used space here
sudo pvremove /dev/sdb1

If extents still live on that PV, vgreduce fails until you pvmove extents off or remove/shrink LVs. EX200 tasks that ask you to remove a PV usually provide a free PV or a simple lab layout without full disks of immovable data—read errors carefully.

Force options exist (pvremove -ff) for broken metadata emergencies. Prefer fixing VG membership properly; force flags are last resorts and can leave inconsistent states if misused.

Signatures, filters, and “device is busy”

SymptomApproach
Device /dev/sdb1 excluded by a filterCheck lvm.conf filters (rare on stock exam images); ensure device path is correct
Can't open / busyUnmount filesystems, swapoff, stop using the device
Device has a signatureConfirm task allows wipe; wipefs -a then pvcreate
Wrong sizeYou pvcreate’d a tiny partition—fix partition size, not LVM PE math yet

Also confirm you did not create a PV on an LV by accident (possible but usually wrong for EX200 beginner tasks).

Whole disk vs partition PVs

Partition PV (common teaching pattern):

sudo parted /dev/sdb --script mklabel gpt
sudo parted /dev/sdb --script mkpart primary 1MiB 100%
sudo parted /dev/sdb --script set 1 lvm on
sudo pvcreate /dev/sdb1

Whole-disk PV (when task allows):

sudo pvcreate /dev/sdb

Some admins avoid whole-disk PVs because other OS tools expect a partition table; both appear in real life. On the exam, match the task. If it says “partition,” do not skip to whole-disk PV.

Relationship to /dev/mapper names

After only pvcreate, you typically do not yet have a new /dev/mapper/* node for user data—the mapper devices appear when logical volumes (or other DM targets) are active. pvs still lists /dev/sdb1. Do not look for /dev/mapper/sdb1 as a PV name.

Root systems often already show:

/dev/mapper/rhel-root
/dev/mapper/rhel-swap

Those are LVs on PVs that already exist (often /dev/sda2 or similar). Treat them as sacred unless the exam explicitly extends or modifies that VG.

End-to-end exam scenarios

Scenario A — Single new PV

Task: Create a physical volume on /dev/vdb1.

lsblk /dev/vdb
sudo pvcreate /dev/vdb1
sudo pvs /dev/vdb1

Scenario B — Prepare two free PVs for a future VG

sudo pvcreate /dev/sdb1 /dev/sdc1
sudo pvs
# VG column empty for both

Scenario C — Remove a free PV

Task: Remove the physical volume on /dev/sdd1 (not part of any VG).

sudo pvs
sudo pvremove /dev/sdd1
sudo pvs
# device no longer listed as PV; partition may still exist

Scenario D — Cannot remove because still in VG

sudo pvremove /dev/sdb1
# Error: PV still in use
sudo vgs; sudo pvs
sudo vgreduce myvg /dev/sdb1
sudo pvremove /dev/sdb1

Verification checklist (grade yourself)

  1. pvs shows the device with lvm2 format.
  2. Size matches the partition/disk you intended.
  3. VG column empty if you were only asked to create a PV (or correct VG if already extended—know which task you finished).
  4. lsblk -f may show LVM2_member as FSTYPE on the PV device.
  5. After reboot, pvs still lists the PV (metadata on disk).

Persistence notes

  • PV labels/metadata are written to the device → survive reboot.
  • Removing a PV with pvremove also persists (metadata gone).
  • No /etc/fstab entry is required for the PV itself.
  • Applications do not store files on a bare PV; they use filesystems on LVs or partitions. If the exam task ends at “create PV,” stop and verify with pvs—do not invent mounts.

Common traps

  1. pvcreate /dev/sdb when partitions exist — may destroy partition table depending on usage; be intentional.
  2. pvcreate on the root disk partition that is already a PV — dangerous/redundant.
  3. Forgetting that size is set at partition timepvcreate does not take -L 2G for “make PV 2G” the way lvcreate does.
  4. pvremove while VG still owns the PV — reduce first.
  5. Confusing pvs with vgs/lvs — wrong layer when verifying.
  6. Assuming LVM_member means a mountable filesystem — you still need LV + mkfs + mount for file storage.

Section checkpoint

You should select a free partition or disk, run pvcreate, confirm with pvs/pvdisplay, understand empty vs in-use VG columns, and remove PVs safely with pvremove after vgreduce when needed. That completes the EX200 physical-volume skill and sets up volume group assignment.

Test Your Knowledge

Which command initializes /dev/sdb1 as an LVM physical volume?

A
B
C
D
Test Your Knowledge

In pvs output, what does a blank VG column for /dev/sdc1 usually mean?

A
B
C
D
Test Your Knowledge

You must remove PV /dev/sdb1 that still belongs to volume group appvg. What is the correct order?

A
B
C
D
Test Your Knowledge

Why does pvcreate not accept a size like -L 5G the way lvcreate does?

A
B
C
D