Category Archives: Unix general

Everything that has to do with Unix and Linux systems

Installing OpenVZ on a 64Bit OS

Until i get around finishing the 64bit installer here is a quick way to install OpenVZ on a 64bit OS.

Follow the next set of commands and you should be done in a few minutes:


# cd /etc/yum.repos.d
# wget http://download.openvz.org/openvz.repo
# rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
# yum install ovzkernel.x86_64
# mv /etc/sysctl.conf /etc/sysctl.conf.bk
# cd /etc/
# wget http://repo.hostechs.com/ovz/sysctl.conf.tar
# tar -xvf sysctl.conf.tar
# echo options ip_conntrack ip_conntrack_enable_ve0=1 >> /etc/modprobe.conf
# yum install vzctl.x86_64 vzquota.x86_64

Press “y” when you are being asked if you want to install a package.

After vzctl and vzquota have been installed reboot the server: shutdown -r now .

Login to the server again after it booted up and do the following:


# cd /root/
# wget http://repo.hostechs.com/ovz/setx86_64-0.5.tar.gz
# tar -zxvf setx86_64-0.5.tar.gz
# sh setx86_64

When the install finishes you are all done.

If you want to check the x86_64 templates available just run vzpkgls | grep x86_64 and the list will be displayed with the templates.

If you want to create a cache template run the following for Centos 5 for example: vzpkgcache -f centos-5-x86_64-minimal. This may take a bit but when it’s done you can start creating the first VPS using this template.

Hope this helps someone.

Any questions? Please ask!

Share/Bookmark

quotacheck: Something weird happened while scanning. Error 2133571361

Was seeing a weird error(did not see this in some time now) when trying to enable quotas on a server today, the error was related to /home not being able to apply the quota files:

[root@server home]# quotaon /home/
quotaon: Cannot find quota file on /home [/dev/sda8] to turn quotas on/off.
quotaon: Cannot find quota file on /home [/dev/sda8] to turn quotas on/off.

[root@server /]# quotacheck -acugv
quotacheck: Scanning /dev/sda5 [/] done
quotacheck: Checked 1736 directories and 11094 files
quotacheck: Scanning /dev/sda8 [/home] quotacheck: Something weird happened while scanning. Error 2133571361

If you get any error like this then try and check /var/log/messages for a probable cause:

tail -f /var/log/messages

In my case here is how the output was looking:

Apr  3 15:58:30 server kernel: [ 1113.734047] Buffer I/O error on device sda8, logical block 852029
Apr  3 15:58:30 server kernel: [ 1113.734066] Buffer I/O error on device sda8, logical block 852030
Apr  3 15:58:30 server kernel: [ 1113.734089] Buffer I/O error on device sda8, logical block 852031
Apr  3 15:58:30 server kernel: [ 1113.734107] Buffer I/O error on device sda8, logical block 852032
Apr  3 15:58:30 server kernel: [ 1113.734123] Buffer I/O error on device sda8, logical block 852033

Conclusion:  the drive was going bad and had to be replaced.

As a follow up on part of this problem if you try to enable quotas on a partition and see the first error “quotaon: Cannot find quota file on /home [/dev/sda#] to turn quotas on/off.” then check if the aquota.user and aquota.group files exist under the partition and if not the create those:

To check if files exist under /home :

[root@server /]#cd /home

[root@server /]# ls -la |grep aquota
-rw——-   1 root root  6144 Apr  3 15:58 aquota.group
-rw——-   1 root root  7168 Apr  3 15:58 aquota.user

If there is no output then those files do not exist and need to be created:

[root@server /]#cd /home

[root@server /]#touch aquota.user

[root@server /]#touch aquota.group

OpenVZ + HyperVM install

Had a lot of clients lately that were trying to install OpenVZ with HyperVM on the servers and were failing and this because of a few reasons: wrong partition scheme, installing only HyperVM with no Openvz or doing the install wrong, etc.

So i decided to put in here a few things about this type of install and what you need and how to do it.

Firstly you need to make sure that the partition scheme on the server is right for OpenVZ, a right partition scheme for a Virtuozzo based install will look like this:

/boot – 2G-10G – boot partition

swap – 2xRam Memory – swap partition

/ – all the space left – main root partition

Or:

/boot – 2G-10G – boot partition

swap – 2xRam Memory – swap partition

/ – 2G-10G(or more) – main root partition

/vz – all space left – virtuozzo partition, all vps’s files will be here

Now for the OpenVZ install i have modified the OVZinstall so that it will not download any templates as this will b downloaded by the HyperVM installation and will speed up the install a bit.

To install OpenVZ and HyperVM on a server do the following:

1. Install OpenVZ

setenforce 0

cd /root

wget http://repo.hostechs.com/index.php?dir=ovz%2F&download=ovzhypervm.tar.gz

tar -zxvf ovzhypervm.tar.gz

cd ovzhypervm

sh ovzinstall.sh

shutdown -r now

2. Install HyperVM

wget http://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh

sh ./hypervm-install-master.sh –virtualization-type=openvz

After HyperVM is installed you are all done, try and access your HyperVM CP: http://machine-name:8888  .

This should work just fine on any Debian/Fedora/Centos x86 install, not intended for 64bit yet as i did not finish the OVZinstall script for 64bit machines.

If anyone tries this and encounters any problems or have any questions please let me know.