fstabにgoogysでObject Storageのマウントを記述する
目的
AWS S3やIBM Cloud Object Storageのバケットはs3fsやgoofysを使うことでファイルシステムのようにOS上にマウントすることができます。今回はgoofysを使い、OSをリブートしても自動でマウントされるよう、fstabに設定します。
手順
goofysのインストール
こちらが参考になります。AWS S3でもIBM Cloud Object Storageの場合でも同じです。
/etc/fstabの設定
手動での記述例
goofysは実際にインストールされてるパスを指定してください。環境変数風の表記は実際の値にしてください。
/etc/fstab
/usr/local/bin/goofys#${バケット名} ${マウントパス} fuse _netdev,allow_other,--profile=${プロファイル名} ,--uid=${UID},--gid=${GID},--dir-mode=0750,--file-mode=0640,--stat-cache-ttl=0,--type-cache-ttl=0,--endpoint=s3.private.jp-tok.cloud-object-storage.appdomain.cloud 0 0
Ansibleでの設定例
前述の/etc/fstabと同じ設定が入ります。
- name: Bucket is mounted
mount:
path: "{{ マウントパス }}"
src: /usr/local/bin/goofys#{{ バケット名 }}
fstype: fuse
opts: _netdev,allow_other,--profile={{ プロファイル名 }},--uid={{ UID }},--gid={{ GID }},--dir-mode=0750,--file-mode=0640,--stat-cache-ttl=0,--type-cache-ttl=0,--endpoint=s3.private.jp-tok.cloud-object-storage.appdomain.cloud
state: mounted
Author And Source
この問題について(fstabにgoogysでObject Storageのマウントを記述する), 我々は、より多くの情報をここで見つけました https://qiita.com/teruq/items/a6d55a1c433ef30a6dfa著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .