Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to resolve lvm name conflicts

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you how to solve lvm name conflicts, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can learn something.

Red Hat Enterprise Linux Server release 7.3 (Maipo)

Original disk vg name rootvg:

[root@prod04 ~] # pvs

PV VG Fmt Attr PSize PFree

/ dev/sda2 rootvg lvm2 a muri-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

Add a new disk whose vg name is also rootvg:

[root@prod04 ~] # pvs

PV VG Fmt Attr PSize PFree

/ dev/sda2 rootvg lvm2 a muri-49.51g 28.51g

/ dev/sdc2 rootvg lvm2 a muri-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 20 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

Change the name of the newly added disk 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 20 49.51g 28.51g WipQPA-8D8c-1vD6-0G7g-ScOz-S4hq-ZiEECu

Activate 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

The above content is how to resolve lvm name conflicts. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report