如何解决lvm名称冲突
本篇文章为大家展示了如何解决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名称冲突,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注编程网行业资讯频道。
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341