OpenVZ Forum


Home » General » Support » [SOLVED] HD quota incorrect
[SOLVED] HD quota incorrect [message #34886] Wed, 11 February 2009 06:15 Go to next message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
Hi,

I am running CentOS 5.2 with HyperVM (the most current from their website) with OpenVZ as installed by HyperVM (ovzkernel-PAE.i686 2.6.18-92.1.18.el5.028 reported by yum).

The issue I am having is, in HyperVM the quota I am setting doesn't seem to be getting enforced in the vps. For example, I created a CentOS 5.2 VM with 100G of HD quota. When I run df on the VM, I see:

Filesystem Size Used Avail Use% Mounted on
/dev/simfs 61G 342M 57G 1% /

Similarly, I created a VM with 2TB of HD quota and saw the same output.

Is this something to do with the fact that I am using a 4TB LVM for the VMs HD space? Or something to do with quotas?

I am at a loss as to why it would show 61G instead of the HD I allocated in HyperVM.

Any help is greatly appreciated.

Vadtec

[Updated on: Wed, 11 February 2009 20:35]

Report message to a moderator

Re: HD quota incorrect [message #34893 is a reply to message #34886] Wed, 11 February 2009 10:58 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

first of all we should determine if it is HyperVM or OpenVZ specific problem.

Could you please show from inside the VE
# ls -l /etc/mtab

and also VE's configuration file (/etc/vz/conf/$VEID.conf)
Re: HD quota incorrect [message #34895 is a reply to message #34893] Wed, 11 February 2009 13:04 Go to previous messageGo to next message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
[root@vps2 ~]# ls -l /etc/mtab
-rw-r--r-- 1 root root 171 Feb 10 20:32 /etc/mtab
[root@vps2 ~]# cat /etc/mtab
/dev/simfs / reiserfs rw,usrquota,grpquota 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

[root@vps2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 59G 342M 55G 1% /
[root@vps2 ~]# ls -l /etc/mtab
-rw-r--r-- 1 root root 171 Feb 10 20:32 /etc/mtab
[root@vps2 ~]# cat /etc/mtab
/dev/simfs / reiserfs rw,usrquota,grpquota 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

*NOTE: Some information removed to protect customers, replaced with XXX

[root@XXX conf]# cat 110.conf
# Copyright (C) 2000-2006 SWsoft. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

ONBOOT="no"

# UBC parameters (in form of barrier:limit)
# Primary parameters
AVNUMPROC="40:40"
NUMPROC="999999:999999"
NUMTCPSOCK="7999992:7999992"
NUMOTHERSOCK="7999992:7999992"
VMGUARPAGES="131072:2147483647"
# Secondary parameters
KMEMSIZE="2147483646:2147483646"
TCPSNDBUF="107374592:289400832"
TCPRCVBUF="107374592:289400832"
OTHERSOCKBUF="107374592:289400832"
DGRAMRCVBUF="107374592:289400832"
OOMGUARPAGES="131072:2147483647"
# Auxiliary parameters
LOCKEDPAGES="999999:999999"
SHMPAGES="131072:131072"
PRIVVMPAGES="131072:131072"
NUMFILE="23999976:23999976"
NUMFLOCK="999999:999999"
NUMPTY="500000:500000"
NUMSIGINFO="999999:999999"
DCACHESIZE="2147483646:2147483646"

PHYSPAGES="0:2147483647"
NUMIPTENT="999999:999999"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="104857600:104857600"
DISKINODES="52428800:52428800"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="1000"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="lvm:VolGroup01/110"
OSTEMPLATE="centos-5-i386-afull"
ORIGIN_SAMPLE="vps.basic"
IP_ADDRESS="XXX"
QUOTAUGIDLIMIT="10000"
HOSTNAME="vps2.XXX"
NAMESERVER="XXX XXX"
CPULIMIT="800"
MEMINFO="pages:131072"


That information was taken from my VM. I don't see this as being a HyperVM problem. HyperVM simply configures the VM in this case. It doesn't actually control the VM to the point of saying "You will have a HD of X size today." At least thats my interpretation of how it works. This is my first go with OpenVZ and HyperVM, so I am at a loss as to where the issue may lie. I have checked the documentation for both packages and haven't been able to find anything related to this particular issue. Your help is greatly appreciated.

Vadtec
Re: HD quota incorrect [message #34896 is a reply to message #34895] Wed, 11 February 2009 13:36 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

please try the following

(inside VE)
# rm /etc/mtab
# ln -s   /proc/mounts  /etc/mtab
Re: HD quota incorrect [message #34897 is a reply to message #34896] Wed, 11 February 2009 13:46 Go to previous messageGo to next message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
[root@vps2 ~]# rm /etc/mtab
rm: remove regular file `/etc/mtab'? y
[root@vps2 ~]# ln -s /proc/mounts /etc/mtab
[root@vps2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 59G 342M 55G 1% /
[root@vps2 ~]# ls -la /etc/mtab
lrwxrwxrwx 1 root root 12 Feb 11 04:52 /etc/mtab -> /proc/mounts
[root@vps2 ~]# ls -la /proc/mounts
lr-xr-xr-x 1 root root 11 Feb 11 04:52 /proc/mounts -> self/mounts

That made it worse. Taking what is shown in HyperVM for the resource limits for the VM:

Resource Used Max
Disk 342 MB 100 GB
Inode 20445 52428800
Memory 23 MB 512 MB

Why is the VM showing only 59G when it has been configured for 100G?

Thanks again,

Vadtec
Re: HD quota incorrect [message #34898 is a reply to message #34897] Wed, 11 February 2009 14:05 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Could you please show

- "cat /proc/mounts", "df -h" from the HN and from inside the VE
- "uname -a" from the HN
- what ostemplate did you use for VE?
- vzctl --version
Re: HD quota incorrect [message #34899 is a reply to message #34897] Wed, 11 February 2009 14:07 Go to previous messageGo to next message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
I powered down the VM and changed the hd quota to 10G, and this was the result after power up:

[root@vps2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 10G 342M 9.7G 4% /
[root@vps2 ~]# ls -la /etc/mtab
-rw-r--r-- 1 root root 171 Feb 11 05:11 /etc/mtab
[root@vps2 ~]# ls -la /proc/mounts
lr-xr-xr-x 1 root root 11 Feb 11 05:12 /proc/mounts -> self/mounts

What is showing in HyperVM:

Resource Used Max
Disk 342 MB 10 GB
Inode 20443 5242880
Memory 20 MB 512 MB


So I powered down again and changed the hd quota back to 100G:

[root@vps2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 59G 342M 55G 1% /
[root@vps2 ~]# ls -la /etc/mtab
-rw-r--r-- 1 root root 171 Feb 11 05:15 /etc/mtab
[root@vps2 ~]# ls -la /proc/mounts
lr-xr-xr-x 1 root root 11 Feb 11 05:16 /proc/mounts -> self/mounts

Here is what HyperVM is showing once again:

Resource Used Max
Disk 342 MB 100 GB
Inode 20443 52428800
Memory 20 MB 512 MB

Give than HyperVm was showing 10G and the VM was showing 10G, I do not see this as a HyperVM issue. How does OpenVZ allocate HD space, and does it allocate it all at once?

Thanks,

Vadtec
Re: HD quota incorrect [message #34900 is a reply to message #34898] Wed, 11 February 2009 14:15 Go to previous messageGo to next message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
From inside the VE:

[root@vps2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 59G 486M 55G 1% /
none 4.0G 4.0K 4.0G 1% /dev
[root@vps2 ~]# cat /etc/mtab
/dev/simfs / reiserfs rw,usrquota,grpquota 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /dev tmpfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
[root@vps2 ~]# cat /proc/mounts
/dev/simfs / simfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
none /dev tmpfs rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0


From the HN:

[root@YRH009 ~]# cat /proc/mounts
/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/cciss/c0d0p1 /boot ext2 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/proc /var/named/chroot/proc proc rw 0 0
/dev/root /var/named/chroot/var/run/dbus ext3 rw,data=ordered 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/etc/auto.misc /misc autofs rw,fd=6,pgrp=4418,timeout=300,minproto=5,maxproto=5,indirect 0 0
-hosts /net autofs rw,fd=12,pgrp=4418,timeout=300,minproto=5,maxproto=5,indirec t 0 0
lvm:VolGroup01/130 /vz/root/130 simfs rw 0 0
/proc /vz/root/130/proc proc rw 0 0
/sys /vz/root/130/sys sysfs rw 0 0
none /vz/root/130/dev tmpfs rw 0 0
none /vz/root/130/dev/pts devpts rw 0 0
none /vz/root/130/proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
lvm:VolGroup01/110 /vz/root/110 simfs rw 0 0
/proc /vz/root/110/proc proc rw 0 0
/sys /vz/root/110/sys sysfs rw 0 0
none /vz/root/110/dev/pts devpts rw 0 0
none /vz/root/110/proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
[root@YRH009 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 71G 12G 55G 18% /
/dev/cciss/c0d0p1 122M 39M 77M 34% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm
[root@YRH009 ~]# vgdisplay
--- Volume group ---
VG Name VolGroup01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 3.64 TB
PE Size 4.00 MB
Total PE 953837
Alloc PE / Size 128 / 512.00 MB
Free PE / Size 953709 / 3.64 TB
VG UUID gfK31K-O6fx-v0NG-BBwE-rF1p-PrYj-EdCXmI
[root@YRH009 cache]# vzctl --version
vzctl version 3.0.23

OS template used: centos-5-x86.tar.gz from the OpenVZ web site.

Vadtec

[Updated on: Wed, 11 February 2009 14:16]

Report message to a moderator

Re: HD quota incorrect [message #34902 is a reply to message #34900] Wed, 11 February 2009 15:59 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

this output confused me.

I cannot see /vz as a separate partition at the same moment we see
"lvm:VolGroup01/130 /vz/root/130 simfs rw 0 0". Could you possibly explain how this might happened? How did you configure the HN?

And if /vz is not a separate partition "df -h" shows only 55Gb available so no wonder we obtain the similar result inside VE.
Thank you.
Re: HD quota incorrect [message #34907 is a reply to message #34886] Wed, 11 February 2009 19:53 Go to previous messageGo to next message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
In HyperVM, there is an option that allows me to specify where the VM should be stored on the host machine. I have this set to lvm:VolGroup01, so as I understand it, OpenVZ should be storing the VMs in VolGroup01, not /vz...

Is this something where I should replace VolGroup01 with an ext3 formatted partition and mount it as /vz?

Vadtec
Re: HD quota incorrect [message #34908 is a reply to message #34886] Wed, 11 February 2009 19:55 Go to previous message
Vadtec is currently offline  Vadtec
Messages: 7
Registered: February 2009
Junior Member
Never mind, I found the answer to my question. I was mixing up Xen and OpenVZ when I created the LVM. Xen can use LVM. That makes a little more sense now.

Vadtec
Previous Topic: New Server - Kernel Won't Load
Next Topic: [Answered] Multiple VETH's and only 1 NIC (eth0) .....
Goto Forum:
  


Current Time: Mon Nov 11 11:29:24 GMT 2024

Total time taken to generate the page: 0.03458 seconds