WARNING: Duplicate VG name XXX: Existing XXX (created here) takes precedence over XXX
On one fine day , some issue got reported to you like "Duplicate VG name". You will think like, from where on earth you got this error. You thought, You have not added any VG with same name, moreover if you try so the LVM will not allow. Then how come there is a error called Duplicate VG. Well you have to go to flashback. Is there any DISK or LUN has been added to the server recently ? If yes, it would have been the cause of the problem. The LUN/DISK that have been added to the system recently has a duplicate LUN or having the LVM metadata on it, which is having the same VG name that is in our system. So in between if your server got rebooted, you'll get a similar kind of message as given below. We got the cause of the issue, now lets check out the solution.
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
On one fine day , some issue got reported to you like "Duplicate VG name". You will think like, from where on earth you got this error. You thought, You have not added any VG with same name, moreover if you try so the LVM will not allow. Then how come there is a error called Duplicate VG. Well you have to go to flashback. Is there any DISK or LUN has been added to the server recently ? If yes, it would have been the cause of the problem. The LUN/DISK that have been added to the system recently has a duplicate LUN or having the LVM metadata on it, which is having the same VG name that is in our system. So in between if your server got rebooted, you'll get a similar kind of message as given below. We got the cause of the issue, now lets check out the solution.
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
Solution: 1. Run a vgdisplay command.
Server1:/dev # vgdisplay
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
--- Volume group ---
VG Name test
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 45.00 GiB
PE Size 4.00 MiB
Total PE 11519
Alloc PE / Size 10496 / 41.00 GiB
Free PE / Size 1023 / 4.00 GiB
VG UUID f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
--- Volume group ---
VG Name test
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 45.00 GiB
PE Size 4.00 MiB
Total PE 11519
Alloc PE / Size 10496 / 41.00 GiB
Free PE / Size 1023 / 4.00 GiB
VG UUID h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
2. Now you'll find 2 VG's with same name, but with a different VG UUID.
3. Now unmount the related file system and deactivate the LV's.
umount /mountpoint
vgchange -an test
4. Though it'll not be required, but if required , You need to scan all disks for volume groups and rebuild caches:
# vgscan --mknodes
5. Now rename the VG.
Server1:/ # vgrename f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o unkntestvg
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd takes precedence over exported f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o<
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd takes precedence over exported f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd takes precedence over exported f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
Volume group "test" successfully renamed to "unkntestvg"
6. Now check the devices that is attached to the renamed VG.
Server1:/ # lvs -o +devices
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert Devices
lv_oracle unkntestvg -wi------ 40.00g /dev/sdau1(0)
lv_usrsap unkntestvg -wi------ 1.00g /dev/sdau1(10240)
7. Now activate LV's in both the VG's.
Server1:/ # vgchange -ay unkntestvg
2 logical volume(s) in volume group "unkntestvg" now active
Server1:/ #vgchange -ay test
2 logical volume(s) in volume group "test" now active
8. Now mount LV in both the VG. Check your data and take necessary steps.
/dev/mapper/test-lv_oracle 40G 15G 23G 40% /oracle
/dev/mapper/test-lv_usrsap 1008M 121M 836M 13% /usr/sap
/dev/mapper/unkntestvg-lv_oracle 40G 4.0G 34G 11% /mnt
/dev/mapper/unkntestvg-lv_usrsap 1008M 34M 924M 4% /mnt/usrsap
Server1:/dev # vgdisplay
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
--- Volume group ---
VG Name test
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 45.00 GiB
PE Size 4.00 MiB
Total PE 11519
Alloc PE / Size 10496 / 41.00 GiB
Free PE / Size 1023 / 4.00 GiB
VG UUID f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
--- Volume group ---
VG Name test
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 45.00 GiB
PE Size 4.00 MiB
Total PE 11519
Alloc PE / Size 10496 / 41.00 GiB
Free PE / Size 1023 / 4.00 GiB
VG UUID h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd (created here) takes precedence over f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
2. Now you'll find 2 VG's with same name, but with a different VG UUID.
3. Now unmount the related file system and deactivate the LV's.
umount /mountpoint
vgchange -an test
4. Though it'll not be required, but if required , You need to scan all disks for volume groups and rebuild caches:
# vgscan --mknodes
5. Now rename the VG.
Server1:/ # vgrename f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o unkntestvg
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd takes precedence over exported f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o<
WARNING: Duplicate VG name test: Existing h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd takes precedence over exported f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
WARNING: Duplicate VG name test: h02jwQ-g8xO-Ne4p-QUi4-8sfN-gnje-apKxSd takes precedence over exported f3STwh-t7CJ-4fh0-HNhE-xmPr-pzWg-Tqm05o
Volume group "test" successfully renamed to "unkntestvg"
6. Now check the devices that is attached to the renamed VG.
2. Now you'll find 2 VG's with same name, but with a different VG UUID.
3. Now unmount the related file system and deactivate the LV's.
No comments