HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Trouble with first time OpenVZ install - please help (http://www.howtoforge.com/forums/showthread.php?t=26647)

adobe 7th September 2008 04:11

Trouble with first time OpenVZ install - please help
 
Hello,

I recently bought a fairly nice server and I decided to run a small VPS service from it. So, I came across OpenVZ (OS Level Virtualization Tool) and I was very excited about it, so I came to my #1 linux tutorial place, How2Forge site and found this :- http://www.howtoforge.com/installing...z-on-centos5.2

I followed this guide word for word and then finally installed OpenVZ and even created my first VPS on it.

My problem is that, i set the VPS hard disk to be 100GB but when I entered the vps using the command vzctl enter xxx command and typed the shell command df -h it shows the size of my entire hard disk of my host server (instead of the 10gb disk limit I set).

I remember, when I was creating a VPS, it kept erroring, so i turned off a config to disable something about dynamic resource allocation what not. Could it be that?

Was I meant to create a separate partition on my host server, i.e. /vz/ in ext3 format? If i don't do this, that dynamic hard disk feature wont work?

I'm fairly new to both linux and openvz, can someone help this newbie please. Thanks in advance for your help.

falko 7th September 2008 17:23

Quote:

Originally Posted by adobe (Post 143999)
I remember, when I was creating a VPS, it kept erroring, so i turned off a config to disable something about dynamic resource allocation what not. Could it be that?

Do you remember the exact error messages? What did you do then?

Quote:

Originally Posted by adobe (Post 143999)
Was I meant to create a separate partition on my host server, i.e. /vz/ in ext3 format? If i don't do this, that dynamic hard disk feature wont work?

No, you don't need a separate partition.

You can try to change the hard disk size in the VM's configuration file in /etc/vz/conf/.

adobe 8th September 2008 03:27

I am sorry, I can't remember the exact error message now. You know a "private" area is made when a new container is created? Before, it was complaining something about not being able to create that private area, when ever i entered this command:

vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic

But, after i changed a config of OpenVZ it self, it worked fine. And I remember correctly, it was something about disabling dynamic resource allocation. Now, i can't even find that config file or the setting it self :(
________
health shop

falko 8th September 2008 12:06

Quote:

Originally Posted by adobe (Post 144093)

vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic

I hope you used unique IDs when you ran that command?

adobe 8th September 2008 17:14

Yes, I did. The IP I was going to use on the VPS ended in 109, So I used the VEID as 109.

Besides, it's the one and only VPS on my entire host server. I made sure no other VE is running by typing:

vzlist -a

and the list was empty. Then i went onto create the VPS with the VEID 109.
________
GSX series
________
grape ape marijuana strain

adobe 8th September 2008 21:51

Okay, after much searching, I have finally found the EXACT error message:

# vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic
Creating VE private area (debian-4.0-i386-minimal)
vzquota : (error) Quota on syscall for 109: File exists
vzquota on failed [3]
vzquota : (error) Quota is not running for id 109
Performing postcreate actions
VE private area was created

Though it says the vps is created, it actually isn't created. I confirmed it by doing this:

# vzctl start 109
Starting VE ...
vzquota : (error) Quota on syscall for 109: File exists
vzquota on failed [3]

and

# vzlist -a
VEID NPROC STATUS IP_ADDR HOSTNAME
109 - stopped - -

So, I was searching the OpenVZ forum and came across the following solution:

Quote:

Edit the file /etz/vz/vz.conf and set DISK_QUOTA=no
After I did that, I was able to create and run VPS servers, however, I could not control the disk space because the disk_quota is turned off. If i turn it on, I can no longer create VPS.

Host Server's Kernel : Linux server.domain.com 2.6.18-92.1.1.el5.028stab057.2 #1 SMP Mon Jul 21 17:08:31 MSD 2008 x86_64 x86_64 x86_64 GNU/Linux

Host Server's OS : CentOS 5.2 Stable (64-Bit Version)

Please advice...

adobe 8th September 2008 22:06

Also, I did some searching and I came across the fact that, "Linux Quota" might be turned on the root / partition of the server, which conflicts with the OpenVZ. So, I found this article on how to turn off linux quota for CentOS here :- http://www.centos.org/docs/5/html/Gl...taaccount.html

Will this help me?

If it will, will it affect my host system? I already have a DirectAdmin control panel running on the host machine and various other stuff and I don't want to ruin them.
________
Honda FES125 Pantheon

adobe 8th September 2008 23:42

Okay, I have fixed the problem by turning off quota after getting confirmation from my host that turning off quota will not hurt. This is how I fixed it:

First I worked out where is what mounted by ...

# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,usrquota,grpquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

Then I turned off quota like this ...

# quotaoff /dev/mapper/VolGroup00-LogVol00

And when I created a VPS, it worked without any errors like before ...

# vzctl create 109 --ostemplate debian-4.0-i386-minimal --config vps.basic
Creating VE private area (debian-4.0-i386-minimal)
Performing postcreate actions
VE private area was created

And finally, VPS Quota is working, check this out ...

[root@server ~]# vzctl set 109 --diskspace 100G:100G --save
Saved parameters for VE 109
[root@server ~]# vzctl enter 109
entered into VE 109
vps1:/# cd $HOME
vps1:~# df -h
Filesystem Size Used Avail Use% Mounted on
simfs 100G 151M 100G 1% /
tmpfs 3.9G 0 3.9G 0% /lib/init/rw
tmpfs 3.9G 0 3.9G 0% /dev/shm
earthbound-ro:~#

Posting the solution here to help anyone else who runs into similar trouble as I did.

abdi 19th July 2013 14:41

This is very helpful, I landed in the same situation and disabling quotas on '/' partition solved the problem too.


All times are GMT +2. The time now is 01:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.