mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #986] Is there any way to check if data is mounted already? #547
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#547
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @soolaugust on GitHub (Mar 22, 2019).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/986
Hi,
I am trying to use s3fs-fuse docker image as init container in Kubernetes, as init container need to be completed status eventually. so is there any way to check if data is mounted already and stop s3fs-fuse process.
Any idea for this?
@soolaugust commented on GitHub (Mar 22, 2019):
I solved by using
mount | grep s3fs, current seems okay. If any better idea, please contact me. Thanks ❤️@kahing commented on GitHub (Mar 22, 2019):
There's also a
mountpointcommand@gaul commented on GitHub (Mar 25, 2019):
Does
-o nonemptyaddress this issue?@soolaugust commented on GitHub (Mar 25, 2019):
@kahing
mountpointis better, thx 👍@gaul
-o nonemptywill check if target directory is not empty. If not empty, will not mount. this is a little different from my situation, I need to check mount is successfully or not.@gaul commented on GitHub (Mar 25, 2019):
@soolaugust Would it help if s3fs had a mode that was similar to
-fbut only ran in background when the mount was successful?@soolaugust commented on GitHub (Mar 26, 2019):
@gaul I think this way would be helpful for other situations. As process in init container should exit eventually, so s3fs should exit instead of running in background in my situation.
@gaul commented on GitHub (Mar 26, 2019):
This is a bit tricky since s3fs should only check in the foreground for interactive terminals. When run headless, e.g., fstab, performing a network operation could stall the boot process. Maybe checking
isattysuffices?@kahing commented on GitHub (Mar 26, 2019):
Stalling the boot process is the right thing to do given that if you mount it in fstab you may need the data at boot time (or container start up time). NFS for instance has a bg mount option that you can adopt for the opposite behavior.
@soolaugust commented on GitHub (Mar 26, 2019):
Thanks, I will check those ideas :)