本来应该要hdiskpower73属于vg_db2,hdiskpower144属于vg_db4,现在发现hdiskpower73hdiskpower144实际上好像是同一块盘,无法分别在两个VG里。

怎么解决?

[@more@]

问题现象

db176:/@root>#reducevg -d vg_db4 hdiskpower73

db176:/@root>#powermt remove dev=hdiskpower73

db176:/@root>#powermt remove dev=hdiskpower144

db176:/@root>#cfgmgr

db176:/@root>#powermt display

Symmetrix logical device count=180

CLARiiON logical device count=0

Hitachi logical device count=0

Invista logical device count=0

HP xp logical device count=0

Ess logical device count=0

HP HSx logical device count=0

==============================================================================

----- Host Bus Adapters --------- ------ I/O Paths ----- ------ Stats ------

### HW Path Summary Total Dead IO/Sec Q-IOs Errors

==============================================================================

0 fscsi0 optimal 332 0 - 0 0

1 fscsi2 optimal 332 0 - 0 0

2 fscsi4 optimal 332 0 - 0 0

3 fscsi5 optimal 332 0 - 0 0

db176:/@root>#extendvg vg_db2 hdiskpower73

0516-1398 extendvg: The physical volume hdiskpower73, appears to belong to

another volume group. Use the force option to add this physical volume

to a volume group.

0516-792 extendvg: Unable to extend volume group.

db176:/@root>#extendvg -f vg_db2 hdiskpower73

db176:/@root>#lsvg -p vg_db2

vg_db2:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdiskpower51 active 725 724 145..144..145..145..145

hdiskpower52 active 725 724 145..144..145..145..145

hdiskpower53 active 725 724 145..144..145..145..145

hdiskpower54 active 725 724 145..144..145..145..145

hdiskpower55 active 725 725 145..145..145..145..145

hdiskpower56 active 725 725 145..145..145..145..145

hdiskpower57 active 725 725 145..145..145..145..145

hdiskpower58 active 725 725 145..145..145..145..145

hdiskpower59 active 725 725 145..145..145..145..145

hdiskpower60 active 725 725 145..145..145..145..145

hdiskpower61 active 725 725 145..145..145..145..145

hdiskpower62 active 725 725 145..145..145..145..145

hdiskpower63 active 725 725 145..145..145..145..145

hdiskpower64 active 725 725 145..145..145..145..145

hdiskpower65 active 725 725 145..145..145..145..145

hdiskpower66 active 725 725 145..145..145..145..145

hdiskpower67 active 725 725 145..145..145..145..145

hdiskpower68 active 725 725 145..145..145..145..145

hdiskpower69 active 725 725 145..145..145..145..145

hdiskpower70 active 725 725 145..145..145..145..145

hdiskpower71 active 725 725 145..145..145..145..145

hdiskpower72 active 725 725 145..145..145..145..145

hdiskpower144 active 725 725 145..145..145..145..145

hdiskpower74 active 725 725 145..145..145..145..145

hdiskpower75 active 725 725 145..145..145..145..145

hdiskpower76 active 725 725 145..145..145..145..145

hdiskpower77 active 725 725 145..145..145..145..145

hdiskpower78 active 725 725 145..145..145..145..145

hdiskpower79 active 725 725 145..145..145..145..145

hdiskpower80 active 725 725 145..145..145..145..145

hdiskpower81 active 725 725 145..145..145..145..145

hdiskpower82 active 725 725 145..145..145..145..145

hdiskpower83 active 725 725 145..145..145..145..145

hdiskpower84 active 725 725 145..145..145..145..145

hdiskpower85 active 725 725 145..145..145..145..145

hdiskpower86 active 725 725 145..145..145..145..145

db176:/@root>#lspv hdiskpower73

PHYSICAL VOLUME: hdiskpower144 VOLUME GROUP: vg_db2

PV IDENTIFIER: 00c4b454e06cf223 VG IDENTIFIER 00c4b45400004c0000000120f125e3da

PV STATE: active

STALE PARTITIONS: 0 ALLOCATABLE: yes

PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0

TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1

FREE PPs: 725 (23200 megabytes) HOT SPARE: no

USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes

FREE DISTRIBUTION: 145..145..145..145..145

USED DISTRIBUTION: 00..00..00..00..00

db176:/@root>#lspv hdiskpower144

PHYSICAL VOLUME: hdiskpower144 VOLUME GROUP: vg_db2

PV IDENTIFIER: 00c4b454e06cf223 VG IDENTIFIER 00c4b45400004c0000000120f125e3da

PV STATE: active

STALE PARTITIONS: 0 ALLOCATABLE: yes

PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0

TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1

FREE PPs: 725 (23200 megabytes) HOT SPARE: no

USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes

FREE DISTRIBUTION: 145..145..145..145..145

USED DISTRIBUTION: 00..00..00..00..00

db176:/u01@root>#exportvg vg_db2

db176:/u01@root>#importvg -y vg_db2 hdiskpower73

0516-1791 redefinevg: lvm_rec for PV hdiskpower144 has VGID 00c4b45400004c0000000120f129b4dc (00c4b45400004c0000000120f125e3da expected)

errpt里的信息:

---------------------------------------------------------------------------
LABEL: LVM_QUORUMNOQUORUM
IDENTIFIER: 5BEAD71B

Date/Time: Mon May 4 21:36:37 BEIST 2009
Sequence Number: 62
Machine Id: 00C4B4544C00
Node Id: db176
Class: S
Type: INFO
Resource Name: LIBLVM

Description
Activation of a no quorum volume group with out 100% of the disks


Probable Causes
One or more physical volumes are not available and MISSINGPV_VARYON variable is on


Detail Data
MAJOR/MINOR DEVICE NUMBER
002C 0000
SENSE DATA
00C4 B454 0000 4C00 0000 0120 F125 E3DA 0000 0000 0000 0000 0000 0000 0000 0000
---------------------------------------------------------------------------

vg_db2

hdiskpower73VGID

hdiskpower73PVID变成和hdiskpower77一样了,hdiskpower77属于vg_db2

./chvgid.sh f125e3da hdiskpower73

cat > chvgid.sh

#!/usr/bin/ksh

vgid=$1

disk=$2

set -A a `echo $vgid|

awk '{

for (f=1; f

print "ibase=16nobase=8n"toupper(substr($0,f,2))

}

}'|bc 2>/dev/null`

/usr/bin/echo ""${a[0]}""${a[1]}""${a[2]}""${a[3]}"c"|dd bs=1 seek=3600 of=/dev/$disk

删掉hdiskpower73重新认

db176:/@root>#varyoffvg vg_db2

db176:/@root>#rmdev -dl hdiskpower73

hdiskpower73 deleted

db176:/@root>#cfgmgr

查看重新认回的PVID

db176:/@root>#lquerypv -h /dev/hdiskpower73

00000000 C9C2D4C1 00000000 00000000 00000000 |................|

00000010 00000000 00000000 00000000 00000000 |................|

00000020 00000000 00000000 00000000 00000000 |................|

00000030 00000000 00000000 00000000 00000000 |................|

00000040 00000000 00000000 00000000 00000000 |................|

00000050 00000000 00000000 00000000 00000000 |................|

00000060 00000000 00000000 00000000 00000000 |................|

00000070 00000000 00000000 00000000 00000000 |................|

00000080 00C4B454 E074AE5E 00000000 00000000 |...T.t.^........|

00000090 00000000 00000000 00000000 00000000 |................|

000000A0 00000000 00000000 00000000 00000000 |................|

000000B0 00000000 00000000 00000000 00000000 |................|

000000C0 00000000 00000000 00000000 00000000 |................|

000000D0 00000000 00000000 00000000 00000000 |................|

000000E0 00000000 00000000 00000000 00000000 |................|

000000F0 00000000 00000000 00000000 00000000 |................|

db176:/@root>#lquerypv -h /dev/hdiskpower77

00000000 C9C2D4C1 00000000 00000000 00000000 |................|

