Changes

Jump to: navigation, search

Virtuozzo Storage

4,819 bytes added, 12:53, 9 January 2014
Created page with "This article explains how to setup Parallels Cloud Storage cluster and deploy ploop-based OpenVZ container inside the cluster. ==Setting up Parallels Cloud Storage cluster== ..."
This article explains how to setup Parallels Cloud Storage cluster and deploy ploop-based OpenVZ container inside the cluster.

==Setting up Parallels Cloud Storage cluster==

Choose a name for the cluster that will uniquely identify it among other clusters in your network. A name may contain the characters a-z, A-Z, 0-9, dash (-), and underscore (_). Here we will use 'test_cluster' as a cluster name.

===Create metadata server (MDS)===

Log in to the computer you want to configure as a metadata server as root or as a user with
root privileges.

Download and install the following RPM packages: pstorage-ctl, pstorage-libs-shared and pstorage-metadata-server. The packages are available in the Parallels Cloud Server remote repository (this repository is automatically configured for your system when you install Parallels Cloud Server) and can be installed with this command:

<code># yum install pstorage-ctl pstorage-libs-shared pstorage-metadata-server</code>

Create MDS:

<code># pstorage -c test_cluster make-mds -I -a 10.30.100.101 -r /pstorage/test_cluster-mds -p</code>

This command creates new Parallels Cloud Storage cluster and metadata server and configures the IP address of 10.30.100.101 for communication with this server (replace 10.30.100.101 with IP address of your own MDS server). The command will ask you to enter the password for authentication in your cluster. The password you specify is encrypted and saved into the /etc/pstorage/clusters/pcs1/auth_digest.key file.

After you have created the MDS server, start the MDS management service (pstorage-mdsd) and configure it to start automatically when the server boots:

<code># service pstorage-mdsd start</code>

<code># chkconfig pstorage-mdsd on</code>

Every time you add new server or client to the cluster, you need to create the bs.list file in the /etc/pstorage/clusters/Cluster_Name directory (make this directory if it does not exist) on the server you are configuring for the cluster and specify IP addresses and ports of the MDS servers in the cluster.

For example:

<code># echo "10.30.100.101:2510" >> /etc/pstorage/clusters/test_cluster/bs.list</code>

===Create chunk server (CS)===

Log in to the computer you want to configure as a chunk server as root or as a user with root privileges.

Download and install the following RPM packages: pstorage-ctl, pstorage-libs-shared and pstorage-chunk-server. The packages are available in the Parallels Cloud Server remote repository (this repository is automatically configured for your system when you install Parallels Cloud Server) and can be installed with this command:

<code># yum install pstorage-ctl pstorage-libs-shared pstorage-chunk-server</code>

Authenticate the server in the cluster:

<code># pstorage -c test_cluster auth-node</code>

The command will ask you the password that you specified when setting up the first MDS server.

Create CS:

<code># pstorage -c test_cluster make-cs -r /pstorage/test_cluster-cs -t 1</code>

After you have created the chunk server, start the chunk management service (pstorage-csd) and configure it to start automatically when the chunk server boots:

<code># service pstorage-csd start</code>

<code># chkconfig pstorage-csd on</code>

===Setting up client===

Log in to the computer you want to act as a client as root or as a user with root privileges.

Download and install the following RPM packages: pstorage-libs-shared and pstorage-client. The packages are available in the Parallels Cloud Server remote repository (this repository is automatically configured for your system when you install Parallels Cloud Server) and can be installed with this command:

<code># yum install pstorage-libs-shared pstorage-client</code>

Create the directory to mount the Parallels Cloud Storage cluster to:

<code># mkdir -p /mnt/pcs</code>

Mount cluster:

<code># pstorage-mount -c test_cluster /mnt/pcs/</code>

For more information on setting up pstorage cluster please refer to the Parallels Cloud Storage documentation [http://download.parallels.com/doc/pcs/pdf/Parallels_Cloud_Storage.pdf http://download.parallels.com/doc/pcs/pdf/Parallels_Cloud_Storage.pdf].

==Create ploop-based container inside cluster==

Log in to the computer that you have configured to act as a client for the Parallels Cloud Storage cluster. Further we assume that you have already installed and configured OpenVZ on this computer.

Load kernel modules if they aren't loaded:

<code># modprobe ploop pfmt_ploop1 pio_kaio

Create folder for container data:

<code># mkdir -p /mnt/pcs/container</code>

Create ploop-based container with CTID=101 (replace template name with your own template):

<code>vzctl create 101 --layout ploop --ostemplate centos-6-x86_64 --private /mnt/pcs/container/</code>

Now container with CTID=101 is ready for use.

Navigation menu