我正在尝试使用Ansible安装一个3节点的GlusterFS集群,并且遇到了一些问题,试图设置后端存储。
我的当前设置由3个节点组成,每个节点除了主存储器(/dev/vda)外,还附加了一个10G磁盘(/dev/vdb)。
我正在尝试使用正式的gluster ansible-role (https://github.com/gluster/gluster-ansible-infra)来准备后端磁盘(/dev/vdb)。我的目标是:
我的剧本如下:
- hosts: all
become: True
roles:
- gluster.infra
vars:
gluster_infra_fw_state: disabled
gluster_infra_volume_groups:
vgname: 'storage_vg'
pvname: '/dev/vdb'
gluster_infra_thick_lvs:
vgname: 'storage_vg'
lvname: 'storage_lv'
gluster_infra_mount_devices:
path: '/mnt/brick'
vgname: 'storage_vg'
lv: 'storage_lv'如果出现以下错误,游戏手册将失败:
TASK [gluster.infra/roles/backend_setup : Group devices by volume group name, including existing devices] ******************************************************************
fatal: [gluster-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'str object' has no attribute 'vgname'\n\nThe error appears to be in '/root/.ansible/roles/gluster.infra/roles/backend_setup/tasks/get_vg_groupings.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Group devices by volume group name, including existing devices\n ^ here\n"}我在这里上传了完整的日志文件,https://paste.ubuntu.com/p/dGPD7KRPMF/
发布于 2019-09-03 07:12:44
有关如何解决此问题的详细信息,请参见以下内容:https://github.com/gluster/gluster-ansible-infra/issues/70
必须做一些改变才能使其发挥作用。
size变量需要在gluster_infra_thick_lvs下设置xfsprogs。这是我的工作手册。
---
- hosts: all
become: True
roles:
- gluster.infra
vars:
gluster_infra_fw_state: disabled
gluster_infra_volume_groups:
- vgname: 'storage_vg'
pvname: '/dev/vdb'
gluster_infra_thick_lvs:
- vgname: 'storage_vg'
lvname: 'storage_lv'
pvs: '/dev/vdb'
size: '100%FREE'
gluster_infra_mount_devices:
- path: '/mnt/brick'
vgname: 'storage_vg'
lvname: 'storage_lv'https://stackoverflow.com/questions/57752753
复制相似问题