问题:在这次RHCE考试中,使用图形化创建LVM时候不小心勾选了集群,结果出现以下错误:
pvcreate command failed. Command attempted: "/sbin/pvcreate -M 2 /dev/sda5" - System Error Message: Can‘t initialize physical volume "/dev/sda5" of volume group "clustered" without -ff
解决方法:
[[email protected] yum.repos.d]# vgs Skipping clustered volume group clustered [[email protected] yum.repos.d]# vgscan Reading all physical volumes. This may take a while... Skipping clustered volume group clustered
网上查找的资料
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.
根据说明我把/etc/lvm/lvm.conf中的locking_type = 1修改成了locking_type = 0,发现并未能解决问题
[[email protected] ~]# vgchange -c n vgo WARNING: Locking disabled. Be careful! This could corrupt your metadata. Volume group "vgo" not found [[email protected] ~]#
这时候想起了之前老师说的dd命令,于是
[[email protected] ~]# dd if=/dev/zero of=/dev/sda5 bs=1M count=16 16+0 records in 16+0 records out 16777216 bytes (17 MB) copied, 8.80356 s, 1.9 MB/s [[email protected] ~]#
问题成功解决!
#########公众号:w_caibao###########
与技术无关,与“宝宝”相连