1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix get_fs_size for LVM filesystem

This commit is contained in:
Claude Dioudonnat 2018-05-08 15:52:28 +02:00 committed by Michael Scherer
parent 3f8a0f6657
commit 42730cffc4

View file

@ -307,8 +307,8 @@ class LVM(Filesystem):
def get_fs_size(self, dev):
cmd = self.module.get_bin_path('pvs', required=True)
_, size, _ = self.module.run_command([cmd, '--noheadings', '-o', 'pv_size', '--units', 'b', str(dev)], check_rc=True)
block_count = int(size[:-1]) # block size is 1
_, size, _ = self.module.run_command([cmd, '--noheadings', '-o', 'pv_size', '--units', 'b', '--nosuffix', str(dev)], check_rc=True)
block_count = int(size)
return block_count