-1

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?

enter image description here

2
  • You'll need to grow the partition inside your Ubuntu server. Run lsblk and look for your device (It might be "sda" or "sdb" or something). Then run: sudo parted /dev/sda --print (replace "sda" with your actual device) to get the partition information on Ubuntu. If it's ext4, then chances are, you just need to run the following command: sudo resize2fs /dev/sda
    – David W
    Dec 13 '20 at 19:32
  • Thank you. I have updated the question with an image. What I need to resize is a logical volume (ubuntu--vg-ubuntu--lv) which resides inside sda3. As shown, sda3 has 29G available while the logical volume is only using 19GB.
    – BMM
    Dec 13 '20 at 20:02
0

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:

lvdisplay

(to identify the MOUNTPOINT), and then:

lvextend –l +100%FREE [MOUNTPOINT]

to extend the LVM partition and

resize2fs [MOUNTPOINT]

to resize the filesystem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.