目的
IBM Cloud Object StorageはS3 APIに対応しています。API経由での操作は面倒なので、S3向けのマウントツールを使ってみます。ツールはs3fsより速いと有名なgoofysを使います。
手順
環境
IBM Cloudの仮想サーバでRedHat Enterprise Linux 7を選択。実際のバージョンは7.5。
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
Object StorageのオーダーとBucketの登録は済んでいる前提とします。
ツールのビルド
# yum -y install git golang fuse
# go get github.com/kahing/goofys
# go install github.com/kahing/goofys
credentialファイルの作成
~/.aws/credentials
aws_access_key_id = <ポータルで確認>
aws_secret_access_key = <ポータルで確認>
AWSではないんですけどね(苦笑)。
マウント
(例)
# 実際はお使いの環境に合わせてください
# ~/go/bin/goofys --endpoint https://s3.jp-tok.objectstorage.service.networklayer.com teruq-backup /mnt
--endpointでIBM Cloud Object Storageのエンドポイントを指定するところがポイントです。エンドポイントはポータルから確認してください。
書き込みテスト
# cd /mnt
# dd if=/dev/zero of=1G.dat bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 96.3054 s, 11.1 MB/s
速度は仕方ないですかね。
以上です。