Open aldy120 opened 1 year ago
Amazon linux
sudo yum install fuse fuse-devel cmake3 clang-devel git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
git clone --recurse-submodules https://github.com/awslabs/mountpoint-s3.git
cd mountpoint-s3
cargo build --release
mkdir ~/mnt
mountpoint-s3/target/release/mount-s3 test-dub-12345678 ~/mnt
Ubuntu
wget https://s3.amazonaws.com/mountpoint-s3-release/latest/x86_64/mount-s3.deb
sudo apt-get install -y ./mount-s3.deb
mount-s3 wsdot-ferry wsdot-ferry
test-dub-12345678
mount-s3 test-dub-12345678 test-dub-12345678
指令測試
echo 'hi' > mounttest.txt
echo 'hi-2' >> mounttest.txt
-bash: mounttest.txt: Operation not permitted
rm mounttest.txt
-bash: mounttest.txt: Operation not permitted
https://github.com/awslabs/mountpoint-s3/blob/main/doc/CONFIGURATION.md#configuring-mountpoint-performance
可支援刪除
可使用 --prefix 2023/Files/
作為 mount 的 S3 prefix
可支援 access point, multi-region access point ,連 object lambda access point 都可以
Requester Pays 在 mount 的時候需要加額外參數 --requester-pays
Mounting 的時候可以用 --expected-bucket-owner
參數來確保 bucket owner account
若要刪除,在 mounting 的時候要加參數 --allow-delete
只有 mount 的人有權限存取,可以加入 --allow-other
或是 --allow-root
允許其他人參加。但是要先在 /etc/fuse.conf
裡面加上 user_allow_other 才行。
https://aws.amazon.com/blogs/storage/the-inside-story-on-mountpoint-for-amazon-s3-a-high-performance-open-source-file-client/
不適用於 append 資料。
如果要共享的檔案空間,且需要完整的 POSIX API ,那還是考慮 Fsx 或 EFS 比較好喔。 https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html