« Spectrum Scale - OpenStackへの扉 その1 | トップページ | Spectrum Scale - OpenStackへの扉 その3 »

2020年4月 3日 (金)

Spectrum Scale - OpenStackへの扉 その2

Objectアクセスをためしてみる

OpenStack上のユーザーuser1が無事作成出来た。
このuser1でObject Storageアクセスを試す。

まずはPolicyとしてunified01を作成する。
で、さっそくエラー。

root@s3group1 ~]# mmobj policy create unified01 --enable-file-access
mmobj policy create: The general file-access capability is not enabled.
Usage:
mmobj policy create PolicyName
[-f FilesetName] [-i MaxNumInodes]
{[--enable-compression --compression-schedule CompressionSchedule]}
{[--enable-expiration --expire-at ExpireAt | --expire-after ExpireAfter]}
{[--enable-encryption --encryption-keyfile [--force-rule-append]]}
[--enable-file-access] [--enable-multi-region] [--help]
mmobj policy create: Command failed. Examine previous error messages to determine cause.
[root@s3group1 ~]#
file-access capabilityがEnableになっていないと怒られた。

で、以下を実行。
[root@s3group1 ~]# mmobj file-access enable
[root@s3group1 ~]#
再試行。
[root@s3group1 ~]# mmobj policy create unified01 --enable-file-access
[I] Getting latest configuration from ccr
[I] Creating fileset gpfsfs01:obj_unified01
Attention: the specified maximum number of files (8000000) is too high.
The amount of available disk space allows for a maximum of 1224832 files.
[I] Creating new unique index and building the object rings
[I] Updating the configuration
[I] Uploading the changed configuration
[root@s3group1 ~]#
ちょっと教育的指導メッセージを頂いたが無事完了。policy listを確認する。
[root@s3group1 ~]# mmobj policy list

Index Name Default Deprecated Fileset Functions File System
-----------------------------------------------------------------------------------------------
0 policy-0 yes object_fileset gpfsfs01
17392004030 unified01 obj_unified01 file-and-object-access gpfsfs01
[root@s3group1 ~]#

ここからuser1にて作業を行う。
[root@s3group1 ~]# source openrc_user1
まずはbucketの作成をする。
[root@s3group1 ~]# swift post bucket01 --header "X-Storage-Policy:unified01"
確認。作成されているようだ。
[root@s3group1 ~]# swift list
bucket01
[root@s3group1 ~]#

保存するソースobjectを用意する。とりあえず手元にあったhostsファイルを使ってみる。
[root@s3group1 work]# cp hosts object01
このファイルobject01をバケットbucket01にアップロードしてみる。
[root@s3group1 work]# swift upload bucket01 object01
object01
上手くいったようだ。確認する。
[root@s3group1 work]# swift list bucket01
object01

今度はダウンロードしてみる。ダウンロード先としてtempを作成する。
[root@s3group1 work]# mkdir temp
[root@s3group1 work]# cd temp
[root@s3group1 temp]# swift download bucket01 object01 -o ~/work/temp/object01
object01 [auth 1.084s, headers 1.625s, total 1.625s, 0.001 MB/s]
[root@s3group1 temp]# ls
object01
[root@s3group1 temp]#
上手くいったようだ。

ではFile System上ではどうなっているのか。GPFS Mount Pointを覗いてみる。
[root@s3group1 /]# cd /gpfs/gpfsfs01
新しいディレクトリとしてobj_unified01が作成されている。unified設定する前のOBJ serviceをEnableした時に作られたディレクトリobject_filesetとは別のディレクトリ。作成したポリシー名はここに現れる。
[root@s3group1 gpfsfs01]# ls
ibmobjectizer nfs obj_unified01 object_fileset
このディレクトリの中を掘り込んでみる。
[root@s3group1 gpfsfs01]# ls obj_unified01
s17392004030z1device1
[root@s3group1 gpfsfs01]# ls obj_unified01/s17392004030z1device1
AUTH_b8f1a4a6c40d4e90bfc7a57ed09674bf
[root@s3group1 gpfsfs01]# ls obj_unified01/s17392004030z1device1/AUTH_b8f1a4a6c40d4e90bfc7a57ed09674bf
bucket01
[root@s3group1 gpfsfs01]# ls obj_unified01/s17392004030z1device1/AUTH_b8f1a4a6c40d4e90bfc7a57ed09674bf/bucket01 -l
合計 1
-rwxr-xr-x 1 user1 user1 334 4月 3 17:24 object01
[root@s3group1 gpfsfs01]#
今作成したバケットbucket01はここにある。

以上より、FileとObjectのUnifiedは出来上がった。FileとObjectでUnified Accessしたいファイル(オブジェクト)はこのバケットの下に置くことになるのか。。。。

« Spectrum Scale - OpenStackへの扉 その1 | トップページ | Spectrum Scale - OpenStackへの扉 その3 »

ソフトウエア導入」カテゴリの記事

コメント

コメントを書く

(ウェブ上には掲載しません)

« Spectrum Scale - OpenStackへの扉 その1 | トップページ | Spectrum Scale - OpenStackへの扉 その3 »