Extend an existing LVM on Ubuntu 24.04.3 LTS — step by step run-book
Here are updated instructions for adding a new disk into an existing Logical Volume Management (LVM) setup on Ubuntu 24.04.3 LTS. The goal…
Extend an existing LVM on Ubuntu 24.04.3 LTS — step by step run-book
Here are updated instructions for adding a new disk into an existing Logical Volume Management (LVM) setup on Ubuntu 24.04.3 LTS. The goal is to integrate the new disk into your LVM volume group and then extend your logical volume and file system accordingly. You can use this as a ready-to-run sequence, assuming you have already attached a new physical disk to the system.

local

local

local
Pre-requisites
- A new disk has been added to your instance (for example via VM/Hypervisor settings or physical installation) and is visible to the OS.
- You already have an existing LVM setup (a volume group and logical volume) that you want to extend.
- You have root / sudo privileges.
Configuration steps
1. Identify the existing LVM physical volumes and volume group
Run:
sudo pvs
sudo vgdisplay
This will show your current PVs, VG name, free space, etc. References like this are standard in Ubuntu’s LVM documentation. documentation.ubuntu.com+2server-world.info+2 Example output might show:
PV VG Fmt Attr PSize PFree
/dev/sda3 ubuntu-vg lvm2 a-- 8.25g 0
/dev/sdb ubuntu-vg lvm2 a-- 50.00g 0
2. Identify your logical volume path
Run:
sudo lvdisplay
Look for the “LV Path” — e.g. /dev/ubuntu-vg/ubuntu-lv. You’ll need this for the resize step.
3. Locate the new disk device
List all disks and find the new one:
sudo fdisk -l | grep '^Disk /dev/'
Alternatively:
lsblk
You’ll spot a device name such as /dev/vdc, /dev/sdc, or similar, with the size you expect.
4. Initialise the new disk as a physical volume
Assuming your new disk is /dev/vdc:
sudo pvcreate /dev/vdc
Output should confirm: Physical volume "/dev/vdc" successfully created.
This aligns with standard procedure. Ask Ubuntu+1
5. Extend your volume group to include the new PV
sudo vgextend ubuntu-vg /dev/vdc
Replace ubuntu-vg with your actual VG name. After successful execution you should see free space in the VG.
6. Extend the logical volume to consume the free space
Assuming your LV path is /dev/ubuntu-vg/ubuntu-lv, run:
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
This extends the LV to use all free space in the VG. The approach is documented in Ubuntu’s LVM guide. documentation.ubuntu.com+1
7. Resize the filesystem to match the new LV size
If you’re using ext4 on the LV and it is mounted, run:
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
For XFS, you’d use xfs_growfs instead (mounted mount-point required).
This step ensures your filesystem actually sees the added space.
8. Verify the expanded space
Run:
df -h
You should see the size of the logical volume increased accordingly and your root (or relevant mount) reflecting the new space.
Notes & tips
- You do not usually need to reboot; the operations can be done live if the filesystem supports online resizing.
- If you had partitioned the disk (instead of using full-disk), you’d follow similar steps but first create a partition with type “Linux LVM” (code 8e) then
pvcreateon that partition. Ubuntu’s official docs cover that. documentation.ubuntu.com - Always have backups or snapshots before manipulating volumes. Mistakes in LVM can lead to data loss.
- If the new disk doesn’t show, you may need to re-scan the block device (for example in VMs) or ensure it’s visible in the hypervisor.
- If your filesystem is not ext4 or uses other nuances (like encryption, RAID, etc.), adjust commands accordingly.
메타데이터
- post_id
- ef0e818ff8af
- slug
- extend-an-existing-lvm-on-ubuntu-24-04-3-lts-step-by-step-run-book-ef0e818ff8af
- url
- https://levelup.gitconnected.com/extend-an-existing-lvm-on-ubuntu-24-04-3-lts-step-by-step-run-book-ef0e818ff8af
- canonical_url
- https://levelup.gitconnected.com/extend-an-existing-lvm-on-ubuntu-24-04-3-lts-step-by-step-run-book-ef0e818ff8af
- author_url
- https://medium.com/@msuddin
- status
- ok
- fetched_at
- 2026-07-30 10:53:43