分布式存储系统之Ceph集群RadosGW基础使用( 六 )

提示:我们刚才创建的区域文件是root宿主,root属组,需要修改为root宿主,named属组;
检查区域文件格式是否错误?
[root@node12 named]# named-checkzone ilinux.io /var/named/ilinux.io.zonezone ilinux.io/IN: loaded serial 0OK[root@node12 named]#提示:显示ok,表示区域配置文件没有问题;
启动named进程,看看对应解析是否可域名是否可解析?
[root@node12 named]# systemctl start named[root@node12 named]# ss -tnulNetid StateRecv-Q Send-QLocal Address:PortPeer Address:PortudpUNCONN00192.168.0.52:53*:*udpUNCONN00127.0.0.1:53*:*udpUNCONN00127.0.0.1:323*:*udpUNCONN00::1:323:::*tcpLISTEN010192.168.0.52:53*:*tcpLISTEN010127.0.0.1:53*:*tcpLISTEN0128*:22*:*tcpLISTEN0128127.0.0.1:953*:*tcpLISTEN0100127.0.0.1:25*:*tcpLISTEN0128*:16379*:*tcpLISTEN0128*:27017*:*tcpLISTEN050*:3306*:*tcpLISTEN0128:::22:::*tcpLISTEN0128::1:953:::*tcpLISTEN0100::1:25:::*[root@node12 named]#提示:可以看到udp53号端口已经正常启动;
配置客户端主机,将对应dns指向192.168.0.52,看看对应域名是否可解析?
[root@node11 ~]# cat /etc/resolv.conf# Generated by NetworkManagernameserver 192.168.0.52[root@node11 ~]#使用dig命令解析ceph-mon01.ilinux.io看看是否能正常解析?
[root@node11 ~]# dig ceph-mon01.ilinux.io; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.10 <<>> ceph-mon01.ilinux.io;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56820;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;ceph-mon01.ilinux.io.INA;; ANSWER SECTION:ceph-mon01.ilinux.io.86400INA192.168.0.71;; AUTHORITY SECTION:ilinux.io.86400INNSns.ilinux.io.;; ADDITIONAL SECTION:ns.ilinux.io.86400INA192.168.0.52;; Query time: 1 msec;; SERVER: 192.168.0.52#53(192.168.0.52);; WHEN: Sat Oct 08 17:26:18 CST 2022;; MSG SIZErcvd: 98[root@node11 ~]# dig ceph-mon02.ilinux.io; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.10 <<>> ceph-mon02.ilinux.io;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50240;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;ceph-mon02.ilinux.io.INA;; ANSWER SECTION:ceph-mon02.ilinux.io.86400INA192.168.0.72;; AUTHORITY SECTION:ilinux.io.86400INNSns.ilinux.io.;; ADDITIONAL SECTION:ns.ilinux.io.86400INA192.168.0.52;; Query time: 1 msec;; SERVER: 192.168.0.52#53(192.168.0.52);; WHEN: Sat Oct 08 17:26:28 CST 2022;; MSG SIZErcvd: 98[root@node11 ~]# dig file.ceph-mon02.ilinux.io; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.10 <<>> file.ceph-mon02.ilinux.io;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37815;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 2;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;file.ceph-mon02.ilinux.io.INA;; ANSWER SECTION:file.ceph-mon02.ilinux.io. 86400 INCNAMEceph-mon02.ilinux.io.ceph-mon02.ilinux.io.86400INA192.168.0.72;; AUTHORITY SECTION:ilinux.io.86400INNSns.ilinux.io.;; ADDITIONAL SECTION:ns.ilinux.io.86400INA192.168.0.52;; Query time: 1 msec;; SERVER: 192.168.0.52#53(192.168.0.52);; WHEN: Sat Oct 08 17:26:38 CST 2022;; MSG SIZErcvd: 117[root@node11 ~]#提示:可以看到在客户端主机上将对应dns指向192.168.0.52以后,对应使用dig命令是可以正常解析ceph-mon01.ilinux.io;泛域名解析也是没有问题,到此我们的dns服务就搭建完成了;
配置每个radowgw守护进程的rgw_dns_name为其DNS名称

分布式存储系统之Ceph集群RadosGW基础使用

文章插图
提示:我这里将ceph-mon02也启动了Radosgw,所以连同ceph-mon2一遍配置了;我们可以使用ceph-deploy将配置推送给集群各主机,然后再到每个主机上重启进程就好;

经验总结扩展阅读