注釈
設定ファイルのデフォルトは、ディストリビューションにより異なります。これらの既存のセクションとオプションを編集するのではなく、追加する必要があるかもしれません。また、設定のスニペットにある 省略 (...) は、保持すべきデフォルトの設定オプションを意味します。
Object Storage のソースリポジトリーから /etc/swift/swift.conf ファイルを取得します。
# curl -o /etc/swift/swift.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/liberty
/etc/swift/swift.conf ファイルを編集し、以下の作業をすべて行います。
[swift-hash] セクションに、ハッシュパスのプレフィックスとサフィックスをお使いの環境に合わせて設定します。
[swift-hash]
...
swift_hash_path_suffix = HASH_PATH_SUFFIX
swift_hash_path_prefix = HASH_PATH_PREFIX
HASH_PATH_PREFIX と HASH_PATH_SUFFIX を一意な値で置き換えます。
警告
これらの値を秘密にしておきます。変更したり紛失したりしてはいけません。
[storage-policy:0] セクションで、デフォルトのストレージポリシーを設定します。
[storage-policy:0]
...
name = Policy-0
default = yes
各ストレージノードおよびプロキシーサービスを実行している追加ノードにおいて、swift.conf ファイルを /etc/swift ディレクトリーにコピーします。
すべてのノードにおいて、設定ディレクトリーに適切な所有権を設定します。
# chown -R root:swift /etc/swift
コントローラーノード、プロキシサービスを実行する全ノードにおいて、Object Storage プロキシーサービスと関連サービスを起動し、システム起動時に自動的に起動するよう設定します。
# systemctl enable openstack-swift-proxy.service memcached.service
# systemctl start openstack-swift-proxy.service memcached.service
ストレージノードにおいて、Object Storage サービスを起動し、システム起動時に自動的に起動するよう設定します。
# systemctl enable openstack-swift-account.service openstack-swift-account-auditor.service \
openstack-swift-account-reaper.service openstack-swift-account-replicator.service
# systemctl start openstack-swift-account.service openstack-swift-account-auditor.service \
openstack-swift-account-reaper.service openstack-swift-account-replicator.service
# systemctl enable openstack-swift-container.service \
openstack-swift-container-auditor.service openstack-swift-container-replicator.service \
openstack-swift-container-updater.service
# systemctl start openstack-swift-container.service \
openstack-swift-container-auditor.service openstack-swift-container-replicator.service \
openstack-swift-container-updater.service
# systemctl enable openstack-swift-object.service openstack-swift-object-auditor.service \
openstack-swift-object-replicator.service openstack-swift-object-updater.service
# systemctl start openstack-swift-object.service openstack-swift-object-auditor.service \
openstack-swift-object-replicator.service openstack-swift-object-updater.service
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.