首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Debian 10起搏器集群: GFS2安装失败是因为“全局锁失败:检查全局锁空间是否启动”。

Debian 10起搏器集群: GFS2安装失败是因为“全局锁失败:检查全局锁空间是否启动”。
EN

Unix & Linux用户
提问于 2021-06-23 10:53:41
回答 1查看 663关注 0票数 1

我正在尝试用三个实例来设置一个新的Debian 10集群。我的堆栈是基于带有GFS2卷的起搏器、cor产、dlm和lvmlockd的。所有服务器都可以访问GFS2卷,但在使用GFS2文件系统时,我不能使用心脏起搏器或手动挂载它。我配置了corosync,所有三个实例都在线。我继续使用dlm和lvm配置。在这里,我的LVM和心脏起搏器的配置步骤:

代码语言:javascript
复制
LVM:
sudo nano /etc/lvm/lvm.conf --> Set locking_type = 1 and use_lvmlockd = 1   

Pacemaker Resources:
sudo pcs -f stonith_cfg stonith create meatware meatware hostlist="firmwaredroid-swarm-1 firmwaredroid-swarm-2 firmwaredroid-swarm-3" op monitor interval=60s
sudo pcs resource create dlm ocf:pacemaker:controld \
    op start timeout=90s interval=0 \
    op stop timeout=100s interval=0
sudo pcs resource create lvmlockd ocf:heartbeat:lvmlockd \
    op start timeout=90s interval=0 \
    op stop timeout=100s interval=0
sudo pcs resource group add base-group dlm lvmlockd
sudo pcs resource clone base-group \
    meta interleave=true ordered=true target-role=Started

pcs status显示所有资源都已上线。在完成起搏器配置后,我尝试设置一个共享卷组,以便将文件系统资源添加到起搏器中,但所有命令都在Global lock failed: check that global lockspace is started.中失败

代码语言:javascript
复制
sudo pvcreate /dev/vdb
--> Global lock failed: check that global lockspace is started
sudo vgcreate vgGFS2 /dev/vdb —shared
--> Global lock failed: check that global lockspace is started

然后,我尝试用mkfs.gfs2直接格式化/dev/vdb,但在我看来,这是错误的一步,因为挂载卷总是失败的:

代码语言:javascript
复制
sudo mkfs.gfs2 -p lock_dlm -t firmwaredroidcluster:gfsvolfs -j 3 /dev/gfs2share/lvGfs2Share
sudo mount -v -t "gfs2" /dev/vdb ./swarm_file_mount/
mount: /home/debian/swarm_file_mount: mount(2) system call failed: Transport endpoint is not connected.

我尝试过几种配置,比如启动lvmlockd -g dlm或用dlm_controld -d调试dlm,但是我没有找到任何关于如何做的信息。在网上,我发现了一些讨论类似错误的RedHat论坛,但由于付费墙而没有提供任何解决方案。

如何使用dlm启动或初始化全局锁,以便在起搏器Debian集群上正确地挂载GFS2?换句话说,我的dlm配置有什么问题?

寻求任何帮助!

EN

回答 1

Unix & Linux用户

发布于 2021-07-12 15:27:45

我现在也在尝试同样的方法。

在机器上使用LVM卷之前,您需要激活它。您可以使用ocf:heartbeat:LVM-activate资源来完成这一任务。如果它被激活,您可以在a的输出中看到Attr下的lvs

我发现Buster中的LVM激活资源有一些bug(bashism和寻找一个不推荐的LVM选项)。但是到目前为止,安装较新的软件包buster-backport是有效的。

这是我目前的资源。

代码语言:javascript
复制
      <clone id="base-services-clone">
        <group id="base-services">
          <primitive class="ocf" id="dlm" provider="pacemaker" type="controld">
            <operations>
              <op id="dlm-monitor-interval-60s" interval="60s" name="monitor"/>
              <op id="dlm-start-interval-0s" interval="0s" name="start" timeout="90s"/>
              <op id="dlm-stop-interval-0s" interval="0s" name="stop" timeout="100s"/>
            </operations>
          </primitive>
          <primitive class="ocf" id="lvmlockd" provider="heartbeat" type="lvmlockd">
            <operations>
              <op id="lvmlockd-monitor-interval-60s" interval="60s" name="monitor"/>
              <op id="lvmlockd-start-interval-0s" interval="0s" name="start" timeout="90s"/>
              <op id="lvmlockd-stop-interval-0s" interval="0s" name="stop" timeout="90s"/>
            </operations>
          </primitive>
          <primitive class="ocf" id="cluster-vg" provider="heartbeat" type="LVM-activate">
            <instance_attributes id="cluster-vg-instance_attributes">
              <nvpair id="cluster-vg-instance_attributes-activation_mode" name="activation_mode" value="shared"/>
              <nvpair id="cluster-vg-instance_attributes-lvname" name="lvname" value="data"/>
              <nvpair id="cluster-vg-instance_attributes-vg_access_mode" name="vg_access_mode" value="lvmlockd"/>
              <nvpair id="cluster-vg-instance_attributes-vgname" name="vgname" value="cluster"/>
            </instance_attributes>
            <operations>
              <op id="cluster-vg-monitor-interval-30s" interval="30s" name="monitor" timeout="90s"/>
              <op id="cluster-vg-start-interval-0s" interval="0s" name="start" timeout="90s"/>
              <op id="cluster-vg-stop-interval-0s" interval="0s" name="stop" timeout="90s"/>
            </operations>
          </primitive>
          <primitive class="ocf" id="shared-data" provider="heartbeat" type="Filesystem">
            <instance_attributes id="shared-data-instance_attributes">
              <nvpair id="shared-data-instance_attributes-device" name="device" value="/dev/cluster/data"/>
              <nvpair id="shared-data-instance_attributes-directory" name="directory" value="/mnt/data"/>
              <nvpair id="shared-data-instance_attributes-fstype" name="fstype" value="gfs2"/>
              <nvpair id="shared-data-instance_attributes-options" name="options" value="noatime"/>
            </instance_attributes>
            <operations>
              <op id="shared-data-monitor-interval-10s" interval="10s" name="monitor"/>
              <op id="shared-data-start-interval-0s" interval="0s" name="start" timeout="60s"/>
              <op id="shared-data-stop-interval-0s" interval="0s" name="stop" timeout="60s"/>
            </operations>
          </primitive>
        </group>
      </clone>

这不是一个生产设置,只是一些迷惘的VM内部的一些测试。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/655446

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档