WARNING: Duplicate VG name VolGroup故障处理

今天同事安装操作系统出现了一个奇怪的问题,借助网友提供的方案解决了它,特此转发作为一个问题记录,积累了经验。
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
265G 9.4G 242G 4% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 7.9G 0 7.9G 0% /dev/shm
[root@localhost ~]# fdisk -l
Disk /dev/sda: 300.0 GB, 300000000000 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 36472 292856917+ 8e Linux LVM
Disk /dev/sdb: 300.0 GB, 300000000000 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn’t contain a valid partition table
Disk /dev/sdc: 300.0 GB, 300000000000 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 36404 292415098+ 83 Linux

[root@localhost ~]# vgdisplay
WARNING: Duplicate VG name VolGroup00: Existing DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D (created here) takes precedence over RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu
WARNING: Duplicate VG name VolGroup00: Existing DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D (created here) takes precedence over RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu
WARNING: Duplicate VG name VolGroup00: Existing RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu (created here) takes precedence over DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D
Couldn’t find device with uuid ‘ly1rfp-OwP8-hErB-frpG-3dUI-Xm81-w5e2VH’.
— 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 2
Max PV 0
Cur PV 2
Act PV 1
VG Size 557.59 GB
PE Size 32.00 MB
Total PE 17843
Alloc PE / Size 17843 / 557.59 GB
Free PE / Size 0 / 0
VG UUID RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu

WARNING: Duplicate VG name VolGroup00: Existing DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D (created here) takes precedence over RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 279.28 GB
PE Size 32.00 MB
Total PE 8937
Alloc PE / Size 8937 / 279.28 GB
Free PE / Size 0 / 0
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# vgdisplay VolGroup00
WARNING: Duplicate VG name VolGroup00: Existing DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D (created here) takes precedence over RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 279.28 GB
PE Size 32.00 MB
Total PE 8937
Alloc PE / Size 8937 / 279.28 GB
Free PE / Size 0 / 0
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# pvs
WARNING: Duplicate VG name VolGroup00: Existing DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D (created here) takes precedence over RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu
Couldn’t find device with uuid ‘ly1rfp-OwP8-hErB-frpG-3dUI-Xm81-w5e2VH’.
WARNING: Duplicate VG name VolGroup00: Existing DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D (created here) takes precedence over RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu
Couldn’t find device with uuid ‘ly1rfp-OwP8-hErB-frpG-3dUI-Xm81-w5e2VH’.
Couldn’t find device with uuid ‘ly1rfp-OwP8-hErB-frpG-3dUI-Xm81-w5e2VH’.
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 279.28G 0
/dev/sdb1 VolGroup00 lvm2 a- 278.84G 0
unknown device VolGroup00 lvm2 a- 278.75G 0
[root@localhost ~]# pvremove -ff /dev/sdb1
WARNING: Duplicate VG name VolGroup00: Existing RRuDfr-oVRx-stg9-FEWE-tDiO-IaWz-mzf6Wu (created here) takes precedence over DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D
Couldn’t find device with uuid ‘ly1rfp-OwP8-hErB-frpG-3dUI-Xm81-w5e2VH’.
Really WIPE LABELS from physical volume “/dev/sdb1” of volume group “VolGroup00” [y/n]? y
WARNING: Wiping physical volume label from /dev/sdb1 of volume group “VolGroup00”
Labels on physical volume “/dev/sdb1” successfully wiped
[root@localhost ~]# pvremove -ff /dev/sdc1
No physical volume label read from /dev/sdc1
Labels on physical volume “/dev/sdc1” successfully wiped
[root@localhost ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 279.28 GB
PE Size 32.00 MB
Total PE 8937
Alloc PE / Size 8937 / 279.28 GB
Free PE / Size 0 / 0
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 279.28G 0
[root@localhost ~]# pvdisplay
— Physical volume —
PV Name /dev/sda2
VG Name VolGroup00
PV Size 279.29 GB / not usable 9.08 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 8937
Free PE 0
Allocated PE 8937
PV UUID 1aI0yo-TdQq-kkdY-effq-YBWu-Gefw-wLH6tC

[root@localhost ~]# pvcreate /dev/sdb1
pvs
vgdisplay
pvcreate /dev/sdc1
vgdisplay
Physical volume “/dev/sdb1” successfully created
[root@localhost ~]# pvs
vgextend VolGroup00 /dev/sdb1
vgextend VolGroup00 /dev/sdc1
vgdisplay
lvresize -L +558G /dev//VolGroup00/LogVol00
vgdisplay
lvresize -L +768M /dev//VolGroup00/LogVol00
vgdisplay PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 279.28G 0
/dev/sdb1 lvm2 – 279.39G 279.39G
[root@localhost ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 279.28 GB
PE Size 32.00 MB
Total PE 8937
Alloc PE / Size 8937 / 279.28 GB
Free PE / Size 0 / 0
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# pvcreate /dev/sdc1
Physical volume “/dev/sdc1” successfully created
[root@localhost ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 279.28 GB
PE Size 32.00 MB
Total PE 8937
Alloc PE / Size 8937 / 279.28 GB
Free PE / Size 0 / 0
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# vgextend VolGroup00 /dev/sdb1
Volume group “VolGroup00” successfully extended
[root@localhost ~]# vgextend VolGroup00 /dev/sdc1
Volume group “VolGroup00” successfully extended
[root@localhost ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 3
Act PV 3
VG Size 838.03 GB
PE Size 32.00 MB
Total PE 26817
Alloc PE / Size 8937 / 279.28 GB
Free PE / Size 17880 / 558.75 GB
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# lvresize -L +558G /dev//VolGroup00/LogVol00
Extending logical volume LogVol00 to 831.47 GB
Logical volume LogVol00 successfully resized
[root@localhost ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 3
Act PV 3
VG Size 838.03 GB
PE Size 32.00 MB
Total PE 26817
Alloc PE / Size 26793 / 837.28 GB
Free PE / Size 24 / 768.00 MB
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# lvresize -L +768M /dev//VolGroup00/LogVol00
Extending logical volume LogVol00 to 832.22 GB
Logical volume LogVol00 successfully resized
[root@localhost ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 3
Act PV 3
VG Size 838.03 GB
PE Size 32.00 MB
Total PE 26817
Alloc PE / Size 26817 / 838.03 GB
Free PE / Size 0 / 0
VG UUID DNcBFY-oAjY-PfDb-SCmI-uxhi-Z2Vd-tdKO4D

[root@localhost ~]# resize2fs /dev/mapper/VolGroup00-LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/VolGroup00-LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/mapper/VolGroup00-LogVol00 to 218161152 (4k) blocks.
The filesystem on /dev/mapper/VolGroup00-LogVol00 is now 218161152 blocks long.
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
807G 2.5G 763G 1% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 7.9G 0 7.9G 0% /dev/shm
[root@localhost ~]#

说明:pvremove指令:删除指定物理卷
【语 法】pvremove [选项] [参数]
【功能介绍】pvremove指令用于删除一个存在的物理卷。
【选项说明】
选 项
功 能
-d
调试模式
-f
强制删除
-y
对提问回答“yes”
【参数说明】
参 数
功 能
物理卷
指定要删除的物理卷对应的设备文件名
【经验技巧】使用pvremove指令删除物理卷时,它将LVM分区上的物理卷信息删除,使其不再被视为一个物理卷

你可能感兴趣的:(linux,故障)