Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement statfs operation to report basic stats #710

Closed
lzw06061139 opened this issue Jan 23, 2024 · 4 comments
Closed

Implement statfs operation to report basic stats #710

lzw06061139 opened this issue Jan 23, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lzw06061139
Copy link

Mountpoint for Amazon S3 version

mount-s3 1.3.2(build from main branch)

AWS Region

No response

Describe the running environment

Running in a ubuntu server(Release:16.04, kernel:4.15.0-142-generic)

Mountpoint options

mount-s3  --region us-east-1 --endpoint-url {my-endpoint} --debug --debug-crt -l ~/ {my-bucket} {my-mountpoint}

What happened?

Successfully mounted {my-bucket} on {my-mountpoint},I can see the mounted filesystem by running commnd: cat /proc/mounts ,but running df -h can't report the mounted filesystem(others can be reported)

Relevant log output

No response

@lzw06061139 lzw06061139 added the bug Something isn't working label Jan 23, 2024
@monthonk
Copy link
Contributor

monthonk commented Jan 24, 2024

Hi @lzw06061139, thanks for reporting the issue. This is expected behavior because Mountpoint does not report file system stats to the kernel, so df -h would filter it out. However, you should still be able to see the mount by running df -a command.

I willl change this to feature request to implement statfs operation to report basic stats (https://docs.rs/fuser/latest/fuser/trait.Filesystem.html#method.statfs) so df -h would include Mountpoint in its output by default.

@monthonk monthonk added enhancement New feature or request and removed bug Something isn't working labels Jan 24, 2024
@monthonk monthonk changed the title df doesn't report mount-s3 mounted filesystem Implement statfs operation to report basic stats Jan 24, 2024
@lzw06061139
Copy link
Author

Hi @lzw06061139, thanks for reporting the issue. This is expected behavior because Mountpoint does not report file system stats to the kernel, so df -h would filter it out. However, you should still be able to see the mount by running df -a command.

I willl change this to feature request to implement statfs operation to report basic stats (https://docs.rs/fuser/latest/fuser/trait.Filesystem.html#method.statfs) so df -h would include Mountpoint in its output by default.

Thank you for your reply @monthonk . df -a can see the mount with zero disk space usage. By the way,when do you expect the new feature statfs will be implemented?

@monthonk
Copy link
Contributor

Sorry, we don't have any target date yet. But we will let you know in this thread once we have something to share.

@dannycjones dannycjones added the good first issue Good for newcomers label Jan 31, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 21, 2024
## Description of change
This PR adds support for calling `statfs` on virtual file system created
using mountpoint.
Some applications depend on the filesystem reporting non-zero available
space; currently mountpoint reports 0 as number of available blocks,
which can cause these applications to not work as expected.

This PR (building on #871) implements statfs with synthetic values
(4611686018427387904 free blocks).
For example, the DF output now is: 
```
mountpoint-s3  4611686018427387904        0 4611686018427387904   0% /local/home/chagem/mnt/bucket
```
Thus, checks for available space should no longer fail. 


Relevant issues: #710.  


### Does this change impact existing behavior?

This change impacts existing behaviour, as Mountpoint will report
non-zero value for total blocks, free blocks, free inodes and maximum
file name length.

### Does this change need a changelog entry?

Yes, addressed.

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).

---------

Signed-off-by: Christian Hagemeier <[email protected]>
@dannycjones
Copy link
Contributor

This was implemented in #1118 and released in Mountpoint v1.12.0! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants