I have a windows server inside of which there's an Ubuntu 22.10 server, more space was given to VM of Ubuntu. But inside of Ubuntu, when I connect through SSH, it shows that it's still the same size. So I guess it's because I need to manually add this new space to root partition. How do I do it using terminal? Since I connect through SSH, I don't have access to gui. My disks look like this now:
sda 8:0 0 50G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 2G 0 part /boot└─sda3 8:3 0 48G 0 part └─ubuntu--vg-ubuntu--lv 253:0 0 11.5G 0 lvm /
How do I add more space to sda3? Or it's impossible to do through ssh and should be done through Windows Server somehow?I tried this command but it didn't work:
$ sudo resize2fs /sda3 4Gresize2fs 1.46.5 (30-Dec-2021)open: No such file or directory while opening /sda3
I tried this command, it also didn't work:
$ sudo lvresize --verbose --resizefs -L +2G "/dev/sda3/ubuntu--vg-ubuntu--lv" VG name on command line not found in list of VGs: sda3 Volume group "sda3" not found Cannot process volume group sda3
sudo lvresize --verbose --resizefs -L +2G /dev/sda3"/dev/sda3": Invalid path for Logical Volume. Run `lvresize --help' for more information.