Vertical Cluster Prerequisite Installation

In this post we will go thru all the required Prerequisite that need to be done before installation.

1- Install Linux using a minimum server configuration.

2- Allocate swap space

allocate 2GB or more of swap space independent on the RAM size. Guidelines for CentOS/RedHat swap space are as follows:
  • 4GB of RAM requires a minimum of 2GB of swap space
  • 4GB to 16GB RAM requires a minimum of 4GB of swap space
  • 16GB to 64GB of RAM requires a minimum of 8GB of swap space
  • 64GB to 256GB of RAM requires a minimum of 16GB of swap space
To find the current swap space alocated:
  cat /proc/swaps
To add the 2GB or more of swap use the following commands:
the command will add a 2GB swap file mounted on "/newswap" partition
  dd if=/dev/zero of=/newswap bs=1024 count=2147483648
  mkswap /newswap

3- Disable CPU frequency scaling

Stop the service:
service cpuspeed stop
Disable at boot time:
 chkconfig cpuspeed off
Add the swap file to the system in real-time:
swapon /newswap
Finally, modify the /etc/fstab to automatically add the new swap at system boot time by adding the following line:
/newswap    swap    swap   defaults 0 0

4-Configure the I/O Scheduler

Why do you need to do this ? Well Vertica is a very needs read requests over write requests. By deafult Linux configuration comes with the CFQ(Completely Fair Queuing?levator=cfq (default)) scheduler enabled which is an overall good use To alter the Scheduler you need to do it for all the devices that are to be used in Vertica configuration. Example:
	cd /sys/block/deviceName/queue/
	vim scheduler
	noop [deadline] cfq  -- add this line
The brackets represents the mode that will be used by the partition. To change the scheduler, write the name of the scheduler you want the device to use to its scheduler file. You must have root privileges to write to this file.Changing the scheduler immediately affects the I/O requests for the device. Automated Create a file called setscheduler.sh in /etc/init.d/ and add the following content:
#!/bin/bash
# chkconfig: 2345 95 20
# description: alter scheduler from cfg - deadline
# this Vertica specific.

echo "deadline"  /sys/block//queue/scheduler
Make the file executable:
sudo chmod +x /etc/init.d/setscheduler.sh
Register it as an init.d script:
chkconfig --add /etc/init.d/setscheduler.sh

chkconfig /etc/init.d/setscheduler.sh on<script src="//pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">// <![CDATA[

// ]]></script>

5-Prepare disk storage locations

In a Vertica cluster configuration the data locations must reside in the same paths on all nodes. Always mentain the data separete from the catalog. Before installing the database make sure that data in catalog locations are created on all nodes and owned by the database administrator. Space requirements: Vertica requires aditional disk space for several internal operations, so it is recomanded that no more then 60% of the disk should be used by data leaving space for the internal operations to take place.

6-Allow passwordless SSH access for dbadmin

Verify that sudo is available on all cluster hosts
# which sudo
/usr/bin/sudo
The dbadmin user must have authorization for passwordless ssh. In typical installs, you do not need to make any changes. However, if you have set up your system to disallow passwordless login, then you must enable it for the dbadmin user. To enable passwordless ssh access for the dbadmin user, edit the /etc/sudoers file and add this line:
##Passwordless SSH for dbadmin
dbadmin ALL=(ALL) NOPASSWD: ALL

7-Alter the pam_limits.so file.

 vim /etc/pam.d/su
 session required pam_limits.so

8-Set the time zone on the cluster nodes: You can set the time zone several different ways, depending on the Linux distribution or the system administrators' preferences.

  • To set the system time zone edit:
vim /etc/sysconfig/clock
--add your desired timezone.

zone="America/Sao_Paulo Brazil/East"
To set the TZ variable, edit /etc/profile or /root/.bashrc and add the following line:
export TZ=time-zone-name

8-Set host locale (language) For this task you need to edit the file /home/dbadmin/.profile on all cluster nodes and add the follwoing line :

export LC_ALL=pt_BR.UTF-8
LANG determines the locale category for native language, local customs, and coded character set in the absence of the LC_ALL and other LC_ environment variables. LANG can be used by applications to determine which language to use for error messages and instructions, collating sequences, date formats, and so forth.

9-Check NTP daemon status:

The ntpd program is an operating system daemon which sets and maintains the system time of day in synchronism with Internet standard time servers. To check if your hosts are configured to run the NTP daemon on startup:
$ chkconfig --list ntpd
If the NTP daemon is installed, output should resemble the following:
ntp 0:off 1:off 2:on 3:on 4:off 5:on 6:off
How to enable the ntp daemon :
chkconfig ntpd on

#to start it manually
/etc/init.d/ntpd start

10-Install the prerequisite for Vertica Cluster

yum install ? rsync  python*  telnet ruby*  java* sudo  openssh-server openssh-clients
  • rsync - rsync is a file transfer program for Unix systems. rsync uses the 'rsync algorithm' which provides a very fast method for bringing remote files into sync.
  • python
  • telnet
  • ruby
  • java
  • sudo
  • openssh-server
  • openssh-clients
# chkconfig sshd on
# service sshd start
Configuring the Network

11-Configure host name resolution

  • Set the HOSTNAME environment variable
To do this follow the steps bellow: 1-Edit the files /etc/profile or /etc/bashrc and add the following lines:
 export HOSTNAME='hostname'
2-Edit the /etc/sysconfig/network file to set HOSTNAME by adding the line:
 HOSTNAME="host name"
  • Set up the /etc/hosts file on each node in the cluster.
Make sure that the /etc/hosts file includes all of the hosts that become part of the cluster. For example, if the hosts are named node01, node02, node03, and node04, the /etc/hosts file on each host looks like this:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
192.168.13.128          node01
192.168.13.129          node02
192.168.13.130          node03
192.168.13.131          node04
All private interfaces should be on the same subnet and have the same broadcast address.

12-Disable firewalls

  • Disable SELinux after install SELINUX=enforcing to SELINUX=disabled
To disable edit the /etc/seLinux/config file .
  • Take out the firewall rules form the startup tasks:
chkconfig iptables stop
  • Stop the filewall rules:
 /etc/init.d/iptables stop
13-Provide root and SSH access to the cluster Make sure that root user has acess to all hosts without using password via ssh. 14-Ensure that port 5433 is not in use and that /dev/pts is mounted. 15-Install the following before installing the Cluster
  • Perl must be installed.
  • Python must be installed.
  • BASH shell
  • Filesystem Options
Vertica supports the ext3 and ext4 file systems. Linux Logical Volume Manager (LVM) is not supported. Recommended disk block size is 4096 bytes. After all of this are done reboot your hosts and after this you can start installing the cluster.