Operating System - HP-UX
1846685 Members
3319 Online
110256 Solutions
New Discussion

Replaced a disk and now I can't put the mirroring back in place.

 
Ray Humpage
Frequent Advisor

Replaced a disk and now I can't put the mirroring back in place.

I had a bad disk so I reduced the mirrors and replaced the disk. Now when I try to remirror it tells me there aren't enough free extents. The disk is completely empty. ???

nmhptprd(/)# lvextend -m 1 /dev/vg08/prtldata /dev/dsk/c8t9d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg08/prtldata" could not be extended.

PV Name /dev/dsk/c8t9d0
PV Status available
Total PE 4340
Free PE 4340
Autoswitch On
12 REPLIES 12
Aussan
Respected Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

could you post the output of vgdisplay -v
and also the pvdisplay for the disk you want to mirror from

Thank you

Aussan
The tongue weighs practically nothing, but so few people can hold it
Steven E. Protter
Exalted Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

Shalom,

You may need to use lvsplit followed by lvremove on your mirror set.

You could also be forced to do vgreduce -f vg00

Then you will of course need to re-mirror.


pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

I just went through this, reviving a couple of D class junkers stuffed under a desk in my apartment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

Why in the wide world of sports did you lvreduce? You broke all of your mirroring. It could have been as simple as:
vgcfgrestore
vgchange -a y
vgsync

Post the output of vgdisplay -v /dev/vg08 and we can try to figure out what's wrong.
If it ain't broke, I can fix that.
Ray Humpage
Frequent Advisor

Re: Replaced a disk and now I can't put the mirroring back in place.

The disk was failing but not at the NO_HW stage. The system was just hanging. In order to get things to work I did the lvreduce to get things off that disk while I waited for a replacement. How should I have handled this?

Here is the output of the vgdisplay.

nmhptprd(/)# vgdisplay -v /dev/vg08|more
--- Volume groups ---
VG Name /dev/vg08
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 6
Open LV 6
Max PV 16
Cur PV 4
Act PV 4
Max PE per PV 4342
VGDA 8
PE Size (Mbytes) 4
Total PE 17360
Alloc PE 9800
Free PE 7560
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg08/prtldata
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 2500
Allocated PE 2500
Used PV 1

LV Name /dev/vg08/prtlhome
LV Status available/syncd
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Used PV 1

LV Name /dev/vg08/prtlredo
LV Status available/syncd
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Used PV 2

LV Name /dev/vg08/prtlindx
LV Status available/syncd
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Used PV 1

LV Name /dev/vg08/oracle9
LV Status available/syncd
LV Size (Mbytes) 4500
Current LE 1125
Allocated PE 2250
Used PV 2

LV Name /dev/vg08/elmhome
LV Status available/syncd
LV Size (Mbytes) 2200
Current LE 550
Allocated PE 550
Used PV 1


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

PV Name /dev/dsk/c7t9d0
PV Status available
Total PE 4340
Free PE 5
Autoswitch On

PV Name /dev/dsk/c8t8d0
PV Status available
Total PE 4340
Free PE 3215
Autoswitch On

PV Name /dev/dsk/c8t9d0
PV Status available
Total PE 4340
Free PE 4340
Autoswitch On
A. Clay Stephenson
Acclaimed Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

Okay next post the output of lvdisplay /dev/vg08/xxxx for each LVOL.

Some of your LVOL's occupy more than one PV so you will need to specify multiple PV's when you mirror. I prefer to mirror them exactly as they are laid out on the other PV(s).

As to how you should have handled it:
1) Always keep at least one on-hand spare for each disk model --- even if your are under an HP Mr. Goodwrench service agreement.

2) Transform the failing disk into a failed disk by the simple expedient of sliding it out a few centimeters and letting it spin down.
If it ain't broke, I can fix that.
Aussan
Respected Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

i know this might sound stupid, but when you lvreduce the mirror did you also vgreduce the disk out before replacing it?

also can you post the output of
lvdisplay -v /dev/vg08/prtldata

thank you

Aussan
The tongue weighs practically nothing, but so few people can hold it
Ray Humpage
Frequent Advisor

Re: Replaced a disk and now I can't put the mirroring back in place.

I did not do a vgreduce before replacing the disk.


nmhptprd(/)# lvdisplay -v /dev/vg08/prtldata|more
--- Logical volumes ---
LV Name /dev/vg08/prtldata
VG Name /dev/vg08
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 10000
Current LE 2500
Allocated PE 2500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c7t8d0 2500 2500

---------------------------------------------------------
--- Logical volumes ---
LV Name /dev/vg08/prtlindx
VG Name /dev/vg08
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c7t9d0 1500 1500
---------------------------------------------------------------
--- Logical volumes ---
LV Name /dev/vg08/prtlhome
VG Name /dev/vg08
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c7t8d0 1500 1500
--------------------------------------------------------------
--- Logical volumes ---
LV Name /dev/vg08/prtlredo
VG Name /dev/vg08
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 6000
Current LE 1500
Allocated PE 1500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c7t8d0 340 340
/dev/dsk/c7t9d0 1160 1160
---------------------------------------------------------------
--- Logical volumes ---
LV Name /dev/vg08/elmhome
VG Name /dev/vg08
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 2200
Current LE 550
Allocated PE 550
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c7t9d0 550 550
Aussan
Respected Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

i think i know the issue
in the lvdisplay you have Allocation PVG-strict

you'll have to make sure the disk is in the /etc/lvmpvg and if the file is gone then you'll have to re-create the /etc/lvmpvg file
you might be getting the error due to the missing file
The tongue weighs practically nothing, but so few people can hold it
Aussan
Respected Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

forgot to also say make sure they are in sequence in the /etc/lvmpvg
The tongue weighs practically nothing, but so few people can hold it
A. Clay Stephenson
Acclaimed Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

Did you do a vgcfgrestore and a vgchange -a y after you replaced the disk?
If it ain't broke, I can fix that.
Ray Humpage
Frequent Advisor

Re: Replaced a disk and now I can't put the mirroring back in place.

vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c8t9d0",
Detach the PV or detactivate the VG, before restoring the PV.
Torsten.
Acclaimed Contributor

Re: Replaced a disk and now I can't put the mirroring back in place.

You did it wrong.

The correct procedure is to deactivate the disk, replace it, vgcfgrestore and activate it to allow the re-sync.

Now deactivate the disk

pvchange -a n ...
vgcfgrestore ...
pvchange -a y ...

and read the documentation:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

Good luck!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!