Sample Header Ad - 728x90

Unable to extend LV file system in Ubuntu Server

2 votes
2 answers
1882 views
I run a bare metal Ubuntu server with several VMs running in a KVM environment. I want to increase the size of one VM from 50GB to 100GB. nextcloudph-lv I ran the following command to increase the nextcloudph-lv VM from 50GB to 100GB:
lvextend -L+50G /dev/ubuntu-vg/nextcloudph-lv
The VM size increased as expected. nextcloudph after increase I then attempted to extend the LV file system using the following command:
resize2fs  /dev/ubuntu-vg/nextcloudph-lv
The output I received is: Bad magic number error message Running the lsblk command results in: lsblk And /dev/mapper contains: dev mapper list This looks like a relatively simple process so I'm not sure where I've gone wrong. This is the first time I'm trying to extend an LV and I'm stuck... Thanks in advance! EDIT: As suggested by A. Darwin, I ran the command "df -hT" which produced the following output: df -hT I can see the host VM "ubuntu--lv" with an ext4 file system but there is no reference to "nextcloudph--lv" or sda3 where all the VMs are located. I'm not sure if it makes a difference but when I set up the VMs I first allocated the space using the "lvcreate -L ##G -n lv###### ubuntu-vg" command and then pointed Virtual Machine Manager to that storage pool when building the VM. EDIT 2 Running "df hT" from within the nextcloudph-lv VM produces the following output: nextcloudph df -hT It's strange because there is a reference to a 48GB ext4 drive but it's located at "/dev/mapper/ubuntu--vg-ubuntu--lv". EDIT 3 As requested by Vojtech Trefny, attached is the output from the command "lsblk -f" lsblk -f For clarity, the 84% used refers only to the ubuntu--lv VM. There is still plenty of room left on the SSDs.
Asked by kvmhali (29 rep)
Jul 28, 2021, 06:18 PM
Last activity: Aug 5, 2025, 06:03 AM