ClusterStorage-236-1-配置网络节点IO加密与节点池

0.实验环境图

1.节点servera:主要是关防火墙(可以配置放行,但比较麻烦,不是本次实验的关注点,因而采取简单处理),关selinux,下载密钥(改为指定文件名,注意这里的大O,如果写成小o,会生成一个指定名称的空文件),创建secure-access文件(IO加密的开关文件),重启服务glusterd(注意可能存在进程关闭滞后的情况,手动pkill或kill -9,重启后一定要确认)。

[root@servera ~]# systemctl stop firewalld
[root@servera ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@servera ~]# setenforce 0
[root@servera ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@servera ssl]# wget ftp://workstation.lab.example.com/pub/servera.key -O /etc/ssl/glusterfs.key
--2019-03-11 14:52:55--  ftp://workstation.lab.example.com/pub/servera.key
           => ‘/etc/ssl/glusterfs.key’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE servera.key ... 1704
==> PASV ... done.    ==> RETR servera.key ... done.
Length: 1704 (1.7K) (unauthoritative)

100%[=================================================================================================================================>] 1,704       --.-K/s   in 0s      

[root@servera ssl]# wget ftp://workstation.lab.example.com/pub/servera.pem -O /etc/ssl/glusterfs.pem
--2019-03-11 14:53:31--  ftp://workstation.lab.example.com/pub/servera.pem
           => ‘/etc/ssl/glusterfs.pem’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE servera.pem ... 6253
==> PASV ... done.    ==> RETR servera.pem ... done.
Length: 6253 (6.1K) (unauthoritative)

100%[=================================================================================================================================>] 6,253       --.-K/s   in 0s      

2019-03-11 14:53:31 (1.12 GB/s) - ‘/etc/ssl/glusterfs.pem’ saved [6253]

[root@servera ssl]# wget ftp://workstation.lab.example.com/pub/glusterfs.ca -O /etc/ssl/glusterfs.ca
--2019-03-11 14:53:52--  ftp://workstation.lab.example.com/pub/glusterfs.ca
           => ‘/etc/ssl/glusterfs.ca’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE glusterfs.ca ... 1391
==> PASV ... done.    ==> RETR glusterfs.ca ... done.
Length: 1391 (1.4K) (unauthoritative)

100%[=================================================================================================================================>] 1,391       --.-K/s   in 0s      

2019-03-11 14:53:52 (220 MB/s) - ‘/etc/ssl/glusterfs.ca’ saved [1391]
[root@servera ~]# touch /var/lib/glusterd/secure-access
[root@servera ~]# systemctl stop glusterd
[root@servera ~]# pkill glusterd
[root@servera ~]# pkill glusterfs
[root@servera ~]# systemctl restart glusterd

[root@servera ssl]# systemctl restart glusterd
[root@servera ssl]# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-11 14:54:34 CST; 5min ago
  Process: 16151 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 16152 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─16152 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Mar 11 14:54:09 servera.lab.example.com systemd[1]: Starting GlusterFS, a clustered file-system server...
Mar 11 14:54:34 servera.lab.example.com systemd[1]: Started GlusterFS, a clustered file-system server.

2.节点serverb:主要是关防火墙(可以配置放行,但比较麻烦,不是本次实验的关注点,因而采取简单处理),关selinux,下载密钥(改为指定文件名,注意这里的大O,如果写成小o,会生成一个指定名称的空文件),创建secure-access文件(IO加密的开关文件),重启服务glusterd(注意可能存在进程关闭滞后的情况,手动pkill或kill -9,重启后一定要确认)。

[root@serverb ~]#  systemctl stop firewalld
[root@serverb ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@serverb ~]# setenforce 0
[root@serverb ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@serverb ~]# wget ftp://workstation.lab.example.com/pub/serverb.key -O /etc/ssl/glusterfs.key
--2019-03-11 15:27:00--  ftp://workstation.lab.example.com/pub/serverb.key
           => ‘/etc/ssl/glusterfs.key’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE serverb.key ... 1704
