ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

rh236 第 12题

2022-05-29 08:33:42  阅读:278  来源: 互联网

标签:12 geo gluster volume rh236 servere testcopy root


[root@servere ~]# gluster volume create testcopy servere:/bricks/testcopy/brick
[root@servere ~]# gluster volume set testcopy auth.ssl-allow 'servera.lab.example.com,serverb.lab.example.com,serverc.lab.example.com,serverd.lab.example.com,servere.lab.example.com,workstation.lab.example.com'
[root@servere ~]# gluster volume set testcopy client.ssl on
[root@servere ~]# gluster volume set testcopy server.ssl on
[root@servere ~]# gluster volume set testcopy auth.allow '172.25.250.*'
[root@servere ~]# gluster volume start testcopy
 
[root@workstation ~]# umount /test/
 
[root@servera ~]# gluster volume stop testvol
[root@servera ~]# gluster volume start testvol 
 
[root@workstation ~]# mount -a
 
[root@servere ~]# systemctl stop glusterd && pkill glusterfs
[root@servere ~]# touch /var/lib/glusterd/secure-access
[root@servere ~]# systemctl start glusterd
[root@servere ~]# groupadd repgrp && useradd -G repgrp georep
[root@servere ~]# echo "redhat" | passwd --stdin georep
[root@servere ~]# mkdir -m 0711 /var/mountbroker-root
[root@servere ~]# semanage fcontext -a -e /home /var/mountbroker-root
[root@servere ~]# restorecon -Rv /var/mountbroker-root
 
 
[root@servere ~]# cat /etc/glusterfs/glusterd.vol    ===> 手动添加以下项
    option geo-repilcation-log-group repgrp
    option rpc-auth-allow-insecure on
    option mountbroker-geo-replication.georep testcopy
    option mountbroker-root /var/mountbroker-root
 
[root@servere ~]# chmod -R 770 /var/lib/glusterd/geo-replication/
[root@servere ~]# chmod -R 770 /var/log/glusterfs/geo-replication-slaves/
[root@servere ~]# chown -R .repgrp /var/lib/glusterd/geo-replication/
[root@servere ~]# chown -R .repgrp /var/log/glusterfs/geo-replication-slaves/
 
[root@servere ~]# systemctl restart glusterd
[root@servere ~]# gluster volume stop testcopy
[root@servere ~]# gluster volume start testcopy 
 
[root@servera ~]# ssh-keygen
[root@servera ~]# ssh-copy-id georep@servere
[root@servera ~]# gluster system:: execute gsec_create    ===> 生成公钥
[root@servera ~]# gluster volume geo-replication testvol georep@servere::testcopy create push-pem   ===> 推公钥
 
[root@servere ~]# /usr/libexec/glusterfs/set_geo_rep_pem_keys.sh georep testvol testcopy
 
[root@servera ~]# gluster volume geo-replication testvol georep@servere::testcopy start
[root@servera ~]# gluster volume geo-replication testvol georep@servere::testcopy status
# 测试
[root@workstation ~]# echo "123456" > /test/a.txt
 
[root@servere ~]# ll /bricks/testcopy/brick/         ===> 会同步到servere的指定目录中
-rw-r--r--. 2 root root   7 5月  16 09:25 a.txt

标签:12,geo,gluster,volume,rh236,servere,testcopy,root
来源: https://www.cnblogs.com/smlile-you-me/p/16322829.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有