基于glusterfs提出了网络存储,我在其上创建了三个卷来存储应用程序数据。执行 glustervolume start <name_volume>force 命令后,我检查了卷的状态,发现 tcp 端口处于“n / a”状态。
gluster volume status
Status of volume: logz
Gluster process TCP Port RDMA Port Online Pid
------------------------------------------------------------------------------
Brick 10.130.0.9:/log_data/brick2 N/A N/A N N/A
Task Status of Volume logz
------------------------------------------------------------------------------
There are no active volume tasks
Status of volume: nextcloud
Gluster process TCP Port RDMA Port Online Pid
------------------------------------------------------------------------------
Brick 10.130.0.9:/nex_data/brick1 N/A N/A N N/A
Task Status of Volume nextcloud
------------------------------------------------------------------------------
There are no active volume tasks
Status of volume: prometheus
Gluster process TCP Port RDMA Port Online Pid
------------------------------------------------------------------------------
Brick 10.130.0.9:/promet_data/brick3 N/A N/A N N/A
Task Status of Volume prometheus
------------------------------------------------------------------------------
There are no active volume tasks
gluster volume info
Volume Name: logz
Type: Distribute
Volume ID: 7340977f-bae8-4c9a-9d5e-3a462b0eea34
Status: Started
Snapshot Count: 0
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 10.130.0.9:/log_data/brick2
Options Reconfigured:
nfs.disable: on
storage.fips-mode-rchecksum: on
transport.address-family: inet
Volume Name: nextcloud
Type: Distribute
Volume ID: 7cfd5606-08b6-4326-ba6a-0dba595b3ae0
Status: Started
Snapshot Count: 0
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 10.130.0.9:/nex_data/brick1
Options Reconfigured:
nfs.disable: on
storage.fips-mode-rchecksum: on
transport.address-family: inet
Volume Name: prometheus
Type: Distribute
Volume ID: fd2e819c-111a-4368-806f-1395cc48956e
Status: Started
Snapshot Count: 0
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: 10.130.0.9:/promet_data/brick3
Options Reconfigured:
nfs.disable: on
storage.fips-mode-rchecksum: on
transport.address-family: inet
ss -tunlp
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=483,fd=12))
udp UNCONN 0 0 10.130.0.9%eth0:68 0.0.0.0:* users:(("systemd-network",pid=481,fd=19))
udp UNCONN 0 0 0.0.0.0:111 0.0.0.0:* users:(("rpcbind",pid=455,fd=5),("systemd",pid=1,fd=78))
udp UNCONN 0 0 [::]:111 [::]:* users:(("rpcbind",pid=455,fd=7),("systemd",pid=1,fd=80))
tcp LISTEN 0 1024 0.0.0.0:24007 0.0.0.0:* users:(("glusterd",pid=8081,fd=10))
tcp LISTEN 0 4096 0.0.0.0:111 0.0.0.0:* users:(("rpcbind",pid=455,fd=4),("systemd",pid=1,fd=77))
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=483,fd=13))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=564,fd=3))
tcp LISTEN 0 128 127.0.0.1:6010 0.0.0.0:* users:(("sshd",pid=737,fd=11))
tcp LISTEN 0 4096 [::]:111 [::]:* users:(("rpcbind",pid=455,fd=6),("systemd",pid=1,fd=79))
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=564,fd=4))
tcp LISTEN 0 128 [::1]:6010 [::]:* users:(("sshd",pid=737,fd=10))
他们在 github 上写道,这个问题可以解决。 “解决方案:glusterd应该检查runner_run()设置的errno,如果它设置为EADDRINUSE,它应该为brick分配一个新端口并尝试再次启动它。”,但没有指出需要在哪个文件中修复。您能告诉我如何解决这个问题,以便我创建的所有卷都可以在不同的端口上启动吗?我尝试删除 glusterfs-server 并重新安装它,此后,甚至在端口 49152 上工作的第一个卷也变得不可用。
答案1
注释掉 glusterd.vol 文件中的选项 max-port 行,然后重新启动服务并再次创建卷,因此,每个卷都在单独的 tcp 端口上启动