==> PASV ... done.    ==> RETR serverb.key ... done.
Length: 1704 (1.7K) (unauthoritative)

100%[=================================================================================================================================>] 1,704       --.-K/s   in 0.06s   

2019-03-11 15:27:01 (29.3 KB/s) - ‘/etc/ssl/glusterfs.key’ saved [1704]

[root@serverb ~]# wget ftp://workstation.lab.example.com/pub/serverb.pem -O /etc/ssl/glusterfs.pem
--2019-03-11 15:27:10--  ftp://workstation.lab.example.com/pub/serverb.pem
           => ‘/etc/ssl/glusterfs.pem’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE serverb.pem ... 6253
==> PASV ... done.    ==> RETR serverb.pem ... done.
Length: 6253 (6.1K) (unauthoritative)

100%[=================================================================================================================================>] 6,253       --.-K/s   in 0.06s   

2019-03-11 15:27:11 (109 KB/s) - ‘/etc/ssl/glusterfs.pem’ saved [6253]

[root@serverb ~]# wget ftp://workstation.lab.example.com/pub/glusterfs.ca -O /etc/ssl/glusterfs.ca
--2019-03-11 15:27:25--  ftp://workstation.lab.example.com/pub/glusterfs.ca
           => ‘/etc/ssl/glusterfs.ca’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE glusterfs.ca ... 1391
==> PASV ... done.    ==> RETR glusterfs.ca ... done.
Length: 1391 (1.4K) (unauthoritative)

100%[=================================================================================================================================>] 1,391       --.-K/s   in 0s      

2019-03-11 15:27:26 (241 MB/s) - ‘/etc/ssl/glusterfs.ca’ saved [1391]

[root@serverb ~]# touch /var/lib/glusterd/secure-access
[root@serverb ~]# systemctl stop glusterd
[root@serverb ~]# pkill glusterd
[root@serverb ~]# pkill glusterfs

[root@serverb ~]# systemctl restart glusterd
[root@serverb ~]# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-11 15:28:47 CST; 7s ago
  Process: 1059 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 1060 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─1060 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Mar 11 15:28:14 serverb.lab.example.com systemd[1]: Starting GlusterFS, a clustered file-system server...
Mar 11 15:28:47 serverb.lab.example.com systemd[1]: Started GlusterFS, a clustered file-system server.
 

3.节点serverc:主要是关防火墙(可以配置放行,但比较麻烦,不是本次实验的关注点,因而采取简单处理),关selinux,下载密钥(改为指定文件名,注意这里的大O,如果写成小o,会生成一个指定名称的空文件),创建secure-access文件(IO加密的开关文件),重启服务glusterd(注意可能存在进程关闭滞后的情况,手动pkill或kill -9,重启后一定要确认)。

[root@serverc ~]#  systemctl stop firewalld
[root@serverc ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@serverc ~]# setenforce 0
[root@serverc ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@serverc ~]# wget ftp://workstation.lab.example.com/pub/serverc.key -O /etc/ssl/glusterfs.key
--2019-03-11 15:30:30--  ftp://workstation.lab.example.com/pub/serverc.key
           => ‘/etc/ssl/glusterfs.key’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE serverc.key ... 1704
==> PASV ... done.    ==> RETR serverc.key ... done.
Length: 1704 (1.7K) (unauthoritative)

100%[=================================================================================================================================>] 1,704       --.-K/s   in 0s      

2019-03-11 15:30:30 (297 MB/s) - ‘/etc/ssl/glusterfs.key’ saved [1704]

[root@serverc ~]# wget ftp://workstation.lab.example.com/pub/serverc.pem -O /etc/ssl/glusterfs.pem
--2019-03-11 15:30:40--  ftp://workstation.lab.example.com/pub/serverc.pem
           => ‘/etc/ssl/glusterfs.pem’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE serverc.pem ... 6253
