📖
Isu's Wiki
  • Welcome to Isu's Wiki
  • Linux
    • SSH Automatic Login
    • Nginx HTTPS
    • Nginx Login Page
    • OpenVPN Server
    • PPTP Client Settings
    • LVM Allocation
    • Partition and Mount
    • Vagrant and VirtualBox
    • Bind9 SRV Record
    • Git Two Remote
    • ESXi Nvidia - 525.89.02
    • Install Qemu
    • Recover network (no netplan, iproute2)
  • Kubernetes
    • Kubernetes Reset
    • x509 Certificate Renewal
  • LaTeX
    • Code Snippet with Box in LaTeX
  • Go
    • [gRPC] Generate .pb.go from .proto
  • eBPF
    • [Kprobe] Get Argument Values
    • [Cilium] TroubleShooting
    • [Python] Install BCC
  • MicroStack
    • [Microstack] Add Image
    • [Microstack] Quota Manage
    • [Microstack] Security Group
    • [Microstack] Overcommit Resources
  • CentOS
    • Change Interface Name
    • Install Vagrant with vagrant-libvirt
  • OpenStack
    • [Nova] noVNC not working
    • [Basic] OpenStack Installation
    • [Magnum] TroubleShooting
Powered by GitBook
On this page
  • Check Disk
  • Increase LVM
  1. Linux

LVM Allocation

Allocate more disk space to LVM.

Sometime you have enough disk space, however the LVM root partition does not have enough disk space:

Check Disk

sudo lshw -class disk
  *-namespace
       description: NVMe namespace
       physical id: 1
       logical name: /dev/nvme0n1
       size: 931GiB (1TB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: guid=fc1d5b22-6f7c-4295-9c83-09f88baf1f3f logicalsectorsize=512 sectorsize=512

We have a 1TB NVMe disk, however the LVM partition shows like below:

df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                                32G     0   32G   0% /dev
tmpfs                              6.3G  2.0M  6.3G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   29G   65G  31% /
tmpfs                               32G   12K   32G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                               32G     0   32G   0% /sys/fs/cgroup
...

Increase LVM

As we can see, the /dev/mapper/ubuntu--vg-ubuntu--lv has only 98G allocated. You can increase the size of lvm by 5GB using:

sudo lvextend --resizefs -L +5G ubuntu-vg/ubuntu-lv

Or you can even allocate 100% of the free disk using:

sudo lvextend --resizefs -l +100%FREE ubuntu-vg/ubuntu-lv
PreviousPPTP Client SettingsNextPartition and Mount

Last updated 2 years ago