Operating System - HP-UX
1834513 Members
2142 Online
110068 Solutions
New Discussion

Need help moving LVOLs from 36GB to 72GB disks

 
SOLVED
Go to solution
dictum9
Super Advisor

Need help moving LVOLs from 36GB to 72GB disks

==========================================================================

Greetings,

I have VG00 with 2x36GB hard drives.
As I posted in a recent thread, one of them has failed, which is the mirror drive.

I tried to lvreduce all the lvols and did that with lvol1 - lvol9 but then discovered that the mirror disk has some uniq lvols not present on the primary disk, namely a few swap partitions.

So it's impossible to unmirror them.

My end goal is to move all VG00 lvols from these two 36GB drives, both primary and mirror to 2 new 72GB drives I will install. (The 5670 machine, running 11.23 has 4 slots).

So my plan is to mirror the few swap LVOLs to SAN disks (I have plenty of those).
Then, remove the failing 36GB drive.
Then install a new 72GB drive and mirror the primary 36GB drive to that --- is that possible? (Then install a secondary 72GB drive and mirror from primary 72GB disk to mirror 72GB, then take out the remaining 36GB disk)

Does this make sense or am I missing something?




6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: Need help moving LVOLs from 36GB to 72GB disks

Shalom,

All procedures are in this document:
http://www.docs.hp.com/en/7161/LVM_OLR_whitepaper.pdf

You can use dd to copy the disks and then extend the logical volumes. Root can not be extended though, it must be contiguous

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
James R. Ferguson
Acclaimed Contributor

Re: Need help moving LVOLs from 36GB to 72GB disks

Hi:

If you can tolerate a downtime you could re-Ignite your vg00 onto larger drives and resize its logical volumes during that process too.

Remember that LVM mirroring occurs at the logical volume level. Thus to use mirrors to move from your internal disk to your SAN will mean that you need to 'vgextend' physical volumes on the SAN into vg00. I don't think this is ultimately what you want.

Consider, at least, establishing additional device swap on SAN devices and activating that on-the-fly. Then, edit your '/etc/fstab' so that the secondary device swap on vg00 isn't mounted at reboot and reboot. This leaves you free to 'lvremove' the old vg00 logical volumes used for device swap. Now either re-ignite the cleaned-up vg00 or 'lvreduce' to a no-mirror state; 'vgremove' one (36GB) physical disk); 'vgextend' in the new 72GB disk; and re-mirror your logical volumes. Repeat for the opposite member.

You might want to evaulate the LVM geometry of your current 36GB disk versus the 72GB size using 'vgmodify' too.

Regards!

...JRF...
dictum9
Super Advisor

Re: Need help moving LVOLs from 36GB to 72GB disks

OK. This is what my /etc/fstab looks like:

/dev/vg00/swap1 ... swap pri=1 0 1 # on failing disk
/dev/vg00/swap2 ... swap pri=1 0 1 # on failing disk
/dev/vg00/swap3 ... swap pri=1 0 1
/dev/vg00/swap4 ... swap pri=1 0 1 # on failing disk

Question, once I create swap5 and swap6 on SAN disks, can I disable swap1, swap2 and swap4 which are on the failing disk without a reboot?
Or do I need a reboot?


dictum9
Super Advisor

Re: Need help moving LVOLs from 36GB to 72GB disks


To clarify further:

Can I mirror the 36GB disk to 72GB disk?

Quote:
-------------------------------------------
vgextend' in the new 72GB disk; and re-mirror your logical volumes.
--------------------------------------------
James R. Ferguson
Acclaimed Contributor

Re: Need help moving LVOLs from 36GB to 72GB disks

Hi:

> Question, once I create swap5 and swap6 on SAN disks, can I disable swap1, swap2 and swap4 which are on the failing disk without a reboot?

You need to reboot to perform a "swap-off" prior to 11.31. Edit your '/etc/fstab' to remove the vg00 device swap and add the non-vg00 device swap. Then on reboot, the new, non-vg00 swap devices will be activated and the old vg00 ones can be 'lvreduce'd.

> To clarify further: Can I mirror the 36GB disk to 72GB disk?

Yes, because, again, LVM mirroring occurs at the logical volume level.

Regards!

...JRF...

dictum9
Super Advisor

Re: Need help moving LVOLs from 36GB to 72GB disks

And that makes it very clear, thank you.