Article ID: 121399, created on Apr 30, 2014, last review on Mar 30, 2016

  • Applies to:
  • Virtuozzo


How to deploy a DNS server to your Virtuozzo storage environment


Each Virtuozzo storage cluster is identified by a unique name. To detect an available cluster on the network, and to resolve a detected cluster name into the network addresses of MDS servers, a cluster discovery method should be implemented.

Virtuozzo Storage consists of physical Virtuozzo nodes with storage roles installed. While deploying storage member servers you can

A DNS server for cluster discovery should be available for all nodes of your storage. If you don't have a DNS server, you can create a new container on one of your existing Virtuozzo servers.

DNS server deployment example

For the following storage scheme:

    cluster name: alpha
    domain name: vz.test
    MDS1 name\ip: mds1\
    MDS2 name\ip: mds2\
    MDS3 name\ip: mds3\
    DNS server name\ip: dns\ 
  1. Create a new container:

    [root@vz ~]# vzctl create 501 --ostemplate centos-6-x86_64
    [root@vz ~]# vzctl set 501 --hostname dns --ipadd --save
    [root@vz ~]# vzctl set 501 --nameserver --save
    [root@vz ~]# vzctl start 501
  2. Install BIND:

    [root@vz ~]# vzpkg install 501 -p bind bind-utils
  3. Modify /etc/named.conf file inside of the DNS container, according to this example:

    // named.conf
    // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
    // server as a caching only nameserver (as a localhost DNS resolver only).
    // See /usr/share/doc/bind*/sample/ for example named configuration files.
    options {
            listen-on port 53 { any; };
            listen-on-v6 port 53 { ::1; };
            directory       "/var/named";
            dump-file       "/var/named/data/cache_dump.db";
            statistics-file "/var/named/data/named_stats.txt";
            memstatistics-file "/var/named/data/named_mem_stats.txt";
            allow-query     { any; };
            recursion yes;
       dnssec-lookaside auto;
       /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
       managed-keys-directory "/var/named/dynamic";
    }; logging { channel default_debug { file "data/"; severity dynamic; }; }; zone "vz.test" IN { type master; file ""; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key";

    The following lines are important:

    listen-on port 53 { any; };
    allow-query     { any; };
    zone "vz.test" IN {
            type master;
            file "";
  4. Create /var/named/ file with the contents as in the following example:

    $ORIGIN vz.test.
    $TTL 86400
    @   IN  SOA     vz.test. root@vz.test. (
            2013042201  ;Serial
            3600        ;Refresh
            1800        ;Retry
            604800      ;Expire
            86400       ;Minimum TTL
    @ IN NS dns
    @ IN A
    dns IN A
    mds1 IN A
    mds2 IN A
    mds3 IN A
    _pstorage._tcp.alpha SRV 0 1 2510 mds1
    _pstorage._tcp.alpha SRV 0 1 2510 mds2
    _pstorage._tcp.alpha SRV 0 1 2510 mds3
    pstorage_clusters 300 IN TXT "alpha"
  5. Configure the service:

    [root@dns ~]# chkconfig named on 
    [root@dns ~]# service named restart
  6. Modify /etc/resolv.conf on all of your storage servers and add the new DNS server to be the first one and add the search domain:

    search vz.test
  7. Check SRV and TXT records:

    [root@mds1 ~]# host -t srv  _pstorage._tcp.alpha
    _pstorage._tcp.alpha.vz.test has SRV record 0 1 2510 mds1.vz.test.
    _pstorage._tcp.alpha.vz.test has SRV record 0 1 2510 mds2.vz.test.
    _pstorage._tcp.alpha.vz.test has SRV record 0 1 2510 mds3.vz.test.
    [root@mds1 ~]# host -t txt pstorage_clusters
    pstorage_clusters.vz.test descriptive text "alpha"

Now you can use this DNS server in order to detect the cluster name when installing a new Virtuozzo server.

Search Words

help to config DNS record

Discovering using DNS TXT records: FAIL

dns config issue

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF