Incorrect size reporting by df -h

  • Thread starter Thread starter julien1486
  • Start date Start date
J

julien1486

Guest
Hello !

I have two server running with proxmox 1.7. On the first I've successfully created an vm (openvz) with 100G of harddisk, df -h command return a Size of 100G. But on the second server I create the same vm (using the same template and the same disk size) and the df -h return a Size of 24G. The webgui correctly display a size of 100G but not the vm.

I don't know the real size of this vm but I really need that df -h display 100G.

I'm using the debian-6.0-standard_6.0-4 template on both servers.

Thanks for your help

Julien
 
Did you allocate the full size when you created the diskfile ?
 
I don't know. I use the webgui to create the virtual machines.
Here is the generated command :

Code:
/usr/bin/pvectl vzcreate 104 --disk 100 --ostemplate local:vztmpl/debian-6.0-standard_6.0-4_i386.tar.gz --rootpasswd *********************/ --hostname *********** --nameserver *********** --nameserver ********* --searchdomain nodomain --onboot no --ipset 192.168.0.103 --swap 512 --mem 512 --cpus 1
vzctl set 104 --vmguarpages 262144:9223372036854775807 --oomguarpages 262144:9223372036854775807 --privvmpages 262144:274644 --lockedpages 131072:131072 --diskspace 104857600:115343360 --diskinodes 20000000:22000000 --hostname *********** --searchdomain nodomain --ipadd 192.168.0.103 --onboot no --nameserver ************** --nameserver ************* --save
Saved parameters for CT 104
VM 104 created

And the output of df -h :

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs             24G  382M   22G   2% /
tmpfs                 512M     0  512M   0% /lib/init/rw
tmpfs                 512M     0  512M   0% /dev/shm
 
I've made a backup of the first virtual machine (which has a correct reported size) using vzdump, I've transfered it to the second server where I restored it via "vzrestore xxx.tar 102". The output of df -h command reports a size of 24G for /.

Is it normal ? :D
 
I've made a backup of the first virtual machine (which has a correct reported size) using vzdump, I've transfered it to the second server where I restored it via "vzrestore xxx.tar 102". The output of df -h command reports a size of 24G for /.

Is it normal ? :D
Hi,
openvz-vms used only the space they need - but not more than allowed. If your VM has 100G assigned and used only 10G, than the vm occopied only 10G on the filesystem.
That's normal and also welcome (you can overcommit your server).

kvm-vms use the full size if you use raw or lvm.

Udo
 
Hi,
openvz-vms used only the space they need - but not more than allowed. If your VM has 100G assigned and used only 10G, than the vm occopied only 10G on the filesystem.
That's normal and also welcome (you can overcommit your server).

kvm-vms use the full size if you use raw or lvm.

Udo

So why my first VM (which is a fresh install, nothing in it) "df -h" 's output is :

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            100G  508M  100G   1% /
tmpfs                 512M     0  512M   0% /lib/init/rw
tmpfs                 512M     0  512M   0% /dev/shm

Where 100G is the size I've specified in the webgui.
The second is a restored backup of this one.
 
Well...

It's ok. When I installed the second server I've installed proxmox on a small partition (~30G). Will format that ;)
Sorry for that.