Operating System - HP-UX
1748194 Members
3390 Online
108759 Solutions
New Discussion юеВ

Re: PVMOVE - What happens if a server panics/reboots?

 
SOLVED
Go to solution
Alzhy
Honored Contributor

PVMOVE - What happens if a server panics/reboots?

I am bringing in bigger disks to VG's to replace smaller ones. Instead of mirroring, I am doing "pvmove".

What happens if there is a PANIC or Power fialure or the server is simply rebooted duirng a PVMOVE process? Will this be catastrophic to the filesystem/LVOL involved at the time of the reboot? Or does the LVOL simply fall back to its pre-pvmove state?



Hakuna Matata.
11 REPLIES 11
G. Vrijhoeven
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

Nelson,


Interesting... I guess the lvol is corrupt. When you do a lvdisplay -v on the lvol
you pvmove to it increases per PE. I never checked the source lvol though.

HTH,

Gideon
Alzhy
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

Here's my vginfo output:
LVM LVM Mirr Allocated Total Free
Type Object Name Count (Mbytes) (Mbytes) (Mbytes)
---- --------------------------- ----- -------- -------- --------

VG /fhprod19b 347584 521536 173952
LV /fhprod19b/nbu 2 173568 0 0
LV /fhprod19b/catbak 1 174016 0 0

PV /dsk/c49t0d1 0 173504 34432
PV /dsk/c84t0d1 0 174016 0
PV /dsk/c84t0d0 0 174016 139520

I am pvmove'ing c49t0d1 to c84t0d0. it has only one wholly contained LVOL - nbu. I notice that c84t0d0's available space is decreasing while the source LUN's (c49t0d1) available space is increasing..


Hakuna Matata.
Patrick Wallek
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

Step 1) Pray that nothing like that happens!

The pvmove commands works by using the mirroring functionality of LVM (no you DON'T need to buy Mirror Disk for this) to move the extents around. Mirrors are established and then reduced in a specific order to achieve your desired end result.

Now if something happens during the process of the initial mirror operation, I don't think there should be any real harm done. The LV might be in a somewhat inconsistent state since the initial mirror operation might not have finished. I'm not entirely sure what your recovery options would be or what you would have to do to get the LV consistent again.

So before you start the process, see Step 1 above. ;)
James A. Donovan
Honored Contributor
Solution

Re: PVMOVE - What happens if a server panics/reboots?

You can recover easily enough from that.

Pvmove works by mirroring each extent being moved prior to removing the old extent. If the system crashes, you just need to issue an lvreduce -m 0 on the logical volume affected at the time of the crash. You can then re-issue the pvmove command to continue moving you're extents to the new disk.
Remember, wherever you go, there you are...
John Poff
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

Hi,

I've never done that before, but my guess is that HP made their LVM robust enough to just do the right thing.

I guess the answer is, don't trip over the power cord while doing a pvmove. Of course, *YOU* could try it and let the rest of us know how well it recovers. :)

JP
A. Clay Stephenson
Acclaimed Contributor

Re: PVMOVE - What happens if a server panics/reboots?

It occurs to me that this is an excellent chance for you to do a service for other admins. In the middle of the pvmove, yank the power cord and then let us know. My best GUESS is that as each extent (or small group of PE's) is moved the LVM data structures are updated in order to minimize risk. It couldn't safely simply revert to the pre-pvmode state because extents might be updated by normal activity during the pvmove.
Of course, any PANIC or failure could corrupt
a filesystem so that in many ways a pvmove is not much more dangerous. This would be a good time to make sure that your LVM/VxFS/Disk I/O subsystem patches are all up to date before doing the pvmove.
If it ain't broke, I can fix that.
Alzhy
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

I will have an answer for everyone. I

'll have an environment today on HP-UX 11i. This evening I'll try it on the Sistina LVM Linux implementation which is very similar..
Hakuna Matata.
James A. Donovan
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

....i just re-read your first sentence, and hopefully you initially created your VG with the idea that you would come back at a later date and add larger disks by specifying "-e XXXXX" at the time of the VG creation. If not, then you'll need to create a new VG entirely. In which case, pvmove is not an option since it doesn't work if the disks are located in different VG's.

Remember, wherever you go, there you are...
Alzhy
Honored Contributor

Re: PVMOVE - What happens if a server panics/reboots?

Jim,

I came from a VxVM,other VM and saw LVM's weaknesses. We have prep'd up all our VG's to handle the largest possible LUN/PV sizes possible... so that's the way we've built our LVM VG's...

PE size 64M
Max PE per PV 65535

We also do stripes using LVM to give them EVA/XP LUNs more DB serving IO juice.


Hakuna Matata.