==> PASV ... done.    ==> RETR serverc.pem ... done.
Length: 6253 (6.1K) (unauthoritative)

100%[=================================================================================================================================>] 6,253       --.-K/s   in 0s      

2019-03-11 15:30:40 (1.05 GB/s) - ‘/etc/ssl/glusterfs.pem’ saved [6253]

[root@serverc ~]# wget ftp://workstation.lab.example.com/pub/glusterfs.ca -O /etc/ssl/glusterfs.ca
--2019-03-11 15:30:55--  ftp://workstation.lab.example.com/pub/glusterfs.ca
           => ‘/etc/ssl/glusterfs.ca’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE glusterfs.ca ... 1391
==> PASV ... done.    ==> RETR glusterfs.ca ... done.
Length: 1391 (1.4K) (unauthoritative)

100%[=================================================================================================================================>] 1,391       --.-K/s   in 0s      

2019-03-11 15:30:55 (221 MB/s) - ‘/etc/ssl/glusterfs.ca’ saved [1391]
[root@serverc ~]# touch /var/lib/glusterd/secure-access
[root@serverc ~]# systemctl stop glusterd
[root@serverc ~]# pkill glusterd
[root@serverc ~]# pkill glusterfs

[root@serverc ~]# systemctl restart glusterd
[root@serverc ~]# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-11 15:32:00 CST; 9s ago
  Process: 2529 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 2530 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─2530 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Mar 11 15:31:29 serverc.lab.example.com systemd[1]: Starting GlusterFS, a clustered file-system server...
Mar 11 15:32:00 serverc.lab.example.com systemd[1]: Started GlusterFS, a clustered file-system server.

4.节点serverd:主要是关防火墙(可以配置放行,但比较麻烦,不是本次实验的关注点,因而采取简单处理),关selinux,下载密钥(改为指定文件名,注意这里的大O,如果写成小o,会生成一个指定名称的空文件),创建secure-access文件(IO加密的开关文件),重启服务glusterd(注意可能存在进程关闭滞后的情况,手动pkill或kill -9,重启后一定要确认)。

[root@serverd ~]#  systemctl stop firewalld
[root@serverd ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@serverd ~]# setenforce 0
[root@serverd ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@serverd ~]# wget ftp://workstation.lab.example.com/pub/serverd.key -O /etc/ssl/glusterfs.key
--2019-03-11 15:33:41--  ftp://workstation.lab.example.com/pub/serverd.key
           => ‘/etc/ssl/glusterfs.key’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE serverd.key ... 1704
==> PASV ... done.    ==> RETR serverd.key ... done.
Length: 1704 (1.7K) (unauthoritative)

100%[=================================================================================================================================>] 1,704       --.-K/s   in 0s      

2019-03-11 15:33:41 (279 MB/s) - ‘/etc/ssl/glusterfs.key’ saved [1704]

[root@serverd ~]# wget ftp://workstation.lab.example.com/pub/serverd.pem -O /etc/ssl/glusterfs.pem
--2019-03-11 15:33:52--  ftp://workstation.lab.example.com/pub/serverd.pem
           => ‘/etc/ssl/glusterfs.pem’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE serverd.pem ... 6253
==> PASV ... done.    ==> RETR serverd.pem ... done.
Length: 6253 (6.1K) (unauthoritative)

100%[=================================================================================================================================>] 6,253       --.-K/s   in 0s      

2019-03-11 15:33:52 (857 MB/s) - ‘/etc/ssl/glusterfs.pem’ saved [6253]

[root@serverd ~]# wget ftp://workstation.lab.example.com/pub/glusterfs.ca -O /etc/ssl/glusterfs.ca
--2019-03-11 15:34:05--  ftp://workstation.lab.example.com/pub/glusterfs.ca
           => ‘/etc/ssl/glusterfs.ca’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE glusterfs.ca ... 1391
