| 
		
			| Re::  Inode Limits not setting correctly [message #46555] | Mon, 28 May 2012 20:15  |  
			|  |  
	| 29.05.2012 0:12 пользователь "Mark Johanson" <mjohanson@a2hosting.com> написал:
 >
 > I have been trying to get diskinode limits to set at specific levels.
 > Namely a 600k:700k with a 1 day grace period. If I manually run the
 > commands:
 >
 > vzctl set 127 --diskinodes 600000:700000 --save
 > vzctl set 127 --quotatime 86400 --save
 >
 > I get the desired results for a already running VPS. However newly
 > created VPS's are not keeping the settings and I am not sure what is
 > assigning the arbitrary numbers it gets. I edited the vz.conf file (as
 > well as the .sample file) to add the limits as:
 >
 > > ## Disk quota parameters
 > > DISKSPACE="50G:50G"
 > > DISKINODES="600000:700000"
 > > QUOTATIME="86400"
 > > DISK_QUOTA=yes
 >
 > When the VPS builds initially it has the limits set:
 >
 > # Disk quota parameters (in form of softlimit:hardlimit)
 > DISKSPACE="50G:50G" (even tried switching this number to the full number
 instead)
 > DISKINODES="600000:700000"
 > QUOTATIME="86400"
 >
 > However after it completes the build process and restarts itself it has
 some arbitrary number in for the DISKINODES that I am uncertain where its
 being pulled from:
 >
 > # Disk quota parameters (in form of softlimit:hardlimit)
 > DISKSPACE="5242880:5242880"
 > DISKINODES="2621440:2621440"
 > QUOTATIME="86400"
 >
 > Any suggestions on where to look to make the inode limit work as it
 should?
 
 I am kinda lost here... Can you please give us the exact sequence of
 commands that you use, tothether with their output?
 
 Kir Kolyshkin
 
   |  
	|  |  | 
	| 
		
			| Re: Re::  Inode Limits not setting correctly [message #46556 is a reply to message #46555] | Mon, 28 May 2012 20:34   |  
			| 
				
				
					|  Mark Johanson Messages: 10
 Registered: May 2011
 | Junior Member |  |  |  
	| On Tue, 2012-05-29 at 00:15 +0400, Kir Kolyshkin wrote: > I am kinda lost here... Can you please give us the exact sequence of
 > commands that you use, tothether with their output?
 When ta new VPS is building if I run:
 
 [root]# cat 101.conf
 
 I get the following output:
 
 #  Copyright (C) 2000-2011, Parallels, Inc. 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="yes"
 # UBC parameters (in form of barrier:limit)
 KMEMSIZE="14372700:14790164"
 LOCKEDPAGES="2048:2048"
 PRIVVMPAGES="65536:69632"
 SHMPAGES="21504:21504"
 NUMPROC="240:240"
 PHYSPAGES="0:unlimited"
 VMGUARPAGES="33792:unlimited"
 OOMGUARPAGES="26112:unlimited"
 NUMTCPSOCK="360:360"
 NUMFLOCK="188:206"
 NUMPTY="100:100"
 NUMSIGINFO="256:256"
 TCPSNDBUF="1720320:2703360"
 TCPRCVBUF="1720320:2703360"
 OTHERSOCKBUF="1126080:2097152"
 DGRAMRCVBUF="262144:262144"
 NUMOTHERSOCK="360:360"
 DCACHESIZE="3409920:3624960"
 NUMFILE="9312:9312"
 AVNUMPROC="1000:1000"
 NUMIPTENT="1000:1000"
 
 # Disk quota parameters (in form of softlimit:hardlimit)
 DISKSPACE="50G:50G"
 DISKINODES="600000:700000"
 QUOTATIME="86400"
 
 # CPU fair scheduler parameter
 CPUUNITS="1000"
 VE_ROOT="/vz/root/$VEID"
 VE_PRIVATE="/vz/private/$VEID"
 OSTEMPLATE="centos-5.0-x86"
 ORIGIN_SAMPLE="basic"
 IP_ADDRESS=""
 HOSTNAME="server.example.com"
 NAMESERVER="
 MEMINFO="pages:131072"
 CPULIMIT="400"
 CPUS="4"
 SWAPPAGES="0"
 
 
 When it completes the build of the VPS, that same exact command results
 in the following:
 
 
 [root]# cat 101.conf
 
 #  Copyright (C) 2000-2011, Parallels, Inc. 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="yes"
 # UBC parameters (in form of barrier:limit)
 KMEMSIZE="2147483646"
 LOCKEDPAGES="999999"
 PRIVVMPAGES="131072"
 SHMPAGES="65536"
 NUMPROC="999999"
 PHYSPAGES="0:2147483647"
 VMGUARPAGES="65536:2147483647"
 OOMGUARPAGES="65536:2147483647"
 NUMTCPSOCK="7999992"
 NUMFLOCK="999999"
 NUMPTY="500000"
 NUMSIGINFO="999999"
 TCPSNDBUF="214748160:396774400"
 TCPRCVBUF="214748160:396774400"
 OTHERSOCKBUF="214748160:396774400"
 DGRAMRCVBUF="214748160:396774400"
 NUMOTHERSOCK="7999992"
 DCACHESIZE="2147483646"
 NUMFILE="23999976"
 AVNUMPROC="1000:1000"
 NUMIPTENT="999999"
 
 # Disk quota parameters (in form of softlimit:hardlimit)
 DISKSPACE="10485760:10485760"
 DISKINODES="5242880:5242880"
 QUOTATIME="86400"
 
 # CPU fair scheduler parameter
 CPUUNITS="1000"
 VE_ROOT="/vz/root/$VEID"
 VE_PRIVATE="/vz/private/$VEID"
 OSTEMPLATE="centos-5.0-x86"
 ORIGIN_SAMPLE="basic"
 IP_ADDRESS=""
 HOSTNAME="server.example.com"
 NAMESERVER=""
 MEMINFO="pages:131072"
 CPULIMIT="400"
 CPUS="4"
 SWAPPAGES="0"
 
 As you can see the diskinodes are not set to the 600k:700k limits. If I
 actually run the set command manually:
 
 [root]# vzctl set 101 --diskinodes 600000:700000 --save
 CT configuration saved to /etc/vz/conf/101.conf
 [root]# vzctl set 101 --quotatime 86400 --save
 CT configuration saved to /etc/vz/conf/101.conf
 
 I end up with:
 
 # Disk quota parameters (in form of softlimit:hardlimit)
 DISKSPACE="10485760:10485760"
 DISKINODES="600000:700000"
 QUOTATIME="86400"
 
 Set exactly as I need them. If I reboot (or even rebuild) the vm, the
 numbers stay exactly as I set them when I manually run the vzctl set
 with the limits I want. But a newly created vm again ends up with some
 arbitrary number for the diskinodes.
 |  
	|  |  | 
	|  |