You are not logged in.

#1 2019-11-11 15:53:21

slv
Member
Registered: 2017-01-17
Posts: 40

VM grown huge while df show different value

Hi guys

I'm using Bunsen distro on Oracle hypervisor. VM disk disk 103GB and growing (that's my fault, nexxt time I will create fixed size disk)

when df output shown:
osboxes@osboxes:/$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            483M     0  483M   0% /dev
tmpfs           100M  3.4M   97M   4% /run
/dev/sda1       217G  3.1G  203G   2% /
tmpfs           499M     0  499M   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           499M     0  499M   0% /sys/fs/cgroup
/dev/sda4       266G   22G  231G   9% /home
/dev/sda2       923M   46M  814M   6% /boot
tmpfs           100M  4.0K  100M   1% /run/user/109
tmpfs           100M   12K  100M   1% /run/user/1000


/dev/sda4 is only 22GB in size, and sda1 3.1GB. so where is rest of occupied space?


how to troubleshot this problem?

with regrads
Slawek

Offline

#2 2019-11-11 16:32:41

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,936
Website

Re: VM grown huge while df show different value

Offline

#3 2019-11-11 19:20:10

slv
Member
Registered: 2017-01-17
Posts: 40

Re: VM grown huge while df show different value

nope .. there is no snapshots.

Any other ideas what I can check?

Offline

#4 2019-11-11 20:01:58

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,553

Re: VM grown huge while df show different value

@slv: Is the "Oracle hypervisor" VirtualBox?

Either way: What kind of disk image format are you using, is it sparse or not, and what kind of file system are you using inside the VM? Can you show us lsblk from inside the VM? Are there more partitions than the ones shown in df output?

I suspect the effect you're seeing is a consequence of the image's sparseness. I do not know how the disk layer in VirtualBox is implemented exactly, so this is a guess: the VM did write once or more than once data to physical regions of the emulated block device of up to 103G. As such, VirtualBox accommodated this by allocating as much space for the image as high as the 'farthest' write. This does not sound terribly smart an implementation if the write to disk regions wasn't contiguous, but unless you can guarantee that no write ever touched the region of 103G from inside the VM, it all depends on VirtualBox's implementation of the feature.

Generally, even with other emulators like qemu (and qcow2 images), one should always assume that the actual space taken up by a sparse image file eventually approaches the maximally possible file size, and that space savings due to small image sizes initially are temporary.


At the end of the river the sundown beams

Offline

#5 2019-11-12 16:37:35

slv
Member
Registered: 2017-01-17
Posts: 40

Re: VM grown huge while df show different value

Hi guys

I observed one strange thing.
My VM crashed yesterda with error complained about lack of free space. I power it off yesterday but my laptop has been working on. Windows report 560MB free space on disk C of my laptop.

Today I started the VM and immediately I got 43GB of free space on disk C.

Any idea what going on? I'm new to VirtualBox so I trying to understand what is going on.
I know that next step will be to create new VM with fixed disk and put Bunsen on it again.

With regards
Slawek

Offline

#6 2019-11-13 08:33:50

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: VM grown huge while df show different value

Been debating posting to this. On the one hand I'm not going to bother tracking down whatever is(likely something you've done)going on with your install. On the other, what follows will in fact solve your problem and in my opinion mucho better than any approach to virtualbox.

In few words, my advice on Virtualbox, if the hardware is capable of virtualization ... don't use it. Use a real hypervisor, specifically Kvm. Open source, well integrated and supported directly in the Linux kernel, can get better performance and someone isn't left relying on Oracle. Are plenty of graphical ways to setup and manage Kvm/VM's and found them to be pretty much self explanatory to use, shrugs.

While think virtualization is definitely really cool. My current hardware isn't capable of it though. sad However if someone wants the real deal, nothing beats bare-metal, to me long been no substitute even though a properly setup real-hypervisor VM is said to be able to get as close as 2% of the same performance as an actual disk install. So why have layers of whatever all this Oracle quasi-hypervisor thingy does, running on top of the kickbuttness of Bunsenlabs gnu/Linux ? Why not a conventional dual/multiboot setup and get the full benefits of using a gnu/Linux operating system ? Ah ... no matter, each their own.

PS, few words eh ? Lmao ... am not labelled the resident babbler for nuttin. tongue

Last edited by BLizgreat! (2019-11-13 08:38:48)

Offline

Board footer

Powered by FluxBB