本篇文章为大家展示了如何解决lvm名称冲突,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
十载的龙里网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。全网整合营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整龙里建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“龙里网站设计”,“龙里网站推广”以来,每个客户项目都认真落实执行。
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名称冲突,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。