现在的位置: 首页 > 综合 > 正文

在rhel下错误设置了lvm卷组集群属性的处理

2019年08月02日 ⁄ 综合 ⁄ 共 1598字 ⁄ 字号 评论关闭

http://studycow.itpub.net/post/37461/498729

在rhel中使用vgchange命令,在非集群环境将vg设置集群属性后,对vg的所有操作都出现"Skipping clustered volume group data"的提示,使用vgremove删除都不可以,出现相同的提示:


:
[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还原.

抱歉!评论已关闭.