I have created a LVM Pool based on XFS file system and have mounted the same to some location, say /xfspool/tmp. From my python code I need to find the size of LVM Array. I am trying to use the statvs() method from the os module to find the same.CODE: Here mount be equal to /xfspool/tmpstat = os.statvfs(mount)free = stat.f_bavail * stat.f_bsize       used = round ((poolSize - float(free)) / (1024*1024*1024),2) The os.statvs(mount) is giving the error PermissionError: [Errno 13] when it tries to access the mount point /xfspool/tmpIf manual permission is provided everything works fine.How to give the permission 755 to the mount point to avoid this problem ?I have tried using os.chmod(), including mkdir in the sudoers file and using mkdir -m=755 mount, nothing helped me.Please help me out here.My goal is to find the used space in XFS filesystem based LVM Array.P.S. From creating LVM Pool to finding the size, everything happens through program and no manual intervention can be done.
Find Used space in XFS filesystem based LVM Array
linux;filesystems;python;lvm;xfs