Database Support Blog

  • Oracle Cloud
2021.01.20

Storage GatewayでObject Storageを有効活用!~その1:モジュールインストール~

Oracle Cloud Infrastructure(以下、OCI)では、安価で拡張性のあるストレージサービスのObject Storageが提供されています。Object Storageはファイルの保存や共有に利用できますが、操作は管理コンソールやREST APIを利用することになります。
あまり慣れていないと大変ですよね? そのような時、Storage Gateway(無償で利用できるOCI専用ツール)を活用することで、あたかもローカルストレージを操作しているかのようにObject Storageを利用することができるようになるのです。

今回はStorage Gatewayを活用するための第一歩として、モジュールのインストール方法をご紹介します。


Storage Gatewayとは?

REST APIなどの設定なしにオンプレミス・クラウド問わずアプリケーションやサーバからOracle Cloud Infrastructure-Object Storageへのアクセスを可能とする接続ポイントです。
OCIのStorage Gatewayは、アクセス制御やユーザー認証、データパケットの暗号化などを利用した安全性の高いゲートウェイです。
Storage Gatewayのモジュールは無償で提供されており、Oracle Cloud Infrastructure - Compute VMやオンプレミスのサーバへインストールすることで利用できます。


Storage Gatewayの構成イメージ

オンプレミスのサーバやOCI上のサービス・インスタンスからStorage Gatewayを経由してObject Storageへ接続し、ファイルの保存などを行います。
ここからは、Storage GatewayをOCI上に構築する前提でご紹介していきます。


Storage Gateway サーバの要件

Storage Gatewayとして稼働させるサーバには、以下のような要件があります。
事前に要件を満たしているかどうかを確認してください。
Storage Gatewayのインストール要件詳細

(一例)
・メモリの最小要件:16GB以上(ファイルシステムの数に応じて別途要件あり)
・ディスク要件:600GB以上を推奨
・OS要件:Oracle Linux 7 UEKリリース4以降
・Docker要件:1.12.6以上

Oracle Cloud Infrastructure - Computeを利用すると、オンプレミスのハードウェアやソフトウェアを利用するより簡単に設定ができるのでおすすめです。


モジュール入手

まずは、Storage Gatewayのモジュールを入手しましょう。


1. 以下のURLへアクセスします

■モジュール取得用のURL
https://www.oracle.com/downloads/cloud/oci-storage-gateway-downloads.html


2. ダウンロードページが表示されます。「All Supported Platforms」を選択します。


3. ライセンスの同意を求めるポップアップが表示されます。チェックを入れて「Download xxxx」を選択します。

ダウンロードが開始されます。
※モジュールのダウンロードには、Oracleプロファイルの登録が必要です。


インストール

Storage GatewayをLinuxサーバへインストールします。


1. ダウンロードしたインストール・ファイルをサーバに配置し、展開します

  
 [root@oel7swg ocisg]# ls -ltr
 total 1073756
 -rw-r--r--. 1 opc opc 1099521503 Nov  2 07:39 ocisg-1.3.tar.gz
 [root@oel7swg ocisg]# tar -xvzf ocisg-1.3.tar.gz
 ocisg-1.3/
 ocisg-1.3/ocisg:1.3.tar
 ocisg-1.3/ocisg
 ocisg-1.3/ocisg-install.sh
 ocisg-1.3/ocisg-config.sh
 ocisg-1.3/helper-install-ocisg.sh
 ocisg-1.3/ocisg-control.sh
 ocisg-1.3/OCISG_README.txt
 ocisg-1.3/support-bundle.sh
 ocisg-1.3/health-check.sh
 ocisg-1.3/test-bandwidth.sh
 ocisg-1.3/connect-fs.sh
  

2. 展開したファイルのディレクトリへ移動し、インストールシェルを実行します

