LVM: Duplicate VG name VolGroup00

19,713

Solution 1

From the man page:-

"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".

...so for your case:-

vgrename zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 newvolgroupname

...will rename the volume group with ID zOuHvA-QTBR-wNPs-3GIQ-b2zQ-yOeH-2fBS87 to newvolgroupname.

Solution 2

Name

vgrename - rename a volume group Synopsis

vgrename [-A|--autobackup {y|n}] [-d|--debug] [-h|-?|--help] [-t|--test] [-v|--verbose] OldVolumeGroup{Path|Name|UUID} NewVolumeGroup{Path|Name} Description

vgrename renames an existing (see vgcreate(8)) volume group from OldVolumeGroup{Name|Path|UUID} to NewVolumeGroup{Name|Path}. All the Volume Groups visible to a system need to have different names. Otherwise many LVM2 commands will refuse to run or give warning messages.

This situation could arise when disks are moved between machines. If a disk is connected and it contains a Volume Group with the same name as the Volume Group containing your root filesystem the machine might not even boot correctly. However, the two Volume Groups should have different UUIDs (unless the disk was cloned) so you can rename one of the conflicting Volume Groups with vgrename.

Options

See lvm(8) for common options. Examples

Renames existing volume group vg02 to my_volume_group: vgrename /dev/vg02 /dev/my_volume_group

or

vgrename

vg02 my_volume_group

Changes the name of the Volume Group with UUID Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to VolGroup00_tmp:

vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4

VolGroup00_tmp

Link: http://linux.die.net/man/8/vgrename

... as for

  Volume group name cciss/c0d1 has invalid characters

/dev/cciss/c0d1 is not a VG, so you cannot rename it. This is a PV on which a VG is probably based.

Share:
19,713

Related videos on Youtube

에이바
Author by

에이바

Updated on September 18, 2022

Comments

  • 에이바
    에이바 almost 2 years

    I'm on a server that shows a duplicate VG name. How can I rename one of these VolGroups to get rid of this conflict?

    [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
    

    My quick attempt to re-name the VolGroup (could be doing this wrong...):

    [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]#
    

    Output of 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
    
  • mikebabcock
    mikebabcock almost 10 years
    Only the existing volume group can be renamed if a second conflicts though.
  • 에이바
    에이바 over 9 years
    What typically causes this issue?