データベース

データベース

ほとんどすべての OpenStack コンポーネントは、永続的な情報を保存するために内部でデータベースを使用しています。このデータベースは通常 MySQL です。通常の MySQL の管理方法がこれらのデータベースに適用できます。OpenStack は特別な方法でデータベースを設定しているわけではありません。基本的な管理として、パフォーマンス調整、高可用性、バックアップ、リカバリーおよび修理などがあります。さらなる情報は標準の MySQL 管理ガイドを参照してください。

より迅速に情報を取得したり、データ不整合のエラーを修正したりするために、データベースでいくつかの小技を実行できます。たとえば、インスタンスが終了していたが、データベースの状態が更新されていなかった、という状況です。こうした小技がこのドキュメント全体を通して議論されています。

データベース接続性

Review the component’s configuration file to see how each OpenStack component accesses its corresponding database. Look for a connection option. The following command uses grep to display the SQL connection string for nova, glance, cinder, and keystone:

# grep -hE "connection ?=" \
  /etc/nova/nova.conf /etc/glance/glance-*.conf \
  /etc/cinder/cinder.conf /etc/keystone/keystone.conf \
  /etc/neutron/neutron.conf
connection = mysql+pymysql://nova:password@cloud.example.com/nova
connection = mysql+pymysql://glance:password@cloud.example.com/glance
connection = mysql+pymysql://glance:password@cloud.example.com/glance
connection = mysql+pymysql://cinder:password@cloud.example.com/cinder
connection = mysql+pymysql://keystone:password@cloud.example.com/keystone
connection = mysql+pymysql://neutron:password@cloud.example.com/neutron

connection 文字列は以下の形式をとります。

mysql+pymysql:// <username> : <password> @ <hostname> / <database name>

パフォーマンスと最適化

クラウドが大きくなるにつれて、MySQL がさらに使用されてきます。MySQL がボトルネックになってきたことが疑われる場合、MySQL 最適化の調査から始めるとよいでしょう。MySQL のマニュアルでは、 Optimization Overview というセクションがあり、一つのセクション全部をあててこの話題を扱っています。

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.