00000010 00000000 00000000 00000000 00000000 |................|

00000020 00000000 00000000 00000000 00000000 |................|

00000030 00000000 00000000 00000000 00000000 |................|

00000040 00000000 00000000 00000000 00000000 |................|

00000050 00000000 00000000 00000000 00000000 |................|

00000060 00000000 00000000 00000000 00000000 |................|

00000070 00000000 00000000 00000000 00000000 |................|

00000080 00C4B454 E074AE5E 00000000 00000000 |...T.t.^........|

00000090 00000000 00000000 00000000 00000000 |................|

000000A0 00000000 00000000 00000000 00000000 |................|

000000B0 00000000 00000000 00000000 00000000 |................|

000000C0 00000000 00000000 00000000 00000000 |................|

000000D0 00000000 00000000 00000000 00000000 |................|

000000E0 00000000 00000000 00000000 00000000 |................|

000000F0 00000000 00000000 00000000 00000000 |................|

发现hdiskpower73hdiskpower77PVID是一样的。

db176:/@root>#

db176:/@root>#chdev -l hdiskpower73 -a pv=clear

hdiskpower73 changed

db176:/@root>#lspv hdiskpower73

0516-304 : Unable to find device id hdiskpower73 in the Device

Configuration Database.

db176:/@root>#lquerypv -h /dev/hdiskpower73

00000000 C9C2D4C1 00000000 00000000 00000000 |................|

00000010 00000000 00000000 00000000 00000000 |................|

00000020 00000000 00000000 00000000 00000000 |................|

00000030 00000000 00000000 00000000 00000000 |................|

00000040 00000000 00000000 00000000 00000000 |................|

00000050 00000000 00000000 00000000 00000000 |................|

00000060 00000000 00000000 00000000 00000000 |................|

00000070 00000000 00000000 00000000 00000000 |................|

00000080 00000000 00000000 00000000 00000000 |................|

00000090 00000000 00000000 00000000 00000000 |................|

000000A0 00000000 00000000 00000000 00000000 |................|

000000B0 00000000 00000000 00000000 00000000 |................|

000000C0 00000000 00000000 00000000 00000000 |................|

000000D0 00000000 00000000 00000000 00000000 |................|

000000E0 00000000 00000000 00000000 00000000 |................|

000000F0 00000000 00000000 00000000 00000000 |................|

清除了hdiskpower73PVID

db176:/@root>#chdev -l hdiskpower73 -a pv=yes

hdiskpower73 changed

db176:/@root>#lquerypv -h /dev/hdiskpower73

00000000 C9C2D4C1 00000000 00000000 00000000 |................|

00000010 00000000 00000000 00000000 00000000 |................|

00000020 00000000 00000000 00000000 00000000 |................|

00000030 00000000 00000000 00000000 00000000 |................|

00000040 00000000 00000000 00000000 00000000 |................|

00000050 00000000 00000000 00000000 00000000 |................|

00000060 00000000 00000000 00000000 00000000 |................|

00000070 00000000 00000000 00000000 00000000 |................|

00000080 00C4B454 FE6F2375 00000000 00000000 |...T.o#u........|

00000090 00000000 00000000 00000000 00000000 |................|

000000A0 00000000 00000000 00000000 00000000 |................|

000000B0 00000000 00000000 00000000 00000000 |................|

000000C0 00000000 00000000 00000000 00000000 |................|

000000D0 00000000 00000000 00000000 00000000 |................|

000000E0 00000000 00000000 00000000 00000000 |................|

000000F0 00000000 00000000 00000000 00000000 |................|

重新认回新的PVID

db176:/@root>#varyonvg vg_db2

db176:/@root>#lspv hdiskpower73

0516-320 : Physical volume hdiskpower73 is not assigned to

a volume group.

db176:/@root>#lspv hdiskpower77

PHYSICAL VOLUME: hdiskpower77 VOLUME GROUP: vg_db2

PV IDENTIFIER: 00c4b454e074ae5e VG IDENTIFIER 00c4b45400004c0000000120f125e3da

