I mounted a 1TB object storage bucket (not aws s3) on my M2 Mac using s3fs. After the mount, I tried to cd into the mounted directory, and it was hanging for too long. Then I tried to umount the volume with umount <directory>
. It has been an hour now and I still wait for the command to complete. I am concerned if it will ever complete, or should I try some other method?
-
An alternative to mounting is to use the S3 APIs to communicate with the storage service. It is designed for block storage, not mounting.– John RotensteinCommented Mar 15 at 21:52
1 Answer
You have mount your root path of s3 bucket with your local path. which contains 1 TB size.
The best practice would if you want particular folder or object of s3 bucket then mount only that path to your local storage instead of whole s3 bucket. If you have s3 bucket like this:
test-bucket
sub_dir1/
...
sub_dir2/
...
and if you have use of only sub_dir2 then you should only mount sub_dir2 folder.
Use below s3fs command to mount s3 directory to you target path:
s3fs test-bucket/sub_dir2 /mnt/test-bucket -o allow_other -o endpoint=us-east-1 -o use_cache=/tmp -o multireq_max=5 -o nonempty
You can use this ansible role to setup s3fs and all it's related dependencies: https://galaxy.ansible.com/ui/standalone/roles/nileshgadgi/s3-sftp/