分类:
2011-02-14 16:11:26
I received an order to increase VG by additional vpath. So i tried it via smitty storage -> Volume Groups -> Add a Datapath Physical Volume to a Volume Group but this error message appeared:
Method error (/usr/lib/methods/chgvpath):
0514-047 Cannot access a device.
0516-1182 extendvg Open Failure on vpath12.
0516-792 extendvg: Unable to extend volume group.
Honestly i have seen this error for the first time so i was not sure what to do but my more experienced colleague helped – what i forgot was to look into errpt, where i could have found the source of trouble:
---------------------------------------------------------------------------
LABEL: VPATH_RESV_CFLICT
IDENTIFIER: 72206E77
Date/Time: Thu May 3 12:03:24 DFT
Sequence Number: 17572
Machine Id: 00530F7A4C00
Node Id: dom
Class: H
Type: PEND
Resource Name: vpath12
Resource Class: disk
Resource Type: vpath
Location:
Description
REQUESTED OPERATION CANNOT BE PERFORMED
Probable Causes
SOFTWARE PROGRAM
Failure Causes
DEVICE LOCKED BY ANOTHER USER
Recommended Actions
RELEASE DEVICE PERSISTENT RESERVATION
Detail Data
SENSE DATA
0000 0031 8000 0028 0000 000C 0000 0001 0000 0000 0000 0000 0000 000C
Device locked by another user? What? Ok, there is a command that solves this cause, it's a low level command lquerypr. The problem here was that the PV has been previously assigned in some of the VGs (possibly on some other host) and got assigned a host key that didn't match with the new VG so it has to be cleaned in 3. steps:
# lquerypr -Vh /dev/vpath12
open device /dev/vpath12
setkey.compcode = 0
setkey.returncode = 1
c70d8d05
Reserved with different key c70d8d05, current host key 530f7a01
# lquerypr -Vph /dev/vpath12
open device /dev/vpath12
setkey.compcode = 0
setkey.returncode = 0
c70d8d05
Reserved with different key c70d8d05, current host key 530f7a01
# lquerypr -Vh /dev/vpath12
open device /dev/vpath12
setkey.compcode = 0
setkey.returncode = 0
Not reserved.
The first command will show the reservation, second (added the -p switch) will clean the reservation and third will show that the reservation has been cleaned. Now the vpath is ready to be assigned to new VG without trouble.