Download - OpenStack超入門シリーズ Novaのディスク周りあれこれ
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Hewlett-Packard Company
クラウドチーフテクノロジストグループ
技術担当部長
真壁徹
OpenStack Compute(Nova)いまさら聞けないディスク周りの細かいところ
OpenStack超入門シリーズ
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.2
OpenStackでサーバーの操作するとき、オプションがいろいろ出てくるんだけど…
ちょっと細かすぎて伝わらない感じ~
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.3
当資料の目的と前提条件・環境
目的
• OpenStack Compute(Nova)のインスタンス操作パラメーターの「いまさら聞けない細かいところ」を理解する
• 「このパラメーターを選ぶと、こう動く」をイメージする
• イメージとボリュームの違い、使い分けを理解する
前提条件・環境
• HP Public Cloud
• Horizon GUI
• 2014/03/26時点
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.4
どこからブートするか、まずはそこからです
まあ、いつもの一番上で…
(他は、よく分かんないし)
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.5
まずは形式の違いから一言で 特徴
image Glanceへアップロードされたイメージ
インスタンス作成時のみ参照される。リードオンリー。
snapshot 実行中インスタンスのRoot領域から取得したイメージ
imageと形式は同じ。違いはGlance上の追加属性(取得元imageのUUIDなど)。
volume Cinder上のブータブルボリューム
永続化可能。インスタンス削除後もボリュームにデータが保持される。HAなどに応用可能。
volume snapshot Cinder上のブータブルボリュームのスナップショット
volumeのスナップショット。短時間で作成可能(実装にもよる)。
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.6
Glance
Image型 (Image、Snapshot)
Compute node
Ephemeral
Image
Instance
Snapshot
インスタンス作成時にコピー
Root、EphemeralともにInstance削除時に消える
Root
Cache
よく使われるImageはCacheにのっている確率が高く、インスタン
ス作成が速い
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.7
Cinder
Glance
Volume型 (Volume、Volume Snapshot)
Compute node
Ephemeral
Image
Instance
Snapshot ブータブル
ボリュームの作成
EphemeralはInstance削除時に消える
VolumeVolume
Snapshot
Cinder VolumeがRoot領域としてアタッチされる、
Instanceを削除してもデータは消えない
Compute node
Instance
Ephemeral
デタッチ後、他のCompute nodeにアタッチすればHA的な運用が可能
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.8
使い分けよう
• Image系使い捨てできるインスタンス。Immutable型と呼ぶと今風。数多く作るサーバーのマスター、コピー元として。
• Volume系停止時の状態を永続化・再現したいインスタンス。HA的運用が可能。
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.9
さて、インスタンスが起動しましたが
リブートとかリビルドとかターミネートとか、穏やかじゃない選択肢が多いねぇ
触らないでおこう
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.10
各オプション選択時の動き
オプション 動き
Soft Reboot Instance • OSに再起動のシグナルを送る
Hard Reboot Instance • 強制再起動• サーバーの電源OFF/ONと同様
Power Off Instance • OSにシャットダウンのシグナルを送る• インスタンス(VM)は消えずに残る
Rebuild Instance • インスタンスを作りなおす• IPアドレス (Floating含む) が維持される
Terminate Instance • インスタンスを削除する
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HP Restricted.11
補足事項
• インスタンスを動かしながらでもSnapshotの作成は可能
• しかし、永続化前のデータがメモリ上に残る可能性あり
• Volumeからブートとしている場合は警告が出る
• OSシャットダウンやsync、アプリ側の仕組みで永続化する
• Boot from volume snapshot (creates a new volume)を選択した場合、”delete on terminate”をチェックすると、作ったvolumeはインスタンスのterminate時に消える
• チェックしないと、volumeはterminateしても残る
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Thank You