1752805 Members
5573 Online
108789 Solutions
New Discussion юеВ

Re: pvmove crashed

 
SOLVED
Go to solution
Leif Halvarsson_2
Honored Contributor

pvmove crashed

Hi,

I was moving a volume group from one physical volume to another using "pvmove" when I loose connection to the server. "pvmove" crashed and, when I try to restart I get the following error:

# pvmove /dev/dsk/c10t0d1 /dev/dsk/c15t0d2
pvmove: Not enough free physical extents available.
Logical volume "/dev/vg01/lvol4" could not be extended.
pvmove: Cannot find a free physical extent for logical extent 17125
of logical volume "/dev/vg01/lvol4".
Failure possibly caused by strict allocation policy
srv00406:/root

The logical volume "lvol4" is in "stale" status.

# lvdisplay /dev/vg01/lvol4
--- Logical volumes ---
LV Name /dev/vg01/lvol4
VG Name /dev/vg01
LV Permission read/write
LV Status available/stale
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 300000
Current LE 37500
Allocated PE 37501
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

Question,

Is it possible to recover the vg/lvol or do I need to recreate the volume group and restore the data.

(this was a test server so the data is not critical)

/leif
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor
Solution

Re: pvmove crashed

Hi Leif,

Have a look at this doc.

http://www11.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=KBRC00010642

Title: Panic Hang On EMC Disk Array; Attempt To Migrate With pvmove(1M)
Document ID: emr_na-c00934877-4

Regards,
Robert-Jan
Michal Kapalka (mikap)
Honored Contributor

Re: pvmove crashed

hi,

check the pvdisplay on the source and the destination PV, them recreate the structure on the destination disk, and them try to use the pvmove command again.

if its a test server, you can any time restore the VG and the data as you mentioned.

mikap
Bill Costigan
Honored Contributor

Re: pvmove crashed

I've had luck changing the number of mirrors back to 0 and then rerunning pvmove.

e.g. lvchange -m 0 /dev/vg01/lvol4

That seems to remove the stale extent and keep the good one.

Doing another lvdisplay will show the Current LE and Allocated LE being the same (e.g. 37500) and mirror copies 0.



Leif Halvarsson_2
Honored Contributor

Re: pvmove crashed

Hi,
Thank you, the "lvreduce -m" seem to be the correct way to go. Unfourtunatly for me is that "lvreduce -m" need the Mirror UX product and we don't have Mirror UX installed. I have to find out if we still have any valid license for this product so I can get a codeword for installing.

Or I have to recreate the volume and restore from backup.
Viktor Balogh
Honored Contributor

Re: pvmove crashed

Hi,

just an advice: next time you do such critical operation on the machine, do it from the LAN console. This way you can eliminate the side-effects of a possible connection loss.

Or, the best would be to do the work in 'screen', this is a virtual terminal which you can detach while the processes inside are kept running. We do it like this every day, I think it's a best practice.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/screen-4.0.3/
****
Unix operates with beer.
Bill Costigan
Honored Contributor

Re: pvmove crashed

I didn't think you needed Mirror UX to reduce the mirrors. I think I did it without the license. Did you try it? Did you get a message that -m option wasn't valid?
Viktor Balogh
Honored Contributor

Re: pvmove crashed

Leif,

How do you have an LVM mirror copy if you don't have MirrorDisk/UX ?

# lvdisplay /dev/vg01/lvol4
--- Logical volumes ---
LV Name /dev/vg01/lvol4
VG Name /dev/vg01
LV Permission read/write
LV Status available/stale
Mirror copies 1
****
Unix operates with beer.