Skip to content

Commit

Permalink
CA-397084 Log any user of LV at deactivate
Browse files Browse the repository at this point in the history
In the extremely rare case that the LV is still in use when an attempt
is made to deactivate it, it would be helpful to know what has it open.

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
Tim Smith committed Aug 14, 2024
1 parent c74ea9c commit 794807a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/lvutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,13 @@ def deactivateNoRefcount(path):

@lvmretry
def _deactivate(path):
# Records what is using the LVM path in case there is an issue.
# In most cases this should be nothing.
try:
(rc, stdout, stderr) = util.doexec(['/usr/sbin/fuser', "-v", path])
util.SMlog(f"fuser {path} => {stdout}")
except:
pass
text = cmd_lvm([CMD_LVCHANGE, "-an", path])


Expand Down

0 comments on commit 794807a

Please sign in to comment.