Answer the question
In order to leave comments, you need to log in
How to correctly increase disk size of ubuntu server under virtualbox?
The vdi disk, using virtualbox increased its size to 25G, now in the virtualbox settings I see the new disk size, but in the guest system (ubuntu server 20.04) the size is the same (20 G)
I can’t understand where these 5 gigs have gone, how to add them to the partition ?
findings:
# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 394M 724K 393M 1% /run
/dev/sda1 20G 18G 950M 96% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 394M 0 394M 0% /run/user/0
~# parted
GNU Parted 3.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 21.5GB 21.5GB primary ext4 boot
(parted) resizepart 1
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No? yes
End? [21.5GB]? 24.5G
Error: The location 24.5G is outside of the device /dev/sda.
Answer the question
In order to leave comments, you need to log in
Problem solved - in case anyone else comes across:
how to resize a virtual disk.
1. With the virtual machine running, execute the command :
sh-3.2# VBoxManage modifyhd --resize 26725 /Users/alex/VirtualBox\ VMs/userver\ 2004/Snapshots/{5ef573a7-a19b-4c5b-a48f-5d74132b0f4a}.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
This is because the section has increased, and the file system is not aware of this
, there are two options.
1. boot from liveCD gparted and expand the disk
2. to "live". I do this on remote VPS
https://askubuntu.com/questions/116351/increase-pa...
Well, of course, instead of the swap partition, you need to carry out all the actions with the existing partition
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question