aldy120 / s3-note

Note for Amazon S3
0 stars 0 forks source link

Mountpoint #37

Open aldy120 opened 1 year ago

aldy120 commented 1 year ago

https://aws.amazon.com/blogs/storage/the-inside-story-on-mountpoint-for-amazon-s3-a-high-performance-open-source-file-client/

Mountpoint is designed for large-scale analytics applications that read and generate large amounts of S3 data in parallel, but don’t require the ability to write to the middle of existing objects.

不適用於 append 資料。

For example, it doesn’t support writes in this first release, and in the future will only support sequential writes to new objects.

目前不支援寫入。且將來僅打算支援對新 object 的寫入。如果要共享的檔案空間,那還是考慮 Fsx 或 EFS 。 https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html

aldy120 commented 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
aldy120 commented 1 year ago

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
aldy120 commented 1 year ago

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 才行。