I've created a Virtual Machine in Synology Disk Station Manager (an ubuntu server) with a specific amount of storage space in a virtual disk, but I have depleted it. Went to Synology Disk Station / Virtual Machine Manager again and expanded the virtual disk; however, the space is not recognized inside Ubuntu Server. How can I fix this?
I have managed to find a solution. First I booted the system using GParted Live ISO and used the "VERIFY" command on the partition that was showing an exclamation mark, which was the right one. Then booted into the virtual machine and, in the command line, expanded the LVM and filesystem using the commands:
(to identify the MOUNTPOINT), and then:
lvextend –l +100%FREE [MOUNTPOINT]
to extend the LVM partition and
to resize the filesystem.
I search a lot and ended up here however I found out that there is a more simple way that worked for me without the need to boot another image . After you resize your VM storage from synology interface, you should be able to see the free space. You can take advantage of it using normal tools like fdisk and create a new partition. If you want to grow your space without booting a different image you will be limited to last partition, in your case sda3. In order to do this, start your VM log into it and install growpart that is part of cloud-utills
sudo apt-get install -y cloud-utils
resize partition -> you can grow only the last partition from
lsblk in my case was sda1
sudo growpart /dev/sda 1 1 is actual partition number ( ex sda1 )
resize your volume in my case I had ext4
sudo resize2fs /dev/sda1
You have a logical volume so that can span on multiple partitions so you can try ether to create a new partition then extend logical volume on it or just grow the exited one as I suggested. Here is more info on logical volumes. https://www.golinuxhub.com/2014/03/how-to-extendresize-lvm-and-volume