本章节演示如何安装GlusterFS。
RHCA专栏地址:https://blog.csdn.net/qq_41765918/category_11532281.html
可从红帽客户官网网站(http://access.redhat.com)下载的DVD镜像中安装红帽内置Gluster存储。该镜像可以刻录到DVD上,也可以使用PXE环境提供。
基于订阅仓库的Red Hat Gluster存储安装也是可用的,前提是Red Hat Gluster存储将被分层到Red Hat Enterprise Linux 7.2之上。然后需要在系统上附加和启用以下仓库:
redhat Gluster存储也可以部署在Red Hat Enterprise Linux 6.7。以下仓库列表必须附加并在系统上启用,以支持这一点:
只有在需要NFS-Ganesha支持时才需要rh-gluster-3-nfs-* 存储库。类似地,应该选择rh-gluster-3-samba存储库来提供Samba或CTDB支持。
安装过程参考课本。
在Amazon EC2公共云上安装Red Hat Gluster存储与在本地安装Red Hat Gluster存储略有不同。虽然支持从基于红帽企业linux的已存在镜像(也称为AMI (Amazon Machine image))安装,但一个更简单的安装选项是先从预装红帽Gluster存储的AMl开始。
完成在EC2上配置计算机的常规步骤。确保选择了一个大实例和Red Hat Gluster存储AMI。记得打开端口22/TCP。6000 / TCP。如果Red Hat为OpenStack Swift启用Gluster存储,则为5001/TCP、6002/TCP、443/TCP和8080/TCF。
因为在需要的EBS卷上的l/O性能可能不一致,Red Hat建议为存储块配置由8个大小相同的EBS卷组成的RAID 0阵列。请参阅https://access.redhat.com上提供的Red Hat Gluster存储管理指南。
在Microsoft Azure上的Red Hat Gluster存储可以利用Azure可用性来帮助在计划内或计划外中断期间维护数据的可用性。在参考资料中有关于在Microsoft Azure上设置Red Hat Gluster存储的详细介绍。
Red Hat Gluster存储也可以部署在谷歌云平台上。关于如何确认这一点的详细说明可以查询红帽官网。
[student@workstation ~]$ lab install-rhs setup Setting up servera for lab exercise work: • Configuring DHCP............................................ SUCCESS • Wiping boot record and rebooting servera.................... SUCCESS
要求在servera机器上安装Red Hat Gluster存储。系统应该只安装在主磁盘上,回收任何未使用的空间,并且应该确认使用本地时区。root密码应该设置为redhat。
第一个网络接口应该配置为用DHCP引导时激活,主机名应该设置为servera.lab.example.com。
[root@servera ~]# systemctl status glusterd.service ● glusterd.service - GlusterFS, a clustered file-system server Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2020-11-24 15:55:37 CST; 1min 28s ago Process: 1383 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS) Main PID: 1396 (glusterd) CGroup: /system.slice/glusterd.service └─1396 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO Nov 24 15:55:32 servera.lab.example.com systemd[1]: Starting GlusterFS, a clustered file-system s...... Nov 24 15:55:37 servera.lab.example.com systemd[1]: Started GlusterFS, a clustered file-system server. Hint: Some lines were ellipsized, use -l to show in full. [root@servera ~]# wget http://materials.example.com/finish-install --2020-11-24 15:59:54-- http://materials.example.com/finish-install Resolving materials.example.com (materials.example.com)... 172.25.254.254 Connecting to materials.example.com (materials.example.com)|172.25.254.254|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1044 (1.0K) Saving to: ‘finish-install’ 100%[=======================================>] 1,044 --.-K/s in 0s 2020-11-24 15:59:54 (59.0 MB/s) - ‘finish-install’ saved [1044/1044] [root@servera ~]# ll total 8 -rw-------. 1 root root 1109 Nov 24 15:53 anaconda-ks.cfg -rw-r--r--. 1 root root 1044 Mar 21 2016 finish-install [root@servera ~]# cat finish-install #!/bin/bash rht_ssh_keys='/etc/.rht_authorized_keys' cat <<\EOF > ${rht_ssh_keys} ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAx/Xk+tLGBCatkBuxzyEXVhupSgb4Lema0PAnM8dFbSxcPz4W4jO8yQgtONzHs8KOhs4J1NG9bHeAwpJa2p9iJkyrigxmQv0LOpvENdlGbA1hwsRoOhBGqwRzSmKHS4Or94FBXvzDwHfbkxDV0XhzHKod8b9tYuaIQfhbF3NUR2ItZiYJhBds+3GOAHhdbU9DOAyX8X60vppkgoJ4nb2Mugw51LM+uVh8ds24wzU3Khr6Dcmae7KX/b/PX0J0rO23ZPq1AJ3i6r13AJUc6beLjQXPzYs/ZLKiQZWaZUePnsiaIpKXpH7vuBK3zidvcK2pf6XXAB9MW7GtoFJnr6v+bQ== InstructorKey ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGtUW3ismHyuCW4CDdTVOOOq6aySdtYenXFWWx7HJa4VTepkG00aaLId9ocra10hc+MB0GTJMCyabDv3i8NKdi6GDH/aOLVsp/Ewy8DEzZMBlJDCt4v2i4/wU4liw6KgEFkZs+5hnqU8d4QzldyGJ5onr+AGvFOKG68CS0BBl40Z1twf1HhCyx8k6nzD2ovlkxWRFZKPAFrtPCBVvQDkOfVFZF+lwzaSztgAjbFZ4A9jqQyUYx4kOJ5DtRef36ucdUdVQale0+8lICl7/gb142SPpYfhxe88/BJScLPRjvVNeu1TxRmoHtVazqnAoRxQYAn2MoI6AG+w6QuZf8f7aL LabGradingKey EOF ssh_config="AuthorizedKeysFile ${rht_ssh_keys} .ssh/authorized_keys" sed -i -e "/AuthorizedKeysFile/s:.*:${ssh_config}:" /etc/ssh/sshd_config systemctl restart sshd [root@servera ~]# sh finish-install [root@servera ~]# cat /etc/.rht_authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAx/Xk+tLGBCatkBuxzyEXVhupSgb4Lema0PAnM8dFbSxcPz4W4jO8yQgtONzHs8KOhs4J1NG9bHeAwpJa2p9iJkyrigxmQv0LOpvENdlGbA1hwsRoOhBGqwRzSmKHS4Or94FBXvzDwHfbkxDV0XhzHKod8b9tYuaIQfhbF3NUR2ItZiYJhBds+3GOAHhdbU9DOAyX8X60vppkgoJ4nb2Mugw51LM+uVh8ds24wzU3Khr6Dcmae7KX/b/PX0J0rO23ZPq1AJ3i6r13AJUc6beLjQXPzYs/ZLKiQZWaZUePnsiaIpKXpH7vuBK3zidvcK2pf6XXAB9MW7GtoFJnr6v+bQ== InstructorKey ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGtUW3ismHyuCW4CDdTVOOOq6aySdtYenXFWWx7HJa4VTepkG00aaLId9ocra10hc+MB0GTJMCyabDv3i8NKdi6GDH/aOLVsp/Ewy8DEzZMBlJDCt4v2i4/wU4liw6KgEFkZs+5hnqU8d4QzldyGJ5onr+AGvFOKG68CS0BBl40Z1twf1HhCyx8k6nzD2ovlkxWRFZKPAFrtPCBVvQDkOfVFZF+lwzaSztgAjbFZ4A9jqQyUYx4kOJ5DtRef36ucdUdVQale0+8lICl7/gb142SPpYfhxe88/BJScLPRjvVNeu1TxRmoHtVazqnAoRxQYAn2MoI6AG+w6QuZf8f7aL LabGradingKey
[student@workstation ~]$ lab install-rhs grade
实验完后,重置环境。
部署Red Hat Gluster存储的各种方法,包括ISO/PXE安装和预定义的虚拟镜像。
在哪里可以找到在微软Azure上部署Red Hat Gluster存储的文档(https://access.redhat.com/articles/using-gluster-with-azure)
以上就是【金鱼哥】的分享。希望能对看到此文章的小伙伴有所帮助。
如果这篇【文章】有帮助到你,希望可以给【金鱼哥】点个赞