インストール中、インストールパスの確認などがあるため、必要な内容を入力します。
※インストールするOSの要件などによりWarningが発生する場合があります。
 Warninigの内容を確認の上必要に応じて対応してください。

 
 [root@oel7swg ocisg]# cd ocisg-1.3/
 [root@oel7swg ocisg-1.3]#
 [root@oel7swg ocisg-1.3]# ls -ltr
 total 2273956
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991      21456 Sep  6  2019 ocisg-install.sh
 -rw-r--r--. 1 oracle-cloud-agent-updater 991 2328410112 Sep  6  2019 ocisg:1.3.tar
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991      23525 Sep  6  2019 ocisg
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991       2298 Sep  6  2019 test-bandwidth.sh
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991       9800 Sep  6  2019 support-bundle.sh
 -rw-r--r--. 1 oracle-cloud-agent-updater 991        921 Sep  6  2019 OCISG_README.txt
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991      14941 Sep  6  2019 ocisg-control.sh
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991      17293 Sep  6  2019 ocisg-config.sh
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991       2252 Sep  6  2019 helper-install-ocisg.sh  ★インストールシェル
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991       2616 Sep  6  2019 health-check.sh
 -rwxr-xr-x. 1 oracle-cloud-agent-updater 991        617 Sep  6  2019 connect-fs.sh
 [root@oel7swg ocisg-1.3]#
 [root@oel7swg ocisg-1.3]# ./ocisg-install.sh -a
 Docker does not appear to be installed. Do you want to install docker engine with yum? [y/N] y 
                        --- Dockerが未インストールの場合に表示される。必要なので、”y”を入力
 Loaded plugins: langpacks, ulninfo
 ol7_UEKR6                                                                                                                                      | 2.8 kB  00:00:00
 ol7_addons                                                                                                                                     | 2.8 kB  00:00:00
 ol7_developer                                                                                                                                  | 2.8 kB  00:00:00
 ol7_developer_EPEL                                                                                                                             | 3.4 kB  00:00:00
 ol7_ksplice                                                                                                                                    | 2.8 kB  00:00:00
 ol7_latest                                                                                                                                     | 3.4 kB  00:00:00
 ol7_oci_included                                                                                                                               | 2.9 kB  00:00:00
 ol7_optional_latest                                                                                                                            | 2.8 kB  00:00:00
 ol7_software_collections                                                                                                                       | 2.8 kB  00:00:00
 (1/19): ol7_UEKR6/x86_64/primary_db                                                                                                            | 8.4 MB  00:00:00
 (2/19): ol7_UEKR6/x86_64/updateinfo                                                                                                            |  56 kB  00:00:00
 (3/19): ol7_developer_EPEL/x86_64/group_gz                                                                                                     |  87 kB  00:00:00
 (4/19): ol7_developer/x86_64/primary_db                                                                                                        | 658 kB  00:00:00
 (5/19): ol7_developer_EPEL/x86_64/updateinfo                                                                                                   | 6.3 kB  00:00:00
 
 <中略>
 
 Installed:
   docker-engine.x86_64 0:19.03.11.ol-6.el7
 
 Dependency Installed:
   container-selinux.noarch 2:2.119.2-1.911c772.el7_8  containerd.x86_64 0:1.2.14-1.0.1.el7  criu.x86_64 0:3.12-2.el7           docker-cli.x86_64 0:19.03.11.ol-6.el7
   libnet.x86_64 0:1.1.6-7.el7                         protobuf-c.x86_64 0:1.0.2-3.el7       runc.x86_64 0:1.0.0-67.rc10.el7_8
 
 Complete!
 Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
 Setting the devicemapper storage driver ...
 NFS server does not appear to be enabled. Do you want to enable NFS? [y/N] y
                        --- NFS serverが有効でない場合に表示される。必要なので、”y”を入力
 Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
 Checking that docker is installed and using the correct version
 Found docker version Docker version 19.03.11-ol, build 1f5403e
 
 <中略>
 
 *************************************
 Begin installation
 *************************************
 
 Enter the install location press enter for default (/opt/ocisg/) :
                        --- インストール・ディレクトリの確認。デフォルトの場合はそ未入力で進む
 Installing to destination /opt/ocisg/
 Copied install scripts
 Copied OCISG image
 Starting configuration script
 
 Enter the path for OCISG file system cache : /opt/ocisg/cache
 --- キャッシュディレクトリの確認。ディレクトリパスを入力し進む(ディレクトリ未作成の場合も入力すると作成してくれる)
 Warning: path /opt/ocisg/cache does not exist, creating.
 
 ================================================================================
 WARNING:
 Recommended MINIMUM space for file system cache is 500 GB. Specified file system cache path
 /opt/ocisg/cache (volume /dev/sda3), has capacity 39GB (30GB free).
 Low file system cache space can lead to performance problems and I/O errors.
 ================================================================================
 Would you like to proceed anyway ('Y' to proceed, 'N' to stop installation) (y/N) ? y
 
 Enter the path for OCISG metadata storage : /opt/ocisg/metadata
 --- メタデータ配置用ディレクトリの確認。ディレクトリパスを入力し進む(ディレクトリ未作成の場合も入力すると作成してくれる)
 Warning: path /opt/ocisg/metadata does not exist, creating.
 
 ================================================================================
 WARNING:
 Cache and metadata storage are on the SAME volume.
 It is recommended to have a SEPARATE volume for metadata storage.
 Recommended MINIMUM space for metadata storage is 80 GB.
 ================================================================================
 Would you like to proceed anyway ('Y' to proceed, 'N' to stop installation) (y/N) ? y
 
 Enter the path for OCISG log storage : /opt/ocisg/log
 --- ログ出力用ディレクトリの確認。ディレクトリパスを入力し進む(ディレクトリ未作成の場合も入力すると作成してくれる)
 Warning: path /opt/ocisg/log does not exist, creating.
 
 ================================================================================
 WARNING:
 Cache, Metadata, and log storage are on the SAME volume.
 It is recommended to have a SEPARATE volume for log storage.
 Recommended MINIMUM space for log storage is 20 GB.
 ================================================================================
 Would you like to proceed anyway ('Y' to proceed, 'N' to stop installation) (y/N) ? y 
                        --- インストール処理を実行するかの確認。”y”を入力
 Enter the docker network mode (host or bridge). (bridge)
 You could assign the port to used for NFS and UI or hit  to automatically select an unused port.
 Enter the host port to use for Administrative Web Interface (dynamic)
 Enter the host port to use for NFS access (dynamic)
 Enter the host port to use for optional HTTP REST service (dynamic)
 Writing configuration
 Importing image
 0a8af4fbe73a: Loading layer [==================================================>]  1.024kB/1.024kB
 fc9b318feb73: Loading layer [==================================================>]  235.2MB/235.2MB
 eed6b55ed364: Loading layer [==================================================>]  1.024kB/1.024kB
 81fc07d3636f: Loading layer [==================================================>]  1.024kB/1.024kB
 46d6ac3cd57d: Loading layer [==================================================>]  1.024kB/1.024kB
 
 <中略>
 
 3e1759d9a892: Loading layer [==================================================>]  90.74MB/90.74MB
 8ceaa1cc9d3b: Loading layer [==================================================>]  2.048kB/2.048kB
 ff3adf1ac705: Loading layer [==================================================>]  1.024kB/1.024kB
 Creating OCISG Volume with args -v /cloudsync/:/cloudsync/:shared -v /opt/ocisg/cache:/usr/share/oracle/ -v /opt/ocisg/metadata:/usr/share/oracle/system/ -v /opt/ocisg/log:/var/log/gateway
 Applying configuration file to container
 Starting OCISG [ocisg:1.3]
 Setting up config file port with nfs
 Setting up config file port with admin
 Setting up config file port with rest
 Management Console: https://oel7swg:32769
 If you have already configured an OCISG FileSystem via the Management Console,
 you can access the NFS share using the following port.
 
 NFS Port: 32770
 
 Example: mount -t nfs -o vers=4,port=32770 oel7swg:/ /local_mount_point
 

