1

Glusterfs-server 无法在良好状态下停止。

我一直在尝试以下步骤来安装 glusterfs 并启动服务。

yum install centos-release-gluster
yum install glusterfs-server
systemctl start glusterd

并停止它。

systemctl stop glusterd

然后显示以下状态“活动:失败”。

glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; disabled)
   Active: failed (Result: exit-code) since 火 2017-01-24 18:23:55 JST; 4s ago
  Process: 2523 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 2524 (code=exited, status=15)

 1月 24 18:23:52 ds009 systemd[1]: Started GlusterFS, a clustered file-system server.
 1月 24 18:23:55 ds009 systemd[1]: Stopping GlusterFS, a clustered file-system server...
 1月 24 18:23:55 ds009 systemd[1]: glusterd.service: main process exited, code=exited, status=15/n/a
 1月 24 18:23:55 ds009 systemd[1]: Stopped GlusterFS, a clustered file-system server.
 1月 24 18:23:55 ds009 systemd[1]: Unit glusterd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

使用环境为“CentOS Linux release 7.2.1511(Core)”

并且安装的glusterfs-server版本是3.8.8-1.el7。

有谁知道出了什么问题并解决了这个问题。

4

1 回答 1

0

我找到了一种解决方法。

编辑 /usr/lib/systemd/system/glusterd.service 文件如下。

[Service]
Type=forking
PIDFile=/var/run/glusterd.pid
LimitNOFILE=65536
Environment="LOG_LEVEL=INFO"
EnvironmentFile=-/etc/sysconfig/glusterd
ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid  --log-level $LOG_LEVEL $GLUSTERD_OPTIONS
ExecStopPost=/usr/bin/systemctl reset-failed glusterd  # Add this
KillMode=process

当 GlusterFS 服务停止时,失败的状态是明确的。

于 2017-01-27T00:25:34.400 回答