Operating System - HP-UX
1848431 Members
5728 Online
104027 Solutions
New Discussion

Re: Disk failure: cannot extend stale LV

 
Tiziano Contorno _
Valued Contributor

Disk failure: cannot extend stale LV

We had a double "failure": one of the 2 PV of vg00 has gone bad, all the LV stale, and in the meantime /var went to 100%.

Now if I try to lvextend it I get an error because the PE on the mirror copy are not available.

May I unmirror /var and extend it without errors to have it remirrored as soon HP comes with the new disk?

lvextend -l 400 /dev/vg00/lvol8
lvextend: Warning: couldn't query physical volume "/dev/dsk/c2t2d0":
The specified path does not correspond to physical volume attached to
this volume group
lvextend: Warning: couldn't query all of the physical volumes.
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol8" could not be extended.
Failure possibly caused by strict allocation policy
9 REPLIES 9
HGN
Honored Contributor

Re: Disk failure: cannot extend stale LV

Hi

You can lvreduce all volumes ,then vgreduce on the failed disk and increase the /var as required (if there are free PE's), once the disk is replaced, you can add the disk back to vg00 and sync the lvol's.

Rgds

HGN
Deoncia Grayson_1
Honored Contributor

Re: Disk failure: cannot extend stale LV

you can reduce the failed disk out of vg00 and try to extend /var if you have enough physical extents left on your other disk to increase it, if not then you will need to clean up /var, I would suggest looking at any all of log files to see if they can be cleaned up, also by running the cleanup utility.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Tiziano Contorno _
Valued Contributor

Re: Disk failure: cannot extend stale LV

Do I have to lvreduce ALL volumes? From a restore effort point of view it's not better to lvreduce only /var?
Senthil Kumar .A_1
Honored Contributor

Re: Disk failure: cannot extend stale LV

Hi,


In case you are going to reduce the mirror copy of one of the volume for freeing up, so u could extend var LV.

Do not forget to use "-k" option to lvreduce along with "-m" option. This is very important. Otherwise, while reducing ,if it encounters the a problem with the LV being reduced due to disk issue, it could hang the lvreduce command, there by leaving no choice but to reboot, for all LVM commands will fail to run unless "lvreduce" relinqueses its run.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Deoncia Grayson_1
Honored Contributor

Re: Disk failure: cannot extend stale LV

when i state reduce the disk out of your volume group, it simple means to do a vgreduce /dev/vg00 /dev/dsk/c2t2d0 , this will break the mirror and take the bad disk out of vg00 and allow you to increase the size of /var, this takes in consideration that you are indeed using online JFS to perform this task. Also before you try to extend /var, do a vgdisplay on vg00 and verify you have enough free PE's in order to perform this task.

if you want to use to lvreduce in order to free up space to add to /var, make sure you have a valid backup/ignite tape before proceeding.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Tiziano Contorno _
Valued Contributor

Re: Disk failure: cannot extend stale LV

vgreduce /dev/vg00 /dev/dsk/c2t2d0
vgreduce: Couldn't query physical volume "/dev/dsk/c2t2d0":
The specified path does not correspond to physical volume attached to
this volume group


:(

I used stm and dd, the disk is readable by both.

Removed special file, reinstalled.

pvcreate without -f fails, it does read it belongs to a volume group, but also vgdisplay and pvdisplay fail.

pvcreate /dev/rdsk/c2t2d0
pvcreate: The physical volume already belongs to a volume group

vgdisplay -v vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t2d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 2
Act PV 1 <<<<<<<<<<<<<<< One only
Max PE per PV 4350
VGDA 2
PE Size (Mbytes) 8
Total PE 4340
Alloc PE 3097
Free PE 1243
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

pvdisplay -v /dev/dsk/c2t2d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t2d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/vg00".
pvdisplay: Cannot display physical volume "/dev/dsk/c2t2d0".

How can it be I cannot remove a failed PV from a VG because... is failed...
Senthil Kumar .A_1
Honored Contributor

Re: Disk failure: cannot extend stale LV

Hi Again,

Before you even attempt vgreduce, it is important that you do lvreduce to remove the mirror's. I found a very important note in "man" page of lvreduce to reduce in such a situation.

"Excerpt from man page"
------------------------------------------

-k This option should be used only in the special instance when you want to reduce a mirrored logical volume on a physical volume that is missing or has failed.

Use this option with the -m option.

------------------------------------------

Try vgreduce'ing after you perform lvreduce, that way, even if vgreduce would allow to do so, atleast you are in right track, for performing vgreduce.

Regards,
Senthil Kumar .A

Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Tiziano Contorno _
Valued Contributor

Re: Disk failure: cannot extend stale LV

This is what in syslog. I would like to reduce from vg and re extend, since I can still read with dd and stm, pvcreate fails, etc.

Event Time..........: Fri Mar 3 13:06:11 2006
Severity............: SERIOUS
Monitor.............: disk_em
Event #.............: 100172
System..............: ************
Summary:
Disk at hardware path 0/0/2/0.2.0 : Device connectivity or hardware
failure
Tiziano Contorno _
Valued Contributor

Re: Disk failure: cannot extend stale LV

Update:
I managed to lvreduce mirror copy of lvol8 and extend /var.

Now I'm waiting for the HP man.

Thank you.