Linux

Gluster 磚塊離線,日誌中出現錯誤

  • March 3, 2020

我已經用我的 shell 腳本在 /var/lib/glusterd 中用主機名替換了所有 IP 地址並重命名了配置(IP 到主機名)。之後我重新啟動了 Gluster Daemon 和卷。然後我檢查是否所有對等點都已連接:

root@GlusterNode1a:~# gluster peer status
Number of Peers: 3

Hostname: gluster-1b
Uuid: 47f469e2-907a-4518-b6a4-f44878761fd2
State: Peer in Cluster (Connected)

Hostname: gluster-2b
Uuid: dc3a3ff7-9e30-44ac-9d15-00f9dab4d8b9
State: Peer in Cluster (Connected)

Hostname: gluster-2a
Uuid: 72405811-15a0-456b-86bb-1589058ff89b
State: Peer in Cluster (Connected)

當我執行df命令時,我可以看到所有節點上安裝的捲大小發生變化,因此新數據即將到來。但最近我注意到應用程序日誌中的錯誤消息:

copy(/storage/152627/dat): failed to open stream: Structure needs cleaning
readfile(/storage/1438227/dat): failed to open stream: Input/output error
unlink(/storage/189457/23/dat): No such file or directory

最後,我發現一些磚塊離線了:

root@GlusterNode1a:~# gluster volume status
Status of volume: storage
Gluster process            Port  Online  Pid
------------------------------------------------------------------------------
Brick gluster-1a:/storage/1a    24009  Y  1326
Brick gluster-1b:/storage/1b    24009  N  N/A
Brick gluster-2a:/storage/2a    24009  N  N/A
Brick gluster-2b:/storage/2b    24009  N  N/A
Brick gluster-1a:/storage/3a    24011  Y  1332
Brick gluster-1b:/storage/3b    24011  N  N/A
Brick gluster-2a:/storage/4a    24011  N  N/A
Brick gluster-2b:/storage/4b    24011  N  N/A
NFS Server on localhost          38467  Y  24670
Self-heal Daemon on localhost        N/A  Y  24676
NFS Server on gluster-2b      38467  Y  4339
Self-heal Daemon on gluster-2b    N/A  Y  4345
NFS Server on gluster-2a      38467  Y  1392
Self-heal Daemon on gluster-2a    N/A  Y  1402
NFS Server on gluster-1b      38467  Y  2435
Self-heal Daemon on gluster-1b    N/A  Y  2441

我能做些什麼呢?我需要修復它。

注意:所有四個節點的 CPU 和網路使用率大致相同。

我在 Freenode#Gluster 的 JoeJulian 的幫助下解決了這個問題。當我檢查程序列表時,有一些程序使用舊配置:/usr/sbin/glusterfsd -s localhost --volfile-id storage.11.111.111.11.storage-2b.... 執行此命令後:

killall glusterfsd ; killall -9 glusterfsd ; killall glusterd ; glusterd

情況已解決 - 所有磚塊都線上:

# gluster volume status
Status of volume: storage
Gluster process                     Port    Online  Pid
------------------------------------------------------------------------------
Brick gluster-1a:/storage/1a        24009   Y   17302
Brick gluster-1b:/storage/1b        24009   Y   12188
Brick gluster-2a:/storage/2a        24009   Y   10863
Brick gluster-2b:/storage/2b        24009   Y   13486
Brick gluster-1a:/storage/3a        24011   Y   17308
Brick gluster-1b:/storage/3b        24011   Y   12194
Brick gluster-2a:/storage/4a        24011   Y   10869
Brick gluster-2b:/storage/4b        24011   Y   13492
NFS Server on localhost                 38467   Y   17314
Self-heal Daemon on localhost               N/A Y   17320
NFS Server on gluster-2a            38467   Y   10879
Self-heal Daemon on gluster-2a      N/A Y   10885
NFS Server on gluster-2b            38467   Y   13503
Self-heal Daemon on gluster-2b      N/A Y   13509
NFS Server on gluster-1b            38467   Y   12200
Self-heal Daemon on gluster-1b      N/A Y   12206

引用自:https://serverfault.com/questions/442096