LVM:重複的 VG 名稱 VolGroup00
我在顯示重複 VG 名稱的伺服器上。如何重命名這些 VolGroup 之一以擺脫這種衝突?
[root@dev-server dev]# lvs WARNING: Duplicate VG name VolGroup00: zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc WARNING: Duplicate VG name VolGroup00: Existing zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc LV VG Attr LSize Origin Snap% Move Log Copy% Convert LogVol00 VolGroup00 -wi-ao 30.00G LogVol01 VolGroup00 -wi-ao 127.91G backup VolGroup00 -wi-ao 300.00G rman VolGroup00 -wi-ao 300.00G [root@dev-server dev]# pvs WARNING: Duplicate VG name VolGroup00: zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc WARNING: Duplicate VG name VolGroup00: Existing zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc WARNING: Duplicate VG name VolGroup00: Existing zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc PV VG Fmt Attr PSize PFree /dev/cciss/c0d0p2 VolGroup00 lvm2 a-- 1.64T 918.62G /dev/cciss/c0d1p1 VolGroup00 lvm2 a-- 3.27T 3.27T /dev/mpath/mpath0p2 VolGroup00 lvm2 a-- 405.88G 0 vgdisplay WARNING: Duplicate VG name VolGroup00: zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc WARNING: Duplicate VG name VolGroup00: Existing zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc WARNING: Duplicate VG name VolGroup00: Existing zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 405.88 GB PE Size 32.00 MB Total PE 12988 Alloc PE / Size 12988 / 405.88 GB Free PE / Size 0 / 0 VG UUID ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 9 VG Access read/write VG Status resizable MAX LV 0 Cur LV 4 Open LV 4 Max PV 0 Cur PV 2 Act PV 2 VG Size 4.91 TB PE Size 32.00 MB Total PE 160955 Alloc PE / Size 24253 / 757.91 GB Free PE / Size 136702 / 4.17 TB VG UUID zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87
我快速嘗試重命名 VolGroup(可能做錯了……):
[root@dev-server dev]# vgrename /dev/cciss/c0d1 /dev/VolGroup02 WARNING: Duplicate VG name VolGroup00: zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc WARNING: Duplicate VG name VolGroup00: Existing zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 (created here) takes precedence over ifDUDd-ePmZ-Er7H-xwst-70dY-hB3M-6YDNZc Volume group name cciss/c0d1 has invalid characters [root@dev-server dev]#
輸出
df -h
:Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 30G 17G 12G 59% / /dev/cciss/c0d0p1 99M 30M 65M 32% /boot tmpfs 63G 0 63G 0% /dev/shm /dev/mapper/VolGroup00-rman 296G 8.9G 272G 4% /rman/11g /dev/mapper/VolGroup00-backup 296G 34G 248G 12% /backup
從手冊頁: -
"vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 VolGroup00_tmp" changes the name of the Volume Group with UUID Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to "VolGroup00_tmp".
…所以對於您的情況:-
vgrename zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 newvolgroupname
…將 ID為 zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87的捲組重命名為newvolgroupname。
姓名
vgrename - 重命名卷組
虛擬名字
$$ -A|–autobackup {y|n} $$ $$ -d|–debug $$ $$ -h|-?|–help $$ $$ -t|–test $$ $$ -v|–verbose $$OldVolumeGroup{Path|Name|UUID} NewVolumeGroup{Path|Name} 描述 vgrename 將現有的(參見 vgcreate(8))卷組從 OldVolumeGroup{Name|Path|UUID} 重命名為 NewVolumeGroup{Name|Path}。系統可見的所有捲組都需要具有不同的名稱。否則許多 LVM2 命令將拒絕執行或給出警告消息。
當磁碟在機器之間移動時,可能會出現這種情況。如果磁碟已連接並且它包含與包含根文件系統的捲組同名的捲組,則機器甚至可能無法正確啟動。但是,兩個卷組應該具有不同的 UUID(除非磁碟被複製),因此您可以使用 vgrename 重命名衝突的捲組之一。
選項
有關常用選項,請參閱 lvm(8)。例子
將現有捲組 vg02 重命名為 my_volume_group:vgrename /dev/vg02 /dev/my_volume_group
或者
虛擬名字
vg02 my_volume_group
將 UUID Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 的捲組的名稱更改為 VolGroup00_tmp:
vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4
VolGroup00_tmp
連結: http: //linux.die.net/man/8/vgrename
……至於
Volume group name cciss/c0d1 has invalid characters
/dev/cciss/c0d1
不是VG,所以你不能重命名它。這是 VG 可能基於的 PV。