重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
本篇文章为大家展示了如何解决lvm名称冲突,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
创新互联建站制作网站网页找三站合一网站制作公司,专注于网页设计,成都网站建设、成都做网站,网站设计,企业网站搭建,网站开发,建网站业务,680元做网站,已为上千余家服务,创新互联建站网站建设将一如既往的为我们的客户提供最优质的网站建设、网络营销推广服务!Red Hat Enterprise Linux Server release 7.3 (Maipo)
原磁盘vg名称rootvg:
[root@prod04 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 rootvg lvm2 a-- 49.51g 28.51g
[root@prod04 ~]# vgs -v
VG Attr Ext #PV #LV #SN VSize VFree VG UUID VProfile
rootvg wz--n- 4.00m 1 2 0 49.51g 28.51g jVhP2y-vMd5-u7lR-7F5C-rRTC-5cXn-cHkQkq
添加新磁盘,新磁盘的vg名称也是rootvg:
[root@prod04 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 rootvg lvm2 a-- 49.51g 28.51g
/dev/sdc2 rootvg lvm2 a-- 49.51g 28.51g
[root@prod04 ~]# vgs -v
Archiving volume group "rootvg" metadata (seqno 5).
Archiving volume group "rootvg" metadata (seqno 5).
Creating volume group backup "/etc/lvm/backup/rootvg" (seqno 5).
Cache: Duplicate VG name rootvg: Prefer existing WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu vs new jVhP2y-vMd5-u7lR-7F5C-rRTC-5cXn-cHkQkq
Archiving volume group "rootvg" metadata (seqno 5).
Archiving volume group "rootvg" metadata (seqno 5).
Creating volume group backup "/etc/lvm/backup/rootvg" (seqno 5).
VG Attr Ext #PV #LV #SN VSize VFree VG UUID VProfile
rootvg wz--n- 4.00m 1 2 0 49.51g 28.51g WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu
rootvg wz--n- 4.00m 1 2 0 49.51g 28.51g jVhP2y-vMd5-u7lR-7F5C-rRTC-5cXn-cHkQkq
对新添加磁盘vg进行名称更改:
[root@prod04 ~]# vgrename WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu rootvg01
Processing VG rootvg because of matching UUID WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu
Volume group "WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu" successfully renamed to "rootvg01"
[root@prod04 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rootvg 1 2 0 wz--n- 49.51g 28.51g
rootvg01 1 2 0 wz--n- 49.51g 28.51g
[root@prod04 ~]# vgs -v
VG Attr Ext #PV #LV #SN VSize VFree VG UUID VProfile
rootvg wz--n- 4.00m 1 2 0 49.51g 28.51g jVhP2y-vMd5-u7lR-7F5C-rRTC-5cXn-cHkQkq
rootvg01 wz--n- 4.00m 1 2 0 49.51g 28.51g WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu
激活vg:
[root@prod04 ~]# lvscan
inactive '/dev/rootvg01/swap' [1.00 GiB] inherit
inactive '/dev/rootvg01/root' [20.00 GiB] inherit
ACTIVE '/dev/rootvg/swap' [1.00 GiB] inherit
ACTIVE '/dev/rootvg/root' [20.00 GiB] inherit
[root@prod04 ~]# vgchange -ay rootvg01
2 logical volume(s) in volume group "rootvg01" now active
[root@prod04 ~]# lvscan
ACTIVE '/dev/rootvg01/swap' [1.00 GiB] inherit
ACTIVE '/dev/rootvg01/root' [20.00 GiB] inherit
ACTIVE '/dev/rootvg/swap' [1.00 GiB] inherit
ACTIVE '/dev/rootvg/root' [20.00 GiB] inherit
上述内容就是如何解决lvm名称冲突,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联-成都网站建设公司行业资讯频道。