5.3.3. クラスター内でのボリュームグループ作成
vgcreate コマンドでクラスター環境内にボリュームグループを作成します。単一ノードでボリュームグループを作成する時と同様です。
By default, volume groups created with CLVM on shared storage are visible to all computers that have access to the shared storage. It is possible, however, to create volume groups that are local, visible only to one node in the cluster, by using the
-c n option of the vgcreate command.
クラスター環境内で以下のコマンドを実行すると、コマンドの実行元であるノードに対してローカルとなるボリュームグループが作成されます。このコマンドは、物理ボリュームである
/dev/sdd1 と /dev/sde1 を含むローカルボリューム vg1 を作成します。
# vgcreate -c n vg1 /dev/sdd1 /dev/sde1
既存のボリュームグループがクラスター化したボリュームグループであるかどうかは
vgs コマンドでチェックできます。ボリュームがクラスター化されている場合は、c 属性を表示します。以下のコマンドは VolGroup00と testvg1 のボリュームグループの属性を表示します。この例では、VolGroup00 はクラスター化されていませんが、testvg1 は、Attr 見出しの下にある c 属性が示すようにクラスター化されています。
# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 2 0 wz--n- 19.88G 0
testvg1 1 1 0 wz--nc 46.00G 8.00M