virtual storage

Asked by Wojciech Guzinski

In virtual BoxI have assigned for ubuntu 20 GB virtual storage (D:\UbuntuVirtual\ubuntu18.04.vdi)
How to enlarge virtual storage safety?

BTW: in fact I have ubuntu 19.10:
wojtek@wojtek-VirtualBox:~/C/d_wgs$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
I'm confused...

Wojtek

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
Manfred Hampl (m-hampl) said :
#2

For the naming of the .vdi file:

I assume that you originally created a VM named "Ubuntu 18.04". Virtualbox suggests naming the related virtual disk "Ubuntu18.04.vdi". If you later do an in-place upgrade of Ubuntu (e.g. to 19.04), then these names will not change, creating an inconsistency between the VM name (and the disk name) and the contents.

Revision history for this message
Wojciech Guzinski (wojtekg) said :
#3

This is answer for my second question (thanks), the firs one (how to enlarge storage) is still actual.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

For the first part of your question actionparsnip has already provided a link in comment #1.

What is the problem with your system?
Are you running out of space with the current 20 GB?

what is the output of the commands

uname -a
lsb_release -crid
df -h | grep -v snap

Revision history for this message
Wojciech Guzinski (wojtekg) said :
#5

Actually I have no problems, but every internal update consumes some space.
Last ubuntu base update increased used space by 3% and I anticipate future problems.
I have 2TB disk so I have plenty space I can dedicate for virtual machine, actually 20GB is just 1% of 2TB.
Is there utility cleaning /dev/sda1 ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

What is the output of the commands

uname -a
df -h | grep -v snap

Revision history for this message
Wojciech Guzinski (wojtekg) said :
#7

wojtek@wojtek-VirtualBox:~/C/d_wgs$ uname -a
Linux wojtek-VirtualBox 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
wojtek@wojtek-VirtualBox:~/C/d_wgs$ df -h | grep -v snap
Filesystem Size Used Avail Use% Mounted on
udev 12G 0 12G 0% /dev
tmpfs 2.4G 2.8M 2.4G 1% /run
/dev/sda1 20G 12G 6.9G 63% /
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 12G 0 12G 0% /sys/fs/cgroup
SCC 1.9T 1.1T 771G 59% /media/sf_SCC
tmpfs 2.4G 40K 2.4G 1% /run/user/1000
/dev/sr0 57M 57M 0 100% /media/wojtek/VBox_GAs_6.1.2
/dev/sdb1 466G 81G 386G 18% /media/wojtek/Seagate Slim Drive2

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 12G 6.9G 63% /

You still have more than 6 GB free on the main file system in your Ubuntu VM.
Eventually you can free up some more space by deleting obsolete files, e.g. with the commands

sudo apt --purge autoremove
sudo apt autoclean

If you really want to allocate more space to it, then you have to follow the procedure in the link that actionparsnip gave in hist first comment.

Revision history for this message
Wojciech Guzinski (wojtekg) said :
#9

It was good 1 and 1/2 year.
I enlarge the disk size to 40 GB using Virtual Media Manager
Virtual Size: 41.93 GB
Actual Size: 18.85
I expected to see more or less 35%, however actually I see:
/dev/sda1 20090472 15993444 3056700 84% /
What is wrong ?
Wojtek

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Manfred Hampl
Sent: Tuesday, February 18, 2020 12:03 PM
To: <email address hidden>
Subject: Re: [Question #688806]: virtual storage

Your question #688806 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/688806

    Status: Open => Answered

Manfred Hampl proposed the following answer:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 12G 6.9G 63% /

You still have more than 6 GB free on the main file system in your Ubuntu VM.
Eventually you can free up some more space by deleting obsolete files, e.g. with the commands

sudo apt --purge autoremove
sudo apt autoclean

If you really want to allocate more space to it, then you have to follow the procedure in the link that actionparsnip gave in hist first comment.

--
If this answers your question, please go to the following page to let us know that it is solved:
https://answers.launchpad.net/ubuntu/+question/688806/+confirm?answer_id=7

If you still need help, you can reply to this email or go to the following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/688806

You received this question notification because you asked the question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

If you reboot then run:

sudo fdisk -l

What is the output?

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

I enlarge the disk size to 40 GB using Virtual Media Manager
Virtual Size: 41.93 GB
Actual Size: 18.85

I assume that you only enlarged the virtual disk, but you did not expand the file system on it (That can be done e.g. by gparted.)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#12

After the reboot, unmount the file system after stopping any services that access it. Then you can use fdisk to delete the partition and make a new partition at the larger size. Write the changes to the disk then fsck the file system and you can then resize the file system with resize2fs to make the file system the new size

Revision history for this message
Wojciech Guzinski (wojtekg) said :
#13

Once again back to the old problem:
Is the possibility to expand virtual disk in virtual machine? or make the clone with larger virtual storage?
It is a critical problem for me, 96% is used, no update can be performed, I have planty free space in my HD.
Please help!

Wojtek

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

You have to distinguish between the site of the container file (*.vdi) and the partitions inside (/dev/sda1) and the file system on the partition. After increasing the size of the container you also have to enlarge the partition and then you have to modify the file system on the partition to use all space.
see also https://help.ubuntu.com/stable/ubuntu-help/disk-resize.html.en

What is the output of the commands

uname -a
lsb_release -crid
df -h /dev/sd*
sudo fdisk -l /dev/sd*

Can you help with this problem?

Provide an answer of your own, or ask Wojciech Guzinski for more information if necessary.

To post a message you must log in.