autofs を使用した Google バケットのマウント

autofs を使用した Google バケットのマウント

autofsを使用して要求に応じてGCSバケットをマウントしようとしています。最も近い説明はSSHFSです。

mntpoint -fstype=fuse,allow_other :sshfs\#[email protected]\:

この例に従って、次のようにします。

mntpoint -fstype=fuse,allow_other :gcsfuse\#my-bucket\:

しかし、これは私には効果がなく、問題を引き起こす可能性があるエラーメッセージを表示する方法がわかりません。これは私のautofs設定です。

# grep "^#" -v /etc/auto.master
+dir:/etc/auto.master.d
+auto.master
# grep "^#" -v /etc/auto.master.d/mnt.autofs 
/mnt /etc/autofs/auto.mnt
# grep "^#" -v /etc/autofs/auto.mnt 
/- -fstype=fuse,allow_other,r :gcsfuse\#dfci-mev-def-12345-678\:

マウントは通常、次のように動作します。

gcsfuse -o allow_other my-bucket /mnt

GOOGLE_APPLICATION_CREDENTIAL環境変数でGoogleサービスアカウントの資格情報ファイルの場所を使用してください。

修正する

設定の空白をタブに変更し、いくつかの単純化を実行し、自動マウントの詳細な出力をオンにしました。これで設定は次のようになります。

# cat /etc/auto.master                                                                                                                                                                                                 
/mnt    /etc/auto.gcsfuse   --timeout=0 --ghost --verbose

# cat /etc/auto.gcsfuse 
dfci-mev-def-12345-678  -fstype=fuse,rw,allow_other :gcsfuse\#dfci-mev-def-12345-678

dfci-mev-def-12345-678は私のテストバケットです。これで/mntで見ることができます。フォルダのように見えます。 CDに入ろうとすると、「該当するファイルやディレクトリがありません」というメッセージが表示され、自動マウントの結果は次のようになります。

attempting to mount entry /mnt/dfci-mev-def-12345-678
>> gcsfuse takes exactly two arguments. Run `gcsfuse --help` for more info.
mount(generic): failed to mount gcsfuse#dfci-mev-def-12345-678 (type fuse) on /mnt/dfci-mev-def-12345-678
failed to mount /mnt/dfci-mev-def-12345-678
re-reading map for /mnt

アップデート2

何が起こっているのかはわかりますが、解決策はありません。 2番目の設定セットは、gcsfuseバケットとマウントポイントのパラメータの後のマウントオプションが気に入らず、チケットを開きました。https://github.com/GoogleCloudPlatform/gcsfuse/issues/216

ベストアンサー1

おすすめ記事