Operating System - HP-UX
1833776 Members
2274 Online
110063 Solutions
New Discussion

vgdisplay shows error after mirrored disk replacement

 
SOLVED
Go to solution
Franky Leeuwerck_1
Regular Advisor

vgdisplay shows error after mirrored disk replacement

Hello,

On our HP-UX with a DBMS running, we recently had a disk failure (one of a mirrored volume).

We stopped the dialogd for avoiding a full /var dir. We could only replace the disk after a week.

Finally, the bad disk got replaced without problems. The HP-UX was rebooted and the DBMS is up and running.

The ioscan -fnC disk shows that the disk (disk 6) is CLAIMED, however vgdisplay of the corresponding volumegroup still shows some errors.

Is this because the diagnostics is not started yet, or is there another action to be taken after a disk replacement to update the systems information.

Below, you'll find the output of ioscan and vgdisplay.

Franky

vgdisplay -v /dev/vg01
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c4t6d0":
The specified path does not correspond to physical volume attached to this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c4t6d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
...etcetera .. a number of same messages ..
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 3
Open LV 3
Max PV 16
Cur PV 4
Act PV 3
Max PE per PV 2171
VGDA 6
PE Size (Mbytes) 4
Total PE 6510
Alloc PE 6170
Free PE 340
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 3000
Used PV 2

LV Name /dev/vg01/lvol2
LV Status available/stale
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 3000
Used PV 1

LV Name /dev/vg01/lvol3
LV Status available/stale
LV Size (Mbytes) 4000
Current LE 1000
Allocated PE 2000
Used PV 3


--- Physical volumes ---
PV Name /dev/dsk/c1t6d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On

PV Name /dev/dsk/c1t5d0
PV Status available
Total PE 2170
Free PE 0
Autoswitch On

PV Name /dev/dsk/c4t5d0
PV Status available
Total PE 2170
Free PE 340
Autoswitch On



ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 8/12.5.0 sdisk CLAIMED DEVICE SEAGATE ST39175LC
/dev/dsk/c1t5d0 /dev/rdsk/c1t5d0
disk 1 8/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c1t6d0 /dev/rdsk/c1t6d0
disk 2 8/16/5.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 6x/32x
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 3 8/16/5.5.0 sdisk CLAIMED DEVICE SEAGATE ST39173N
/dev/dsk/c2t5d0 /dev/rdsk/c2t5d0
disk 4 8/16/5.6.0 sdisk CLAIMED DEVICE SEAGATE ST39175LW
/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0
disk 5 10/12.5.0 sdisk CLAIMED DEVICE SEAGATE ST39236LC
/dev/dsk/c4t5d0 /dev/rdsk/c4t5d0
disk 6 10/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c4t6d0 /dev/rdsk/c4t6d0
16 REPLIES 16
Franky Leeuwerck_1
Regular Advisor

Re: vgdisplay shows error after mirrored disk replacement

The pvdisplay of the replaced disk looks like :

pvdisplay /dev/dsk/c4t5d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c4t6d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
--- Physical volumes ---
PV Name /dev/dsk/c4t5d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c4t6d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
VG Name /dev/vg01
PV Status available
Allocatable yes
VGDA 2
Cur LV 2
PE Size (Mbytes) 4
Total PE 2170
Free PE 340
Allocated PE 1830
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Fabio Ettore
Honored Contributor

Re: vgdisplay shows error after mirrored disk replacement

Hi,

the first thing to check is LVM configuration:

# strings /etc/lvmtab

Is /dev/dsk/c4t6d0 there?
If no then

# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -v

and then re-try vgdisplay.

I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!
Jeroen Peereboom
Honored Contributor
Solution

Re: vgdisplay shows error after mirrored disk replacement

Franky Leeuwerck_1
Regular Advisor

Re: vgdisplay shows error after mirrored disk replacement

Hi Ettore,

Thanks for your quick help.

strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t6d0
/dev/dsk/c2t5d0
/dev/vg01
/dev/dsk/c1t6d0
/dev/dsk/c4t6d0 <<< present
/dev/dsk/c1t5d0
/dev/dsk/c4t5d0

The disk is present in the lvmtab.

Franky
V.Tamilvanan
Honored Contributor

Re: vgdisplay shows error after mirrored disk replacement

Hi,

You need to do a vgcfgrestore once u add a new disk. So for your config execute the below commands. If you have mounted any of the logical volumes of vg01. u need to unmount that before ececuting these commands.

#vgchange -a n /dev/vg01
#vgcfgrestore -n /dev/vg01 /dev/rdsk/c4t6d0
#vgchange -a y /dev/vg01

Then check vgdisplay .It should work.

Franky Leeuwerck_2
Super Advisor

Re: vgdisplay shows error after mirrored disk replacement

Thanks Jeroen for your message.
I took me a while to get to your document links, as I had to register first to the european site.