PV STATE: active

STALE PARTITIONS: 0 ALLOCATABLE: yes

PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0

TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1

FREE PPs: 725 (23200 megabytes) HOT SPARE: no

USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes

FREE DISTRIBUTION: 145..145..145..145..145

USED DISTRIBUTION: 00..00..00..00..00

db176:/@root>#extendvg vg_db2 hdiskpower73

0516-1398 extendvg: The physical volume hdiskpower73, appears to belong to

another volume group. Use the force option to add this physical volume

to a volume group.

0516-792 extendvg: Unable to extend volume group.

db176:/@root>#extendvg -f vg_db2 hdiskpower73

db176:/@root>#lsvg -p vg_db2

vg_db2:

PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION

hdiskpower51 active 725 724 145..144..145..145..145

hdiskpower52 active 725 724 145..144..145..145..145

hdiskpower53 active 725 724 145..144..145..145..145

hdiskpower54 active 725 724 145..144..145..145..145

hdiskpower55 active 725 725 145..145..145..145..145

hdiskpower56 active 725 725 145..145..145..145..145

hdiskpower57 active 725 725 145..145..145..145..145

hdiskpower58 active 725 725 145..145..145..145..145

hdiskpower59 active 725 725 145..145..145..145..145

hdiskpower60 active 725 725 145..145..145..145..145

hdiskpower61 active 725 725 145..145..145..145..145

hdiskpower62 active 725 725 145..145..145..145..145

hdiskpower63 active 725 725 145..145..145..145..145

hdiskpower64 active 725 725 145..145..145..145..145

hdiskpower65 active 725 725 145..145..145..145..145

hdiskpower66 active 725 725 145..145..145..145..145

hdiskpower67 active 725 725 145..145..145..145..145

hdiskpower68 active 725 725 145..145..145..145..145

hdiskpower69 active 725 725 145..145..145..145..145

hdiskpower70 active 725 725 145..145..145..145..145

hdiskpower71 active 725 725 145..145..145..145..145

hdiskpower72 active 725 725 145..145..145..145..145

hdiskpower73 active 725 725 145..145..145..145..145

hdiskpower74 active 725 725 145..145..145..145..145

hdiskpower75 active 725 725 145..145..145..145..145

hdiskpower76 active 725 725 145..145..145..145..145

hdiskpower77 active 725 725 145..145..145..145..145

hdiskpower78 active 725 725 145..145..145..145..145

hdiskpower79 active 725 725 145..145..145..145..145

hdiskpower80 active 725 725 145..145..145..145..145

hdiskpower81 active 725 725 145..145..145..145..145

hdiskpower82 active 725 725 145..145..145..145..145

hdiskpower83 active 725 725 145..145..145..145..145

hdiskpower84 active 725 725 145..145..145..145..145

hdiskpower85 active 725 725 145..145..145..145..145

hdiskpower86 active 725 725 145..145..145..145..145

db176:/@root>#lspv hdiskpower73

PHYSICAL VOLUME: hdiskpower73 VOLUME GROUP: vg_db2

PV IDENTIFIER: 00c4b454fe6f2375 VG IDENTIFIER 00c4b45400004c0000000120f125e3da

PV STATE: active

STALE PARTITIONS: 0 ALLOCATABLE: yes

PP SIZE: 32 megabyte(s) LOGICAL VOLUMES: 0

TOTAL PPs: 725 (23200 megabytes) VG DESCRIPTORS: 1

FREE PPs: 725 (23200 megabytes) HOT SPARE: no

USED PPs: 0 (0 megabytes) MAX REQUEST: 256 kilobytes

FREE DISTRIBUTION: 145..145..145..145..145

USED DISTRIBUTION: 00..00..00..00..00

相关命令

lqueryvg -Atp hdiskpower73 vgda的信息

lquerypv -h /dev/hdiskpower73 80 10

disk上的pvid

readvgda VGDA

lqueryvg -AtP -p 看好盘坏盘

lquerypv PV信息

10-09 19:37