I want to extend the size of a volume

Ubuntu Version:
Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-143-generic x86_64)

Desktop Environment (if applicable):

n/a

Problem Description:
I don’t understand the partition/volume management tools.

I know that the physical drive is ~ 1TB. However, I’ve managed to configure it as 98GB. I’d like to be able to use the full extent of the drive.

Relevant System Information:

This is a MacMini that is now running Ubuntu server. It has an internal 1TB SSD. It has a 2TB external drive attached that I plan to use for backups.

Screenshots or Error Messages:

macadmin@db01:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              782M  1.5M  780M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   41G   53G  44% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  253M  1.6G  14% /boot
/dev/sda1                          1.1G  6.1M  1.1G   1% /boot/efi
tmpfs                              782M  4.0K  782M   1% /run/user/1000
macadmin@db01:~$ sudo lvs
  LV           VG        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  backupVolume sdc_vg    -wi-a-----   <1.82t
  ubuntu-lv    ubuntu-vg -wi-ao---- <928.46g
macadmin@db01:~$ sudo vgs
  VG        #PV #LV #SN Attr   VSize    VFree
  sdc_vg      1   1   0 wz--n-   <1.82t    0
  ubuntu-vg   1   1   0 wz--n- <928.46g    0
macadmin@db01:~$ sudo fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: APPLE HDD HTS541
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2D6E48F1-9ACB-424B-AF9E-616CB33821AA

Device       Start        End    Sectors   Size Type
/dev/sda1     2048    2203647    2201600     1G EFI System
/dev/sda2  2203648    6397951    4194304     2G Linux filesystem
/dev/sda3  6397952 1953521663 1947123712 928.5G Linux filesystem


Disk /dev/sdb: 113 GiB, 121332826112 bytes, 236978176 sectors
Disk model: APPLE SSD SM0128
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B4AA37BD-FB3D-4B8B-9D1B-E123AD61915D

Device      Start       End   Sectors   Size Type
/dev/sdb1      40    409639    409600   200M EFI System
/dev/sdb2  409640 236978135 236568496 112.8G Apple APFS


Disk /dev/sdc: 1.82 TiB, 2000398933504 bytes, 3907029167 sectors
Disk model: Expansion HDD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x013f43c6

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdc1        2048 3907028991 3907026944  1.8T 8e Linux LVM


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 928.46 GiB, 996923146240 bytes, 1947115520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/sdc_vg-backupVolume: 1.82 TiB, 2000393601024 bytes, 3907018752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

What I’ve Tried:

I had thought that I could solve this by using lvextend.

macadmin@db01:~$ sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
  New size (237685 extents) matches existing size (237685 extents).

However that does not seem to have changed the space available mounted on /.


To make a volume group (VG) larger, you need to have an existing physical volume (PV) outside the VG first. Then use the vgextend command to add that PV to your VG.

You make a new PV by starting with a partition. Then use pvcreate command to convert the partition into a PV. Or, gparted can format a partition as LVM which also converts it to be a PV.

Aha! This is where my misunderstanding began. I thought “physical volume” referred to the HDD or SSD.

thanks for the pointer. I’ve found some resources, so I’ll start reading.

This topic was automatically closed after 30 days. New replies are no longer allowed.