==> PASV ... done.    ==> RETR glusterfs.ca ... done.
Length: 1391 (1.4K) (unauthoritative)

100%[=================================================================================================================================>] 1,391       --.-K/s   in 0s      

2019-03-11 15:34:05 (287 MB/s) - ‘/etc/ssl/glusterfs.ca’ saved [1391]
[root@serverd ~]# touch /var/lib/glusterd/secure-access
[root@serverd ~]# systemctl stop glusterd
[root@serverd ~]# pkill glusterd
[root@serverd ~]# pkill glusterfs

[root@serverd ~]# systemctl restart glusterd
[root@serverd ~]# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-11 15:35:12 CST; 8s ago
  Process: 3833 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 3834 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─3834 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Mar 11 15:34:46 serverd.lab.example.com systemd[1]: Starting GlusterFS, a clustered file-system server...
Mar 11 15:35:12 serverd.lab.example.com systemd[1]: Started GlusterFS, a clustered file-system server.
 

5.节点servere:主要是关防火墙(可以配置放行,但比较麻烦,不是本次实验的关注点,因而采取简单处理),关selinux,下载密钥(改为指定文件名,注意这里的大O,如果写成小o,会生成一个指定名称的空文件),创建secure-access文件(IO加密的开关文件),重启服务glusterd(注意可能存在进程关闭滞后的情况,手动pkill或kill -9,重启后一定要确认)。

[root@servere ~]#  systemctl stop firewalld
[root@servere ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@servere ~]# setenforce 0
[root@servere ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@servere ~]# wget ftp://workstation.lab.example.com/pub/servere.key -O /etc/ssl/glusterfs.key
--2019-03-11 15:36:24--  ftp://workstation.lab.example.com/pub/servere.key
           => ‘/etc/ssl/glusterfs.key’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE servere.key ... 1704
==> PASV ... done.    ==> RETR servere.key ... done.
Length: 1704 (1.7K) (unauthoritative)

100%[=================================================================================================================================>] 1,704       --.-K/s   in 0s      

2019-03-11 15:36:24 (268 MB/s) - ‘/etc/ssl/glusterfs.key’ saved [1704]

[root@servere ~]# wget ftp://workstation.lab.example.com/pub/servere.pem -O /etc/ssl/glusterfs.pem
--2019-03-11 15:36:42--  ftp://workstation.lab.example.com/pub/servere.pem
           => ‘/etc/ssl/glusterfs.pem’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE servere.pem ... 6253
==> PASV ... done.    ==> RETR servere.pem ... done.
Length: 6253 (6.1K) (unauthoritative)

100%[=================================================================================================================================>] 6,253       --.-K/s   in 0s      

2019-03-11 15:36:42 (844 MB/s) - ‘/etc/ssl/glusterfs.pem’ saved [6253]

[root@servere ~]# wget ftp://workstation.lab.example.com/pub/glusterfs.ca -O /etc/ssl/glusterfs.ca
--2019-03-11 15:36:54--  ftp://workstation.lab.example.com/pub/glusterfs.ca
           => ‘/etc/ssl/glusterfs.ca’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254, 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE glusterfs.ca ... 1391
==> PASV ... done.    ==> RETR glusterfs.ca ... done.
Length: 1391 (1.4K) (unauthoritative)

100%[=================================================================================================================================>] 1,391       --.-K/s   in 0s      

2019-03-11 15:36:54 (206 MB/s) - ‘/etc/ssl/glusterfs.ca’ saved [1391]
[root@servere ~]# touch /var/lib/glusterd/secure-access
[root@servere ~]# systemctl stop glusterd
[root@servere ~]# pkill glusterd
[root@servere ~]# pkill glusterfs