Somehow I can't submit some points for your contribution, so if you reply again, I'll do it the next time.

Franky
Alan Turner
Regular Advisor

Re: vgdisplay shows error after mirrored disk replacement

I had messages like this when I replaced a mirrored disk while the system was off then rebooted the system. It looks like the physical volume is not recognised as a member of vg01. Did you do the follow-up actions after replacing the disk, e.g.:

vgcfgrestore -n /dev/vg01 /dev/rdsk/c4t6d0
vgchange -a y /dev/vg01
vgsync /dev/vg01
Suresh Patoria
Super Advisor

Re: vgdisplay shows error after mirrored disk replacement

Hi,

remove the disk from volume group

create PV
#pvcreate -f /dev/rdsk/c4t6d0

extend the volume group

#vgextend /dev/vg00 /dev/dsk/c4t6d0

then mirror the manually all the logical volume

using lvextend commnad

Thanx
Franky Leeuwerck_2
Super Advisor

Re: vgdisplay shows error after mirrored disk replacement

Hi everyone,

Thanks for all the suggestions.

Unfortunately, I needed to register to the european site for looking at the proposed documents and now I can not anymore submit points as I received an new user_id.
Anyone has an idea ?

Franky
Fabio Ettore
Honored Contributor

Re: vgdisplay shows error after mirrored disk replacement

Franky, then your LVM problem is due to /etc/lvmconf/vg01.conf was not re-established. In order to do it (as other guys said) you should launch

# vgcfgrestore -n /dev/vg01 /dev/rdsk/c4t6d0

# vgchange -a y vg01

This should solve your LVM problem.

About your last question: I don't understand the problem to submit points. Even if you have a new userID (for european ITRC site) you can login with your old userID and work yet.

Best regards,
Ettore
WISH? IMPROVEMENT!
Franky Leeuwerck_2
Super Advisor

Re: vgdisplay shows error after mirrored disk replacement

Ettore,

Thanks for your help.

According to your opinion, should I also perform a vgsync ?

Franky

Franky Leeuwerck_1
Regular Advisor

Re: vgdisplay shows error after mirrored disk replacement

Ok everyone,

Thanks to Ettore's tip, I can reassign points again.
I'll try the vgcfrestore/vgchange procedure as soon as possible today.
If this seems to be the solution, then you guys all get a big 10.
I'll come back to this issue, later.

Regards,
Franky
Fabio Ettore
Honored Contributor

Re: vgdisplay shows error after mirrored disk replacement

About your last question:
it doesn't need vgsync because activation by vgchange already should do sync.
Anyway solving vgdisplay problems you can launch it

# vgdisplay -v vg01 | grep "LV Status"

and see if all logical volumes are 'available/syncd'.
If no then you can force them to sync one by one:

# lvsync /dev/vg01/lvolX

If after this command vgdisplay above doesn't show syncd yet then it is probable to be an hardware problem, again :-(, on disks. But I don't think that.

Best regards,
Ettore
WISH? IMPROVEMENT!
Pete Randall
Outstanding Contributor

Re: vgdisplay shows error after mirrored disk replacement

Franky,

The key here is in your original vgdisplay output:

LV Name /dev/vg01/lvol2
LV Status available/stale
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 3000
Used PV 1

LV Name /dev/vg01/lvol3
LV Status available/stale
LV Size (Mbytes) 4000
Current LE 1000
Allocated PE 2000
Used PV 3


Not that lvol2 and lvol3 show status of "available/stale". The mirrors for those two lvols have not been synced - they're "stale". Whenever you replace a mirrored disk, you need to run vgcfgrestore, vgchange, and (possibly) vgsync.

Good luck,


Pete

Pete
Franky Leeuwerck_1
Regular Advisor

Re: vgdisplay shows error after mirrored disk replacement

Problem solved.

Exact steps were :

vgcfgrestore -n /dev/vg01 /dev/rdsk/c4t6d0
vgcfgrestore: Couldn't query physical volume "/dev/dsk/c4t6d0":
The specified path does not correspond to physical volume attached to
this volume group
Volume Group configuration has been restored to /dev/rdsk/c4t6d0

vgchange -a y /dev/vg01
Volume group "/dev/vg01" has been successfully changed.

vgsync /dev/vg01
Resynchronized logical volume "/dev/vg01/lvol1".
Resynchronized logical volume "/dev/vg01/lvol2".
Resynchronized logical volume "/dev/vg01/lvol3".
Resynchronized volume group "/dev/vg01".

The latter one took about 30 minutes (3 lvols with 17GB in total).

Thanks and regards,
Franky

Pete Randall
Outstanding Contributor

Re: vgdisplay shows error after mirrored disk replacement

Franky,

I just noticed a typo:

"Not that lvol2 and lvol3"

-should be-

"Note that lvol2 and lvol3"

Sorry, I really must learn to proof-read!


Pete
(no points please)

Pete