Resolving "No Space Left on Device" While Extending an LVM Volume in Ubuntu

Resolving "No Space Left on Device" While Extending an LVM Volume in Ubuntu


When you are trying to extend your LVM (Logical Volume Manager) partition but encountered a "No space left on device" error. Your home directory (/home/user) is mounted on /dev/mapper/ubuntu--vg-ubuntu--lv, which is already at 100% usage.

Here’s how you can increase the home directory size by extending the logical volume:

Step 1: Check Available Free Space

Run the following command to check how much free space is available in your LVM volume group:
  1. vgdisplay

Look for the "Free PE / Size" field. If there’s free space, you can extend the volume.


Step 2: Extend the Logical Volume

If free space is available in your volume group, extend your home directory's logical volume by running:
  1. sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

This command assigns all available free space to the volume.


Step 3: Resize the Filesystem

After extending the logical volume, you need to resize the filesystem to use the new space:
For ext4 filesystem (most common):
  1. sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

For XFS filesystem:

  1. sudo xfs_growfs /home/user

Step 4: Verify the Changes

Check if the space has been added successfully:
  1. df -h /home/user

If your volume group is full and there’s no free space left in it, you will need to add a new physical volume (another disk or partition) and extend the volume group.

When volume group is full

  1. unable to run sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv its showing no space left

Solution 1: Check If There’s Unallocated Space on the Disk

  1. lsblk

Look for the main disk (e.g., nvme0n1) and check if there’s any unpartitioned free space. If there is:

  1. Extend the Partition (if using LVM directly on a partition):

    sudo parted /dev/nvme0n1
  2. Type print to see partitions.
    1. If there’s free space, type:


      resizepart 3 100%

      (Replace 3 with the correct partition number for LVM.)

    • Exit parted by typing quit.

  3. Resize the Physical Volume (PV):

    sudo pvresize /dev/nvme0n1p3

    (Replace nvme0n1p3 with the correct partition.)

  4. Try Extending Again:

    sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv # for ext4


    • Related Articles

    • SSD didn’t detected showing I/O device

      Issue: While installing and configuring the disk the SSD didn’t detected showing I/O device error Cause: SSD was not installed properly. Solution: Advise customer: Installing the SSD using the provided four screws to ensure it is properly secured ( ...
    • UBUNTU 23.04 Desktop Installation

      UBUNTU 23.04 Desktop Installation Before you begin, ensure that you have a storage plan and raid configuration (Servers) on your systems. It is recommended that you install Ubuntu on a separate disc to protect your data in the scenario where the OS ...
    • How to Get Mellanox NIC Details on an Ubuntu Server

      Step 1: List All Mellanox Adapters To find all Mellanox network adapters on your system, run: lspci | grep Mellanox Example output: 04:00.0 Ethernet controller: Mellanox Technologies MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0) Step 2: ...
    • Create LVM in Centos/Rocky Linux.

      What is LVM? LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical ...
    • How to Remove and Reinstall NVIDIA Drivers on Ubuntu

      This article provides step by step guide to completely remove existing NVIDIA drivers and reinstall specific version of the NVIDIA driver on the Ubuntu system Prerequisites Administrative (sudo) access to the Ubuntu system. Internet access to ...
    • Popular Articles

    • CP Plus Camera and NVR Configuration

      NVR Configuration The CP Plus Pro Series of NVRs have been meticulously designed for providing you with upgraded performance and higher recording quality in your IP video surveillance solution. The robust processor that has been inculcated in this ...
    • Kerberos Authentication – Overview

      What is Kerberos? Kerberos is a secure authentication method used in our Active Directory (AD) environment (mbuzztech.com). It allows users to: Access multiple systems without re-entering passwords (Single Sign-On – SSO) Log in once Where We Use It ...
    • How to Remove and Reinstall NVIDIA Drivers on Ubuntu

      This article provides step by step guide to completely remove existing NVIDIA drivers and reinstall specific version of the NVIDIA driver on the Ubuntu system Prerequisites Administrative (sudo) access to the Ubuntu system. Internet access to ...
    • Personal Computers and Servers - Classification and Point of Contact

      We can classify the computers that MBUZZ handles based on their form-factor as below: Tower Workstations, Desktops, Gaming PCs and SFF (Small form factor) PCs fall under this category. These are computers people would use on a desk and rarely move. ...
    • M.2 SSD Tier List

      The sequential read and write speeds, which are usually the most advertised number, are not a proper benchmark of real-world performance or the quality of an SSD. This article categorizes and tiers SSDs based on factors like the type of NAND flash, ...