3. インストール・ディレクトリの状態を確認します

インストール中に入力したキャッシュやメタデータのディレクトリも作成されていることが確認できます。

 
 root@oel7swg ocisg]# ls -ltr /opt/ocisg/
 total 84
 -rwxr-xr-x. 1 root root 23525 Nov 28 01:37 ocisg
 -rwxr-xr-x. 1 root root 17293 Nov 28 01:37 ocisg-config.sh
 -rwxr-xr-x. 1 root root 14941 Nov 28 01:37 ocisg-control.sh
 -rw-r--r--. 1 root root   921 Nov 28 01:37 OCISG_README.txt
 -rwxr-xr-x. 1 root root  9800 Nov 28 01:37 support-bundle.sh
 -rwxr-xr-x. 1 root root  2616 Nov 28 01:37 health-check.sh
 drwxr-xr-x. 4 root root    53 Nov 28 01:42 cache
 drwxr-xr-x. 5 root root    91 Nov 28 01:42 metadata
 drwxr-xr-x. 4 root root  4096 Nov 28 01:42 log
 

まとめ

今回は、Storage Gatewayを利用するための事前準備を行いました。
次回は、実際にStorage Gatewayの設定を進めていきます。

Storage Gatewayを利用して、Object Storageを活用できる環境を作成していきましょう。


参考情報

Storage Gateway概要
https://docs.cloud.oracle.com/ja-jp/iaas/Content/StorageGateway/Concepts/storagegatewayoverview.htm


執筆者情報

いとう さやね プロフィール画像

2012年アシスト入社後、Oracle Databaseフィールドエンジニアに従事。2017年からはOracle Cloudを中心としたプリセールスおよびフィールド技術を担当。 ...show more


■本記事の内容について
 本記事に示した定義及び条件は変更される場合があります。あらかじめご了承ください。

■商標に関して
 ・Oracle®、Java、MySQL及びNetSuiteは、Oracle、その子会社及び関連会社の米国及びその他の国における登録商標です。
 ・Amazon Web Services、AWS、Powered by AWS ロゴ、[およびかかる資料で使用されるその他の AWS 商標] は、Amazon.com, Inc. またはその関連会社の商標です。
  文中の社名、商品名等は各社の商標または登録商標である場合があります。

関連している記事

  • Oracle Cloud
  • Oracle Database
2024.02.02

OCIにおけるOracle Database 11g R2、12g R1、12g R2の新規プロビジョニング終了とその影響

Oracle Databaseのバージョン11g R2、12g.R1、12g.R2は既にすべてのメーカーサポートが終了しています。OCIのBase Database Serviceでも2024年1月中旬ころから11g R2、12g R1、12g R2での新規プロビジョニングができなくなりました。

  • Oracle Cloud
2024.01.19

Oracle Cloudのサービスリミットを理解し、適切に対処する方法

Oracle Cloudでクラウドアカウントごとに設定されているサービスの利用上限値「サービス制限(サービスリミット)」の引上げ方法とその注意点をご紹介します。

  • Oracle Database
  • Oracle Cloud
2023.12.15

ライセンスの観点から考えるOracle Cloudのススメ

オラクル社が提供しているクラウドサービス「Oracle Cloud」は、Oracle Databaseライセンス観点でも様々な効果があることはご存じでしょうか? ここでは「ライセンス」に焦点をあて、Oracle Cloudがおススメできるポイントを説明します。

ページの先頭へ戻る