Skip to content

Commit

Permalink
api/lvm: add deactivate method to Volume class
Browse files Browse the repository at this point in the history
Simply calls lvchange -an to deactivate a logical volume.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 8087600)
  • Loading branch information
Jan Fajerski committed Feb 11, 2020
1 parent 3f8a4c0 commit 44b7312
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ceph-volume/ceph_volume/api/lvm.py
Expand Up @@ -998,6 +998,12 @@ def set_tag(self, key, value):
)
self.tags[key] = value

def deactivate(self):
"""
Deactivate the LV by calling lvchange -an
"""
process.call(['lvchange', '-an', self.lv_path])


class Volumes(list):
"""
Expand Down

0 comments on commit 44b7312

Please sign in to comment.