|Linux System Administration|
DNS discovery for OpenAFS
Just as with Kerberos client administration, when faced with a sigificant number of AFS clients, one possible way to streamline administration is to maintain a predetermined set of DNS hostname aliases (CNAME records) to refer to the OpenAFS database servers on a network. However, the flexibility of this approach is limited for the same reason it is when doing this with Kerberos, so it is fortunate that AFS also supports DNS discovery, but not with the relatively new SRV DNS resource record.
1. DNS AFSDB RR
The AFSDB DNS resource record was defined in RFC-1183 in 1990 − a full decade before the definition of the SRV DNS resource record. With a format similar to that of MX records, it allows AFS clients to locate AFS database servers. For instance, if two such servers, klas1 and klas2, are available on the network, only two extra entries need to the zone file. For instance, here they are for the domain example.com in BIND9 format:
example.com. IN AFSDB 1 klas1.example.com. example.com. IN AFSDB 1 klas2.example.com.
These records are composed as follows:
Since omission of the trailing dots will cause BIND9 to complete the names in each entry with the zone's domain name, it is possible to achieve exactly the same results as above with the following, assuming these records are located near the top of the zone file following the initial entry representing the domain, and also that the zone file is only used for example.com:
IN AFSDB 1 kas1 IN AFSDB 1 kas2
NB: With BIND9, if the owner field is left blank, as it is here, the same owner is used as in the last entry above it to have an owner. Many BIND9 zone files start with an entry that represents the domain name, in this case example.com.
Once the correct AFSDB entries have been implemented, check that they are available:
~$ host -t AFSDB example.com example.com has AFSDB record 1 klas2.example.com. example.com has AFSDB record 1 klas1.example.com. ~$ _
2. See also
3. Further reading