2.5. Setting Up the First Metadata Server¶
Setting up the first MDS server is the first step in creating a Virtuozzo Storage cluster. You can add more MDS servers later to provide better availability for your cluster, as described in Configuring MDS Servers.
The process of setting up the first MDS server (called master MDS server) and, thus, creating a cluster includes two stages:
Preparing to create the MDS server.
Creating the MDS server.
2.5.1. Stage 1: Preparing to Create the First MDS Server¶
To prepare for making the first MDS server, do the following:
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 (_). The examples used throughout this guide assume that the cluster name is
When choosing a name for the cluster, make sure it is unique on your network. Also, do not use names that were once assigned to other clusters in your network, even if these clusters do not exist any more. This will help you avoid possible problems with services from previous cluster setups that might still be running and trying to operate on the new cluster. Though such operations will not succeed, they can make your work as a cluster administrator more difficult.
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 on the computer:
vstorage-metadata-server. The packages are available in the Virtuozzo remote repository (this repository is automatically configured for your system when you install Virtuozzo) and can be installed with this command:
# yum install vstorage-metadata-server
Make sure that cluster discovery is configured in your network. For details, see Configuring Cluster Discovery.
After you complete the steps above, you are ready to create the MDS server.
2.5.2. Stage 2: Creating the First MDS Server¶
To create the first MDS server, you use the
vstorage make-mds command, for example:
# vstorage -c stor1 make-mds -I -a 10.30.100.101 -r /vstorage/stor1-mds -p
This command does the following:
Asks you for a password to use for password-based authentication in your cluster. Password-based authentication enhances security, requiring each server to be authenticated before it can be included in the cluster. The password you specify is encrypted and saved into the
/etc/vstorage/clusters/stor1/auth_digest.keyfile on the MDS server.
Creates a Virtuozzo Storage cluster with the name of
vstorageto create a new cluster).
Creates a metadata server and configures the IP address of 10.30.100.101 for communication with this server. By default, Virtuozzo Storage uses ports 2510 and 2511 to communicate with MDS servers. If necessary, you can replace the default ports with your own ones by reserving two unoccupied consecutive ports and specifying the first one after the IP address of your MDS server (e.g.,
-a 10.30.100.101:4110if your custom ports are 4110 and 4111). Replace 10.30.100.101 in the example above with the IP address of your own MDS server. The specified IP address must be (1) static (or in the case of using DHCP, mapped to the MAC address of the MDS server) and (2) chosen from the range of IP addresses on the BackNet network dedicated to your Virtuozzo Storage cluster.
Creates a journal in the
/vstorage/stor1-mdsdirectory on the MDS server and adds the information about the
stor1cluster to it. When choosing a directory for storing the journal, make sure that the partition where the directory is located has at least 10 GB of free disk space.
After you have created the MDS server, start the MDS management service (
vstorage-mdsd) and configure it to start automatically when the server boots:
# systemctl start vstorage-mdsd.target
# systemctl enable vstorage-mdsd.target
For information on including additional MDS servers in a Virtuozzo Storage cluster, see Configuring MDS Servers.