Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Expanding the ubuntu-lv Logical Volume in ubuntu-vg on Ubuntu

Tech 2

LVM (Logical Volume Manager) is a core component in Linux for flexible disk space management. In Ubuntu, LVM is integrated into the default installation, enabling dynamic resizing, creation, or deletion of logical volumes without reformatting physical disks. It also enhances data resilience—spreading data across multiple physical drives reduces risks from single - drive failures, and snapshot capabilities let you backup data before modifications.

To expand the ubuntu - lv logical volume (under ubuntu - vg), follow these steps:

  1. Check LVM Volume Details Use lvdisplay to view current logical volume configurations:

    sudo lvdisplay
    
  2. Extend the Logical Volume The lvextend command resizes the logical volume. The -r flag auto - resizes the filesystem, and -l +100%FREE uses all remaining free space:

    sudo lvextend -r -l +100%FREE /dev/ubuntu - vg/ubuntu - lv
    
  3. Verify the New Size After expansion, confirm the updated size with:

    sudo lvdisplay /dev/ubuntu - vg/ubuntu - lv
    

    Look for the LV Size and LV Name fields to ensure the resize succeeded.

The process duration depends on the volume size and hardware performance. Once complete, /dev/ubuntu - vg/ubuntu - lv will use all available free space.

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.