cluster HA LVM service fails beacuse of a bug

nanonettr

Member
Jul 25, 2015
17
0
21
Hello,

I was playing with proxmox cluster for active/passive SAN configuration using HA LVM and ext4.

I configured cluster.conf and lvm.conf but my service was not starting with error;
Code:
Sep 02 00:04:34 rgmanager Starting disabled service service:GlusterHA
Sep 02 00:04:35 rgmanager [lvm] HA LVM:  Improper setup detected
Sep 02 00:04:35 rgmanager [lvm] * initrd image needs to be newer than lvm.conf
Sep 02 00:04:35 rgmanager start on lvm "lvmSAS" returned 1 (generic error)
Sep 02 00:04:35 rgmanager #68: Failed to start service:GlusterHA; return value: 1
Sep 02 00:04:35 rgmanager Stopping service service:GlusterHA
Sep 02 00:04:35 rgmanager [ip] 10.0.0.81/24 is not configured
Sep 02 00:04:35 rgmanager [fs] unmounting /SANSAS
Sep 02 00:04:35 rgmanager [lvm] HA LVM:  Improper setup detected
Sep 02 00:04:35 rgmanager [lvm] * initrd image needs to be newer than lvm.conf
Sep 02 00:04:35 rgmanager [lvm] WARNING: An improper setup can cause data corruption!
Sep 02 00:04:35 rgmanager [lvm] Deactivating sansas/sansas01
Sep 02 00:04:35 rgmanager [lvm] Making resilient : lvchange -an sansas/sansas01
Sep 02 00:04:35 rgmanager [lvm] Resilient command: lvchange -an sansas/sansas01 --config devices{filter=["a|/dev/mapper/sasvol-part1|","a|/dev/mapper/saSep 02 00:04:36 rgmanager [lvm] Removing ownership tag (node01) from sansas/sansas01
Sep 02 00:04:36 rgmanager Service service:GlusterHA is recovering
Sep 02 00:04:36 rgmanager #71: Relocating failed service service:GlusterHA
Sep 02 00:04:36 rgmanager #70: Failed to relocate service:GlusterHA; restarting locally
Sep 02 00:04:36 rgmanager Recovering failed service service:GlusterHA
Sep 02 00:04:36 rgmanager [lvm] HA LVM:  Improper setup detected
Sep 02 00:04:36 rgmanager [lvm] * initrd image needs to be newer than lvm.conf
Sep 02 00:04:36 rgmanager start on lvm "lvmSAS" returned 1 (generic error)
Sep 02 00:04:36 rgmanager #68: Failed to start service:GlusterHA; return value: 1
Sep 02 00:04:36 rgmanager Stopping service service:GlusterHA
Sep 02 00:04:36 rgmanager [ip] 10.0.0.81/24 is not configured
Sep 02 00:04:36 rgmanager [fs] stop: Could not match /dev/mapper/sansas-sansas01 with a real device
Sep 02 00:04:36 rgmanager stop on fs "fsSAS" returned 2 (invalid argument(s))
Sep 02 00:04:36 rgmanager [lvm] HA LVM:  Improper setup detected
Sep 02 00:04:36 rgmanager [lvm] * initrd image needs to be newer than lvm.conf
Sep 02 00:04:36 rgmanager [lvm] WARNING: An improper setup can cause data corruption!
Sep 02 00:04:36 rgmanager [lvm] Deactivating sansas/sansas01
Sep 02 00:04:37 rgmanager [lvm] Making resilient : lvchange -an sansas/sansas01
Sep 02 00:04:37 rgmanager [lvm] Resilient command: lvchange -an sansas/sansas01 --config devices{filter=["a|/dev/mapper/sasvol-part1|","a|/dev/mapper/saSep 02 00:04:37 rgmanager [lvm] Removing ownership tag (node01) from sansas/sansas01
Sep 02 00:04:37 rgmanager #12: RG service:GlusterHA failed to stop; intervention required
Sep 02 00:04:37 rgmanager Service service:GlusterHA is failed
Sep 02 00:04:37 rgmanager #2: Service service:GlusterHA returned failure code.  Last Owner: node01
Sep 02 00:04:37 rgmanager #4: Administrator intervention required.

I updated initrd images again and rebooted but nothing changed.

After a bit debugging i found the failing command in "/usr/share/cluster/lvm.sh"
Code:
...
if [ "$(find /boot -name *.img -newer /etc/lvm/lvm.conf)" == "" ]; then
...

this command did not find my initrd images but some other files.
In default proxmox install the file naming "initrd.img-<VERSION>-pve".

So the correct command needs to be "find /boot -maxdepth 1 -name initrd.img*"

I wanted to report this, but where ?
is this a bug of Proxmox, RedHat or Debian ?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!