您好,登录后才能下订单哦!
本篇文章为大家展示了如何解决lvm名称冲突,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
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名称冲突,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。