I am configuring the Red Hat cluster with pacemaker and I wanted to add a LVM resource. I have installed following packages,
OS: Red Hat 7.4
Packages Installed: lvm2-cluster, pacemaker, corosync, pcs, fence-agents-all
but my LVM resource have a failed state with following error:
[root@node1 ~]# pcs status
Cluster name: jcluster
WARNING: no stonith devices and stonith-enabled is not false
Stack: corosync
Current DC: node2 (version 1.1.16-12.el7_4.8-94ff4df) - partition with quorum
Last updated: Sat Mar 10 11:54:41 2018
Last change: Sat Mar 10 11:17:13 2018 by hacluster via cibadmin on node1
2 nodes configured
3 resources configured (2 DISABLED)
Online: [ node1 node2 ]
Full list of resources:
Clone Set: juris-clvmd-clone [juris-clvmd]
Stopped (disabled): [ node1 node2 ]
juris-lvm (ocf::heartbeat:LVM): FAILED node1
Failed Actions:
* juris-lvm_monitor_0 on node1 'unknown error' (1): call=15, status=complete, exitreason='WARNING: jurisvg is active without the cluster tag, "pacemaker"',
last-rc-change='Fri Mar 9 20:38:50 2018', queued=0ms, exec=255ms
* juris-lvm_monitor_10000 on node1 'unknown error' (1): call=16, status=complete, exitreason='WARNING: jurisvg is active without the cluster tag, "pacemaker"',
last-rc-change='Sat Mar 10 10:24:55 2018', queued=0ms, exec=0ms
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
I'm using the iscsi
to shared the disk for my both node. After i present the shared disk to the nodes, I have then create a pvcreate, vgcreate, lvcreate
for the new presented disk.
After that I change the new vg and I created to the clustered attribute using following command.
[root@node1 ~]# vgchange -cy jurisvg
/dev/jurisvg/ha_lv: read failed after 0 of 4096 at 0: Input/output error
/dev/jurisvg/ha_lv: read failed after 0 of 4096 at 53687025664: Input/output error
/dev/jurisvg/ha_lv: read failed after 0 of 4096 at 53687083008: Input/output error
/dev/jurisvg/ha_lv: read failed after 0 of 4096 at 4096: Input/output error
LVM cluster daemon (clvmd) is not running. Make volume group "jurisvg" clustered anyway? [y/n]: y
Volume group "jurisvg" successfully changed
For configuring the LVM resource, do we need a clvmd service running?
then for the pacemaker I can find the /usr/sbin/clvmd service but couldnt start it.
[root@node1 ~]# /usr/sbin/clvmd
clvmd could not connect to cluster manager
Consult syslog for more information
Is there anyone know why my LVM resource have that such an error and failed?
Best Answer
I have Fix my issue with the following step to create a LVM resource.
sdb
is my shared disk I represent from theiscsi
hosts.Then I created a new partition for
sdb
.Then I created physical volume, volume group and logical volume.
Create an ext4 file system on the logical volume cluster_lv.
After that I need to make an Exclusive activation for Volume group in a cluster, but before that I need to ensure that locking_type is set to
1
anduse_lvmetad
is set to0
in the/etc/lvm/lvm.conf
file. I use the following command to make the changes onlvm.conf
file to apply on both nodes.After that I need to make sure to add the volume groups other than my cluster
vg
as entries to volume_list in the/etc/lvm/lvm.con
f. I have made this changes on my both nodes.Rebuild the initramfs boot image to guarantee that the boot image will not try to activate a volume group controlled by the cluster. Also reboot is required after rebuild the initramfs.
Create the LVM resource
pcs status