在rhel下錯誤設定了lvm卷組叢集屬性的處理

StudyCow發表於2010-03-30

在rhel中使用vgchange命令,在非叢集環境將vg設定叢集屬性後,對vg的所有操作都出現"Skipping clustered volume group data"的提示,使用vgremove刪除都不可以,出現相同的提示:

[@more@]

:
[root@rhel54 ~]# vgchange -c y data

[root@rhel54 ~]# vgdisplay data
Skipping clustered volume group data

[root@rhel54 ~]# vgremove data
Skipping clustered volume group data
RedHat的官方說明如下:

However, a local volume group has been incorrectly set up as clustered, and there isnot a cluster set up for the locking, when unset the cluster flag is attempted to be removed, vgchange will print out

"Skipping cluster volume group."

In order to fix this, edit the /etc/lvm/lvm.conf file and set locking_type = 0. Then run the command vgchange -cn VolumeGroupName. After this, change the locking_type in the /etc/lvm/lvm.conf back to the

original value.

意思是修改lvm.conf檔案,將locking_type設定為0,再透過vgchange -c n命令修改為非叢集屬性,就可以操作了,最後將locking_type 還原為1:

[root@rhel54 ~]# vi /etc/lvm/lvm.conf
找到locking_type,設定為0:
# Type of locking to use. Defaults to local file-based locking (1).
# Turn locking off by setting to 0 (dangerous: risks metadata corruption
# if LVM2 commands get run concurrently).
# Type 2 uses the external shared library locking_library.
# Type 3 uses built-in clustered locking.
locking_type = 0

[root@rhel54 ~]# vgchange -c n data
WARNING: Locking disabled. Be careful! This could corrupt your metadata.
Volume group "data" successfully changed
[root@rhel54 ~]# vgdisplay data
WARNING: Locking disabled. Be careful! This could corrupt your metadata.
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 300.00 MB
PE Size 4.00 MB
Total PE 75
Alloc PE / Size 0 / 0
Free PE / Size 75 / 300.00 MB
VG UUID e0gfuE-5ugM-zqhT-fH1S-7FED-3X51-0DFGLp


最後記得將locking_type還原.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7839206/viewspace-1032457/,如需轉載,請註明出處,否則將追究法律責任。

相關文章