您好,登錄后才能下訂單哦!
本篇文章為大家展示了如何解決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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。