[root@servere ~]# systemctl restart glusterd
[root@servere ~]# systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-11 15:38:10 CST; 10s ago
  Process: 8993 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 8994 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─8994 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Mar 11 15:37:43 servere.lab.example.com systemd[1]: Starting GlusterFS, a clustered file-system server...
Mar 11 15:38:10 servere.lab.example.com systemd[1]: Started GlusterFS, a clustered file-system server.
 

6.节点workstation:主要是关防火墙(可以配置放行,但比较麻烦,不是本次实验的关注点,因而采取简单处理),关selinux,下载密钥(改为指定文件名,注意这里的大O,如果写成小o,会生成一个指定名称的空文件),创建secure-access文件(IO加密的开关文件,需要先创建上级目录)。

[root@workstation ~]#  systemctl stop firewalld
[root@workstation ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@workstation ~]# setenforce 0
[root@workstation ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@workstation ~]# wget ftp://workstation.lab.example.com/pub/wk.key -O /etc/ssl/glusterfs.key
--2019-03-11 15:40:02--  ftp://workstation.lab.example.com/pub/wk.key
           => ‘/etc/ssl/glusterfs.key’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE wk.key ... 1704
==> PASV ... done.    ==> RETR wk.key ... done.
Length: 1704 (1.7K) (unauthoritative)

100%[=================================================================================================================================>] 1,704       --.-K/s   in 0s      

2019-03-11 15:40:02 (304 MB/s) - ‘/etc/ssl/glusterfs.key’ saved [1704]

[root@workstation ~]# wget ftp://workstation.lab.example.com/pub/wk.pem -O /etc/ssl/glusterfs.pem
--2019-03-11 15:40:11--  ftp://workstation.lab.example.com/pub/wk.pem
           => ‘/etc/ssl/glusterfs.pem’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE wk.pem ... 6265
==> PASV ... done.    ==> RETR wk.pem ... done.
Length: 6265 (6.1K) (unauthoritative)

100%[=================================================================================================================================>] 6,265       --.-K/s   in 0s      

2019-03-11 15:40:11 (715 MB/s) - ‘/etc/ssl/glusterfs.pem’ saved [6265]

[root@workstation ~]# wget ftp://workstation.lab.example.com/pub/glusterfs.ca -O /etc/ssl/glusterfs.ca
--2019-03-11 15:40:24--  ftp://workstation.lab.example.com/pub/glusterfs.ca
           => ‘/etc/ssl/glusterfs.ca’
Resolving workstation.lab.example.com (workstation.lab.example.com)... 172.25.250.254
Connecting to workstation.lab.example.com (workstation.lab.example.com)|172.25.250.254|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub ... done.
==> SIZE glusterfs.ca ... 1391
==> PASV ... done.    ==> RETR glusterfs.ca ... done.
Length: 1391 (1.4K) (unauthoritative)

100%[=================================================================================================================================>] 1,391       --.-K/s   in 0s      

2019-03-11 15:40:24 (417 MB/s) - ‘/etc/ssl/glusterfs.ca’ saved [1391]
[root@workstation ~]# mkdir /var/lib/glusterd
[root@workstation ~]# touch /var/lib/glusterd/secure-access

7.在节点servera:添加节点serverb,serverc,serverd,组成节点池。

[root@servera ssl]# gluster peer probe serverb
peer probe: success. 
[root@servera ssl]# gluster peer probe serverc
peer probe: success. 
[root@servera ssl]# gluster peer probe serverd
peer probe: success. 
[root@servera ssl]# gluster pool list
UUID                    Hostname     State
20a70664-42ee-4a20-8e4c-3d26e5a779f9    serverb      Connected 
6783b31b-b942-45fb-977b-1f62e5bc3366    serverc      Connected 
3c57faa2-c2cf-48bf-8dba-7d43837ead9d    serverd      Connected 
b6812a8a-1fb1-4145-b3dc-beac7d941564    localhost    Connected 
 

猜你喜欢

转载自blog.csdn.net/ligan1115/article/details/88387201