Skip to content

snapshot-resync-target-lvm.sh: disable devicesfile when calling lvm#59

Open
Nowa-Ammerlaan wants to merge 1 commit intoLINBIT:masterfrom
Nowa-Ammerlaan:master
Open

snapshot-resync-target-lvm.sh: disable devicesfile when calling lvm#59
Nowa-Ammerlaan wants to merge 1 commit intoLINBIT:masterfrom
Nowa-Ammerlaan:master

Conversation

@Nowa-Ammerlaan
Copy link
Copy Markdown

@Nowa-Ammerlaan Nowa-Ammerlaan commented Apr 9, 2026

In Red Hat 9+, the devices/use_devicesfile setting is enabled by default (=1). However when the devicesfile is enabled, the devices/filter and devices/global_filter are ineffective.

Running this command manually results in the following warning:

Please remove the lvm.conf filter, it is ignored with the devices

This has the unfortunate side-effect of triggering the hanging lvm commands that this filter is intending to avoid. We have seen on our machines that after a reboot drbd fails to connect. It claims there is a network error while in reality the lvm commands run in this script are hanging until a timeout occurs. Disabling the
devices/use_devicesfile setting (=0) in lvm.conf resolved this problem.

The DRBD-9 documentation makes no mention of the devices/use_devicesfile setting. It mentions the filter and global_filter, but with the Red Hat 9+ default setting of devices/use_devicesfile=1 neither of these settings is actually effective. The documentation does mention the devices/write_cache_state setting, but this setting was removed in lvm v2.03. I therefore feel the documentation might need to be updated.

This change works around the original problem we encountered by ensuring that the devices/use_devicesfile setting is disabled when running the lvm commands in the snapshot-resync-target-lvm.sh script. This works as an alternative to globally disabling the devicesfile in /etc/lvm/lvm.conf.

In Red Hat 9+, the devices/use_devicesfile setting is enabled by
default (=1). However when the devicesfile is enabled, the
devices/filter and devices/global_filter are ineffective.

Running this command manually results in the following warning:

> Please remove the lvm.conf filter, it is ignored with the devices

This has the unfortunate side-effect of triggering the hanging lvm
commands that this filter is intending to avoid. We have seen on our
machines that after a reboot drbd fails to connect. It claims there is
a network error while in reality the lvm commands run in this script
are hanging until a timeout occurs. Disabling the
devices/use_devicesfile setting (=0) in lvm.conf resolved this problem.

The DRBD-9 documentation makes no mention of the devices/use_devicesfile
setting. It mentions the filter and global_filter, but with the
Red Hat 9+ default setting of devices/use_devicesfile=1 neither of these
settings is actually effective. The documentation does mention the
devices/write_cache_state setting, but this setting was removed in
lvm v2.03. I therefore feel the documentation might need to be updated.

This change works around the original problem we encountered by
ensuring that the devices/use_devicesfile setting is disabled when
running the lvm commands in the snapshot-resync-target-lvm.sh script.
This works as an alternative to globally disabling the devicesfile in
/etc/lvm/lvm.conf.

Signed-off-by: Nowa Ammerlaan <nowa.ammerlaan@surf.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant