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

在rhel中使用vgchange命令,在非集羣環境將vg設置集羣屬性後,對vg的全部操做都出現"Skipping clustered volume group data"的提示,使用vgremove刪除都不能夠,出現相同的提示:ide

[root@rhel54 ~]# vgchange -c y dataui

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

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

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 outip

"Skipping cluster volume group."rem

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 theget

original value.it

意思是修改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 = 0io

 

[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-0DFGLpclass

最後記得將locking_type還原.

相關文章
相關標籤/搜索