Changes

Jump to: navigation, search

Virtuozzo Storage

15 bytes removed, 05:16, 13 January 2014
no edit summary
==OpenVZ limitations==
<span style="color:#FF0000">Parallels Cloud Storage is available as a TECHNOLOGY PREVIEW ONLY for OpenVZ users and can't be licensed for production.<br>To unlock for running in production you should upgrade to a full Parallels Cloud Server product (see below).<br>Available free Maximum capacity limited for usage in technology preview mode is 100GB of logical (Containers usable) disk space.<br>After hitting this limit writers can get blocked w/o errors expecting for a limit to be extended, so please avoid hitting the limit(it's not a bug :) ).</span>
==Pstorage components==
A recommended cluster setup includes from 3 to 5 MDS instances (allowing you to survive the loss of 1 or 2 of MDSs, respectively) and multiple CSs providing storage capacity.
 
=Pstorage setup HOWTO=
wget http://download.openvz.org/pstorage/*
yum install pstorage-ctl pstorage-libs-shared pstorage-metadata-server pstorage-chunk-server pstorage-client
 
==Creating a cluster==
service pstorage-mdsd start
chkconfig pstorage-mdsd on
 
To create 2nd and subsequent MDS services on other nodes do:
# 1. Login to the node as root.# 2. Setup cluster discovery. Normally, all the Pstorage components should be capable to discover each other on the network using multicast discovery (mDNS). This may not work however in Virtual Machines or if your network doesn't support multicasts. In this case you need to setup an MDS bootstrap list on the nodes manually. To do so 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 to create a bootstrap list for above cluster created type:
echo "10.30.100.101:2510" >> /etc/pstorage/clusters/test_cluster/bs.list
Now future Pstorage services started on this machine will be able to discover other parties.
# 3. Authenticate the server in the clusterand add a new MDS to the cluster using similar to the above make-mds command w/o -I and -p options:
pstorage -c test_cluster auth-node
# Add new MDS to the cluster using similar to above pstorage -c test_cluster make-mds command w-a 10.30.100.102 -r /o pstorage/test_cluster-I and -p options.mds
===Create chunk server (CS)===
Log in to the computer you want to configure as a chunk server as root.
Note, you may need to setup a bootstrap list as described above in case cluster auto-discovery doesn't work.
Authenticate the server in the cluster (skip this step if configured MDS or CS already on that server):
NOTE: you may need to setup a bootstrap list as described above in case cluster auto-discovery doesn't work. <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</code>
This command will create a CS service and use the directory specified after -r option for CS data store.
After you have created the chunk server, start is as a service (pstorage-csd) and configure it to start automatically when the machine boots:
<code># service pstorage-csd start</code> <code># chkconfig pstorage-csd on</code>
===Setting up a client===
Log in to the computer you want to act as a client as root.
Note, you may need to setup a bootstrap list as described above in case cluster auto-discovery doesn't work.
Authenticate the server in the cluster (skip this step if configured MDS or CS already on that server):
NOTE: you may need to setup a bootstrap list as described above in case cluster auto-discovery doesn't work.
<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 the directory to mount the Parallels Cloud Storage cluster toand mount Pstorage cluster as a file system:
<code># mkdir -p /pcs< pstorage-mount -c test_cluster /code>pcs
Mount Pstorage cluster as a file system: <code># pstorage-mount -c test_cluster /pcs/</code> You may want to add this mount to /etc/fstab to make it happen automatically on node bootreboot. Consult ''man pstorage-mount '' for more details.
Now you can access your data from all the client machines and ready to run containers!
Load OpenVZ ploop kernel modules if they aren't loaded yet:
<code># modprobe ploop pfmt_ploop1 pio_kaio</code>
Create a folder on Pstorage for the containers:
<code># mkdir -p /pcs/containers</code>
Create a ploop-based container with CTID=101 (put your own template name below):
 <code> vzctl create 101 --layout ploop --ostemplate centos-6-x86_64 --private /pcs/containers/</code>
Now container with CTID=101 is ready for use and can be started right from the cluster shared Pstorage:
<code> vzctl start 101</code>
In order to quickly relocate the container to another node (w/o data migration), just stop and unregister it on source node, then register and start on destination.

Navigation menu