Menu Close
Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.3.2. 在叢集中建立卷冊群組
在叢集環境中,您可透過
vgcreate
指令來建立卷冊群組,就如同您在單獨的節點上建立它們一樣。
就預設值,透過 CLVM 在共享儲存裝置上所建立的卷冊群組能讓所有可存取該共享儲存裝置的電腦看見。不過您也可透過使用
vgcreate
指令的 -c n
選項來建立一個本機、只有叢集中的一個節點可看見的卷冊群組。
當在叢集環境中執行下列指令時,它會在指令被執行的節點上建立一個本機卷冊群組。這項指令會建立一個名為
vg1
並且包含著實體卷冊 /dev/sdd1
和 /dev/sde1
的本機卷冊。
vgcreate -c n vg1 /dev/sdd1 /dev/sde1
You can change whether an existing volume group is local or clustered with the
-c
option of the vgchange
command, which is described in 節 4.3.7, “更改卷冊群組的參數”.
您可透過
vgs
指令來檢查一個現有的卷冊群組是否是個叢集卷冊群組,若卷冊已在叢集中,這項指令便會顯示 c
屬性。下列指令顯示了卷冊群組 VolGroup00
和 testvg1
的屬性。在此範例中,我們可藉由 Attr
標頭下的 c
屬性來得知,VolGroup00
尚未被納入叢集中,而 testvg1
則已納入叢集中。
[root@doc-07]# 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
For more information on the
vgs
command, see 節 4.3.4, “顯示卷冊群組”節 4.9, “LVM 的自訂化回報”, and the vgs
man page.