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:
parent
3f8a0f6657
commit
42730cffc4
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue