LVM and VxVM
cancel
Showing results for 
Search instead for 
Did you mean: 

replace mirrored root disks with larger

 
SOLVED
Go to solution
John Kittel
Trusted Contributor

replace mirrored root disks with larger

HP-UX 11.11 on rp2470 with LVM mirrorred root / boot disk.

 

In the past I have replaced failed root / boot disks using LVM OLR procedure (... pvchange -a N, replace disk, vgcfgrestore, pvchange -a y, ...).

 

Can I use the same procedure to replace the 2 root disks with larger disks (one at a time) ?

10 REPLIES 10
Highlighted
Torsten.
Acclaimed Contributor
Solution

Re: replace mirrored root disks with larger

Since you don't have vgmodify to adjust the LVM structure, your option is to take an ignite backup and restore to the larger disks.


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!   
Joffo
Occasional Contributor

Re: replace mirrored root disks with larger

If it is mirrored, just lvreduce then vgreduce (may need -f) then add the new disk in and re-mirror!

Pete Randall
Outstanding Contributor

Re: replace mirrored root disks with larger

But - if you do as Joffo suggests, you will not be able to fully utilize the larger disks - you will still have only the current sized disks worth of space available to you.


Pete
John Kittel
Trusted Contributor

Re: replace mirrored root disks with larger

Ok, I think I understand why LVM OLR won't work, - because system is 11.11 and doesn't have vgmodify to change the LVM physical volume size information. vgmodify is vailable in 11i v2 and v3.

 

I don't understand yet why it won't work to reduce the mirrors, vgreduce to remove one disk, vgextend to add one new larger disk, then lvextend the logial volumes onto the new larger disk. Why does that not allow the new larger disk to be fully utilized?

 

I haven't used ignite for this before, but it sounds like the better / only way. I will begin researching how to do it. 

Pete Randall
Outstanding Contributor

Re: replace mirrored root disks with larger

John,

 

It really comes down to the PE size and Max PE per PV parameters.  When you mirror those limitations are applied to the new, larger disk, effectively limiting its size to that of the original.


Pete
Pete Randall
Outstanding Contributor

Re: replace mirrored root disks with larger

I should have added that LVM has unfortunately always defaulted those values so that they match the size of the disk when you do your vgcreate.  That way why vgmodify was created.


Pete
donna hofmeister
Trusted Contributor

Re: replace mirrored root disks with larger

here's how to do it:

 

    * Run lvreduce -m 0 /dev/vg00/lvol# <pv_path> to remove the mirrored extents from each logical volume in vg00 from the mirror disk (the drive that is NOT declared as the primary boot disk).
    * Run vgreduce /dev/vg00 <pv_path> to remove the mirror disk from vg00.
    * Shutdown the system and replace the now-un-mirrored disk with the new/larger disk.
    * Boot the box as normal.
    * Follow "How_to_mirror_a_boot_disk.pdf" to mirror vg00 to the new/larger disk. Be certain to set the alternate boot path to this new disk.
    * Shutdown and boot from the newly mirrored, alternate boot disk (interrupting autoboot, if necessary).
    * Run lvreduce -m 0 /dev/vg00/lvol# <pv_path> to remove the mirrored extents from each logical volume in vg00 where pv path is the old/small (and primary boot) disk.
    * Run vgreduce /dev/vg00 <pv_path> to remove the small disk from vg00.
    * Shutdown the system and replace the remaining small disk with the 2nd large disk.
    * Boot the box normally.
    * Repeat the procedure in "How_to_mirror_a_boot_disk.pdf" to mirror vg00 to the new larger disk.
    * Shutdown the system and boot from this just-mirrored and still-primary boot disk

 

but DO make an ignite tape/backup first!!.

Robert_Jewell
Honored Contributor

Re: replace mirrored root disks with larger

______________________________________________________________________________

I don't understand yet why it won't work to reduce the mirrors, vgreduce to remove one disk, vgextend to add one new larger disk, then lvextend the logial volumes onto the new larger disk. Why does that not allow the new larger disk to be fully utilized?

______________________________________________________________________________

 

When you mirror to the larger disk, it can only map the physical extents that equal the original volumes.  In order for the space on the larger disk to be utilized the mappings would have to come from somewhere and since the original disk is smaller, those mappings simply dont exist.

 

Ignite backup and recovery is the best way to accomplish what you are looking for I think.

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
Robert_Jewell
Honored Contributor

Re: replace mirrored root disks with larger

@donna - how does this process utilize the space on the larger disks?
----------------
Was this helpful? Like this post by giving me a thumbs up below!