Previous page

Next page

Locate page in Contents

Print this page

Using DNS Records

The recommended way of configuring cluster discovery is to use special DNS records. The process of setting up this type of cluster discovery includes two steps:

  1. Announcing the information about running MDS servers in the cluster so that chunk servers, clients, and new MDS servers can automatically obtain this information when necessary. You do this using DNS SRV records.
  2. Defining DNS TXT records or enabling DNS zone transfers so that you can discover the unique names of available clusters when necessary.

Announcing the Information About MDS Servers

You can use SRV records to announce the information about running MDS servers in the cluster. The service field of an SRV record pointing to an MDS server must have the following format:

_pstorage._tcp. CLUSTER_NAME

where

  • _pstorage is the symbolic name reserved for Parallels Cloud Storage.
  • _tcp denotes that Parallels Cloud Storage uses the TCP protocol for communication in the cluster.
  • CLUSTER_NAME is the name of the Parallels Cloud Storage cluster described by the record.

The following example shows a DNS zone file that contains records for three MDS servers listening on the default port 2510 and configured for the pcs1 cluster:

$ORIGIN pcs.test.

$TTL 1H

@ IN SOA ns rname.invalid. (1995032001 5H 10M 1D 3H)

NS @

A 192.168.100.1

s1 A 192.168.100.1

s2 A 192.168.100.2

s3 A 192.168.100.3

; SERVICE SECTION

; MDS for the 'pcs1' cluster runs on s1.pcs.test and listens on port 2510

_pstorage._tcp.pcs1 SRV 0 1 2510 s1

; MDS for the 'pcs1' cluster runs on s2.pcs.test and listens on port 2510

_pstorage._tcp.pcs1 SRV 0 1 2510 s2

; MDS for the 'pcs1' cluster runs on s3.pcs.test and listens on port 2510

_pstorage._tcp.pcs1 SRV 0 1 2510 s3

; eof

Once you configure DNS SRV records for the pcs1 cluster, you can list them by issuing the following SRV query:

# host -t SRV _pstorage._tcp.pcs1

_pstorage._tcp.pcs1.pcs.test has SRV record 0 1 2510 s1.pcs.test.

_pstorage._tcp.pcs1.pcs.test has SRV record 0 1 2510 s2.pcs.test.

_pstorage._tcp.pcs1.pcs.test has SRV record 0 1 2510 s3.pcs.test.

Discovering Cluster Names

The easiest and most efficient way of discovering the names of clusters in your network is to specify all cluster names in pstorage_clusters TXT records of DNS zone files. The following example provides a sample of valid TXT record formats for Parallels Cloud Storage clusters:

pstorage_clusters 300 IN TXT " cluster1 , cluster2 " " cluster3 , cluster4 "

pstorage_clusters 300 IN TXT " cluster5 "

pstorage_clusters 300 IN TXT " cluster6 " " cluster7 "

Another way of discovering cluster names in your network is to use DNS zone transfers. Once DNS zone transfers are enabled, cluster tools will be able to retrieve all DNS SRV records from DNS zone files and extract cluster names from these records.

After you set up cluster discovery via DNS TXT records or DNS zone transfers, you can run the pstorage discover command on any of the cluster servers to discover the names of all clusters in your network:

# pstorage discover

02-10-12 13:16:46.233 Discovering using DNS TXT records: OK

02-10-12 13:16:46.308 Discovering using DNS zone transfer: FAIL

pcs1

pcs2

pcs3

The example pstorage output shows that:

  • Clusters names are discovered via the DNS TXT records.
  • Three clusters with the names of pcs1 , pcs2 , and pcs3 are currently set up on the network.