Extend Existing Logical Volumes

LinuxLinuxBeginner
Practice Now

Introduction

In this challenge, you will learn how to extend an existing logical volume on a Linux system. This is a common task in system administration, as storage requirements often grow over time, and you need to be able to expand your file systems to accommodate the increased demand.


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-389455{{"`Extend Existing Logical Volumes`"}} end

Extend an Existing Logical Volume

In this step, you will extend an existing logical volume on your Linux system.

Tasks

  • Task 1: Create a new physical volume on an additional storage device.
  • Task 2: Add the new physical volume to an existing volume group.
  • Task 3: Extend the existing logical volume to use the additional space provided by the new physical volume.

Requirements

  • You must use the /dev/sdb device as the additional storage device.
  • The new logical volume must be named lv_data and must be located in the vg_data volume group.
  • The extended logical volume must have a total size of at least 4 GiB.

Example

After extending the logical volume, the output of lvdisplay /dev/vg_data/lv_data should show the new, larger size of the logical volume.

Summary

In this challenge, you learned how to extend an existing logical volume on a Linux system. You created a new physical volume, added it to an existing volume group, and then extended the logical volume to use the additional space. This is an important skill for system administrators, as it allows you to grow your file systems as your storage requirements change over time.

Other Linux Tutorials you may like