statvfs api couldn't fetch files and free details for mounted path

Bvm 18
Bvm 18 used Ask the Experts™
on
Hi,

  I  tried to find the free space on mounted volume which is aws elastic filesystem. used statvfs api to find, but statvfs_obj.f_bavail and statvfs_obj.f_blocks are 13digit numbers, statvfs_obj.f_files and statvfs_obj.f_ffree are zeros.

  How to retrieve correct details from mounted aws efs on linux by using statvfs( mounted_filesys_path, &statvfs_struct_obj).  Th path looks like /mnt/efs_mounted_from_xx_city.

  OS: RHEL7.4,

  mount details:  nfs4, rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,noresvport,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=xxxx,local_lock=none,addr=xxxxx 0 0


Thanks,
Bvm
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorLinux/LXD/WordPress/Hosting Savant
Distinguished Expert 2018

Commented:
This is supremely difficult. Far more difficult than it should be.

https://iosutron.wordpress.com/tag/aws provides a very compact discussion of the related problems + one potential way to... approach a fix...
Commented:
I think, it's very difficult to find the source filesystem name from mounted path in generic(amazon, google, redhat, ... storages). So, ignored.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial