Show Table of Contents
13.8. GlusterFS ストレージプール
このセクションでは、GlusterFS ベースのストレージプールを有効にする方法について記載しています。Red Hat Enterprise Linux 6.5 には、GlusterFS を使った仮想マシン作成のネイティブサポートがあります。GlusterFS は FUSE を使用するユーザー領域のファイルシステムです。これがゲスト仮想マシンで有効にされると、KVM ホスト物理マシンは 1 つ以上の GlusterFS ストレージボリュームからゲスト仮想マシンのイメージを起動し、GlusterFS ストレージボリュームのイメージをゲスト仮想マシンのデータディスクとして使用できます。
13.8.1. virsh を使用した GlusterFS ストレージプールの作成
このセクションでは、Gluster サーバーとアクティブな Gluster ボリュームを準備する方法について説明します。
手順13.10 Gluster サーバーとアクティブな Gluster ボリュームの準備
- 次のコマンドを使って、状態を一覧表示し、Gluster サーバーの IP アドレスを取得します。
#
gluster volume statusStatus of volume: gluster-vol1 Gluster process Port Online Pid ------------------------------------------------------------------------------ Brick 222.111.222.111:/gluster-vol1 49155 Y 18634 Task Status of Volume gluster-vol1 ------------------------------------------------------------------------------ There are no active volume tasks - まだこれを実行していない場合は、glusterfs-fuse をインストールしてから virt_use_fusefs を有効にします。次に、以下のコマンドを実行して、Gluster サーバーに接続する 1 つのホストを用意します。
#
setsebool virt_use_fusefs on#getsebool virt_use_fusefsvirt_use_fusefs --> on pool typeをglusterに指定し、Gluster ストレージプール (以下の例では glusterfs-pool.xml) を設定するために新しい XML ファイルを作成し、以下のデータを追加します。<pool type='gluster'> <name>glusterfs-pool</name> <source> <host name='111.222.111.222'/> <dir path='/'/> <name>gluster-vol1</name> </source> </pool>
図13.24 GlusterFS XML ファイルの内容
- 次のコマンドを使って、Gluster プールを定義し、これを開始します。
#
virsh pool-define glusterfs-pool.xmlPool gluster-pool defined from glusterfs-pool.xml #virsh pool-list --allName State Autostart ----------------------------------------- gluster-pool inactive no #virsh pool-start gluster-poolPool gluster-pool started #virsh pool-list --allName State Autostart ----------------------------------------- gluster-pool active no #virsh vol-list gluster-poolName Path ----------------------------------------- qcow2.img gluster://111.222.111.222/gluster-vol1/qcow2.img raw.img gluster://111.222.111.222/gluster-vol1/raw.img
13.8.2. virsh を使用した GlusterFS ストレージプールの削除
このセクションでは、virsh を使ってストレージプールを削除する方法について詳しく説明します。
手順13.11 GlusterFS ストレージプールの削除
- 次のコマンドを使って、ストレージプールの状態を非アクティブに設定します。
#
virsh pool-destroy gluster-poolPool gluster-pool destroyed - 次のコマンドを使って、プールが非アクティブの状態であることを確認します。
#
virsh pool-list --allName State Autostart ----------------------------------------- gluster-pool inactive no - 次のコマンドを使って GlusterFS ストレージプールの定義を解除します。
#
virsh pool-undefine gluster-poolPool gluster-pool has been undefined - 次のコマンドを使ってプールの定義が解除されていることを確認します。
#
virsh pool-list --allName State Autostart -----------------------------------------

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.