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

在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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7839206/viewspace-1032457/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值