Assign Physical Volumes to Volume Groups

LinuxLinuxBeginner
Practice Now

Introduction

In this challenge, you will learn how to configure local storage by assigning physical volumes to volume groups. This is a fundamental task in the RHCSA exam, as it demonstrates your understanding of managing logical volume management (LVM) on a Linux system.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL linux(("`Linux`")) -.-> linux/BasicSystemCommandsGroup(["`Basic System Commands`"]) linux/BasicSystemCommandsGroup -.-> linux/echo("`Text Display`") subgraph Lab Skills linux/echo -.-> lab-389427{{"`Assign Physical Volumes to Volume Groups`"}} end

Create Physical Volumes and Volume Groups

Tasks

  • Create two new physical volumes using the pvcreate command.
  • Create a new volume group using the vgcreate command, and add the two physical volumes to the volume group.

Requirements

  • Create the physical volumes in the /dev/sdb and /dev/sdc devices.
  • Name the volume group vg_data.
  • Ensure all operations are performed as the labex user.

Example

After completing this step, you should see the following output when running vgs and pvs commands:

  VG     #PV #LV #SN Attr   VSize   VFree
  vg_data   2   0   0 wz--n- <20.00g <20.00g
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sdb  vg_data lvm2 a--  <10.00g <10.00g
  /dev/sdc  vg_data lvm2 a--  <10.00g <10.00g

Summary

In this challenge, you learned how to configure local storage by creating physical volumes and assigning them to a volume group. This is an essential skill for the RHCSA exam, as it demonstrates your understanding of logical volume management (LVM) on a Linux system. By completing this challenge, you have gained practical experience in managing physical volumes and volume groups, which will be useful in your future Linux administration tasks.

Other Linux Tutorials you may like