Hard Disk space issue with openvz container

BigTimer

New Member
Sep 22, 2009
19
0
1
Hello everyone,

Let me quickly say kudos to the PVE team for their consistent good work; its much appreciated.

I created a container (Ubuntu 8.04 LTS amd64) with 50GB of hard disk space (LVM-based), yet this is the output of 'df -h;:

Code:
root@microbank:~# df -h 
Filesystem            Size  Used Avail Use% Mounted on
simfs                 2.0G  1.4G  438M  76% /
tmpfs                 3.9G   32K  3.9G   1% /var/run
tmpfs                 3.9G     0  3.9G   0% /var/lock
tmpfs                 3.9G     0  3.9G   0% /dev/shm
tmpfs                 3.9G   32K  3.9G   1% /var/run
tmpfs                 3.9G     0  3.9G   0% /var/lock
It's reporting a capacity of about 2GB for root - less than 5%of the actual capacity! Where did the rest go?

It's actually a pain because I can't install some software due to 'insufficient space'?

How do I get the container to recognise the actual disk size, please?

Thank you.
 
the config is as follows:

Code:
# PVE default config for 256MB RAM

ONBOOT="no"

# Primary parameters
NUMPROC="1024:1024"
NUMTCPSOCK="9223372036854775807:9223372036854775807"
NUMOTHERSOCK="9223372036854775807:9223372036854775807"
VMGUARPAGES="1441792:9223372036854775807"

# Secondary parameters
KMEMSIZE="9223372036854775807:9223372036854775807"
OOMGUARPAGES="1441792:9223372036854775807"
PRIVVMPAGES="1441792:1454292"
TCPSNDBUF="9223372036854775807:9223372036854775807"
TCPRCVBUF="9223372036854775807:9223372036854775807"
OTHERSOCKBUF="9223372036854775807:9223372036854775807"
DGRAMRCVBUF="9223372036854775807:9223372036854775807"

# Auxiliary parameters
NUMFILE="9223372036854775807:9223372036854775807"
NUMFLOCK="9223372036854775807:9223372036854775807"
NUMPTY="255:255"
NUMSIGINFO="1024:1024"
DCACHESIZE="9223372036854775807:9223372036854775807"
LOCKEDPAGES="1310720:1310720"
SHMPAGES="9223372036854775807:9223372036854775807"
NUMIPTENT="9223372036854775807:9223372036854775807"
PHYSPAGES="0:9223372036854775807"

# Disk quota parameters
DISKSPACE="52428800:57671680"
DISKINODES="10000000:11000000"
QUOTATIME="0"
QUOTAUGIDLIMIT="0"

# CPU fair sheduler parameter
CPUUNITS="1000"
CPUS="1"
VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/var/lib/vz/private/$VEID"
OSTEMPLATE="ubuntu-8.04-standard_8.04-3_amd64"
ORIGIN_SAMPLE="pve.auto"
HOSTNAME="microbank.cmfb.ltd"
NAMESERVER="192.168.0.254"
SEARCHDOMAIN="cmfb.ltd"
NETIF="ifname=eth0,bridge=vmbr0,mac=BA:97:38:BC:E1:A3,host_ifname=veth103.0,host_mac=00:18:51:0C:E9:93"

Now I notice something else: the above conf file indicates that the container uses just 256M of RAM (PVE default config for 256MB RAM) but I specified via the GUI that it should use 5120M.

Thanks for your help.

Best regards.
 
Now I notice something else: the above conf file indicates that the container uses just 256M of RAM (PVE default config for 256MB RAM) but I specified via the GUI that it should use 5120M.

Simply ignore (or remove) that comment - it is wrong.

What is the output of:

# df -h /var/lib/vz
 
hi dietmar,

the output is:

Code:
vbed1:~# df -h /var/lib/vz
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             4.8G  3.9G  684M  86% /

I've gone further:

Code:
vbed1:~# fdisk -l

Disk /dev/sda: 146.1 GB, 146163105792 bytes
255 heads, 63 sectors/track, 17769 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000eea2b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         122      979933+  82  Linux swap / Solaris
/dev/sda2   *         123         754     5076540   83  Linux
/dev/sda3             755       17769   136672987+  8e  Linux LVM

On the host, my root partition is /dev/sda2; all the virtual machines are stored on /dev/sda3.

Thanks.
 
i really don't understand how that happened.

Sorry, but this is no standard installation. You installed that system yourself, so you should know what you have done.
There is simply no space on /dev/sda2 - so from my point of view everything works as expected.

I am not sure, but maybe you want to mount /dev/sda3 on /var/lib/vz (copy the content before you do that)?
 
Hello Dietmar,

I decided to do a re-installation and I used the excellent tutorial at blog.shadypixel.com/how-to-shrink-an-lvm-volume-safely/ to customise the install (I really don't like how pve divvies up the hard disk). Now my setup looks like this:

Code:
vbed:~# lvscan
  ACTIVE            '/dev/pve/swap' [7.00 GB] inherit
  ACTIVE            '/dev/pve/root' [5.98 GB] inherit
  ACTIVE            '/dev/pve/data' [118.12 GB] inherit

Initially my root partition was about 30GB; I don't need that much.

Could you please allow for manual hard disk partitioning during the installation?

Thanks for all your help.

Cheers.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!