Red Hat Bugzilla – Bug 823667
Implement an on-demand dump of lvmetad state
Last modified: 2013-02-21 03:10:06 EST
Probably achieved by a special client through a regular socket request (possibly a special request, not manual enumeration+iteration, to avoid inconsistent dumps). The state is embodied by the various hash tables in lvmetad_state, and their content is easily serialised using existing functionality in the daemon.
We want to call this in lvmdump to help with troubleshooting.
The idea is to have lvmdump provide info about the state of running lvmetad. This means the lvmdump tarball will contain a file (lvmetad.txt, or else, an exact name will be specified) which contains the state of the running lvmetad (i.e. a snapshot of each VG's metadata and of device states at the moment of lvmetad). The way to verify this would be probably to check content of lvmetad.txt against the "normal" metadata dumps, although they are not going to match entirely. Probably a comparison of some of the more important values.
Either way, upstream tests will cover this functionality.
The server side of this is implemented in a63b46bf36b22b83ff05f2d3529bc22a38ff56d3. We still need to adjust lvmdump.sh. I suggest the following code:
if type -p socat >& /dev/null; then
socat "unix-connect:$1" -
elif echo | nc -U "$1"; then
nc -U "$1"
echo "WARNING: Neither socat nor nc -U seems to be available." 1>&2
echo "# DUMP FAILED"
(echo 'request="dump"'; echo '##') | lvmetad_talk "$@"
(The same is used in lvmetad-dump.sh in the upstream test suite.)
Implemented the client side (lvmdump changes) in 4022fd3e79099fb22b2b7d3d6dca8de733a2a783. Running lvmdump -l should now include lvmetad.txt in the tarball, with a full dump of lvmetad state.
Running the command lvmdump -l does create a lvmetad.txt file, which upon a cursosry check/comparison with backed up metadada looks OK.
Marking it verified after basic testing/check based on Comment #6
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.