Applicable scenario
- Product:
ZCF - Component:
Cloud - Versions:
4.3.x, 3.8.x - Deployment topology: dual management nodes
- Trigger: Upgrade
sanlockto address stalledvgchangeand locks not automatically released after a storage failure.
Symptoms
vgchangestalls.- Locks are not automatically released after a storage failure.
- The underlying
sanlockcomponent and associated lock service require upgrade.
Determination method
- Confirm that physical-host and storage
pingintervals have been extended before upgrade. - After clearing lock processes, check whether
sanlockandlvmlockdprocesses have exited. - After upgrade, check that
sanlockis version3.8.xandvgsreturns normally.
Cause
The purpose of this change is to address stalled vgchange and unreleased locks in a SharedBlock scenario. Upgrade the underlying sanlock component one physical host at a time, strictly controlling lock-process state and automatic reconnection before and after the upgrade.
Resolution
- Preparation
- Risk level: high.
- Disable global VM HA.
- Set physical-host and storage
pingintervals to24h (86400s). - Upgrade one physical host at a time; do not process multiple physical hosts concurrently.
- Disable global VM HA.
- Expected result: HA is not triggered unexpectedly during maintenance.
- Set physical-host and storage
pingintervals to86400seconds in global configuration.
- Expected result: Automatic host reconnection does not overwrite the upgrade operation.
- Force-stop lock processes and verify:
pkill -9 sanlock && pkill -9 lvmlockd
ps -ef | grep -E "sanlock|lvmlockd"
- Expected result: Existing lock processes are cleared and the environment can enter the upgrade state.
- Upload the
sanlockRPM package to the target physical host.
- Expected result: The upgrade package is ready.
- Upgrade
sanlockon one physical host:
yum install ./sanlock*.rpm
- Expected result: The current node installs the new component version.
- Check the version:
rpm -qa | grep sanlock
- Expected result: The version is
3.8.x.
- Start and check services:
systemctl start sanlock.service
systemctl start lvm2-lvmlockd
systemctl status sanlock.service
systemctl status lvm2-lvmlockd
- Expected result: Lock services recover normally.
- Reconnect the physical host and check:
vgs
- Expected result:
vgsreturns normally and no longer stalls.
- After confirming one host, upgrade the remaining physical hosts in sequence.
- Restore the
pinginterval configuration after all upgrades complete. - Perform a full check:
vgspvs- Process check:
ps -ef | grep -E 'lvchange|lvcreate|lvrename|lvresize|lvextend|lvremove|lvs|vgs|pvs|vgchange'
- Service check:
systemctl status sanlock.service
systemctl status lvm2-lvmlockd
- Expected result: All physical hosts, lock services, and LVM-related processes recover normally.
- Enable global VM HA after confirming all resources are normal.
- Expected result: The upgrade process is complete.
Verification
sanlockis version3.8.x.vgsandpvsreturn normally.sanlockandlvm2-lvmlockdservice states are normal.- Hosts reconnect and service resources are normal.
Risks and rollback
- Risk: Upgrading the underlying lock component
sanlockdirectly affects SharedBlock service continuity. - Risk: If HA is not disabled or the
pinginterval is not extended before upgrade, automatic reconnection can interrupt the change. - Risk level: high.
- Rollback:
- Disable HA.
- Clear lock processes again.
- Run:
yum downgrade sanlock-3.8.3-1.el7.x86_64 sanlock-lib-3.8.3-1.el7.x86_64
- Restart
sanlock/lvm2-lvmlockdand check them. - Reconnect the physical host.
- Re-enable HA after resources are normal.
