Operating System - HP-UX
1833582 Members
4431 Online
110061 Solutions
New Discussion

Re: Mirroring rootvg to a larger drive

 
SOLVED
Go to solution
Clara Rowe
Frequent Advisor

Mirroring rootvg to a larger drive

Hello Experts! Is it possible to mirror an 18 GB drive to a 36 GB drive? We need to upgrade, and we're thinking that if we can do this, we would then turn around and make the 36 GB drive the primary, replace the other 18 GB drive with a 36 and then mirror again. We're hoping this would allow us to extend our lv's utilizing the additional space. We would appreciate any advice can give us.

Thanx
Clara
Take time to smell the roses.
12 REPLIES 12
Marco Santerre
Honored Contributor

Re: Mirroring rootvg to a larger drive

Hi Clara,

Yes you can mirror from a smaller drive to a biiger because the mirroring does not happen at the disk level nor does it happen at the VG level. When you mirror, it is at the Logical Volume level that you mirror, so as long as you have enough free space on some other drive to make the mirroring happen, then it doesn't matter what size the disks are.
Cooperation is doing with a smile what you have to do anyhow.
Pete Randall
Outstanding Contributor

Re: Mirroring rootvg to a larger drive

Clara,

The potential "gotcha" in this plan stems from the combination of PE size and Max PE per PV. Since this new drive needs to be added to an existing volume group, you need to be sure that these values are large enough to accomodate the full 36GB of the new drive.


Pete

Pete
Tom Danzig
Honored Contributor

Re: Mirroring rootvg to a larger drive

Be aware, however, that you may not be able to use the entire 36GB depending on the current vg00 setting of "Max PE per PV".

Depending on how vg00 was created, you may be stuck and have to Iginite to the new disk. If vg00 "Max PE per PV" is large enough to allow you use of all the space, this procedure will work fine.

The easiest way to check is to vgextend the new disk into vg00 and check. You can always vgreduce it out again if you need to.
KCS_1
Respected Contributor

Re: Mirroring rootvg to a larger drive

Hello~ Clara!!

yes, you can do like that because such as mentioned first former,mirror is not disk to disk on LVM. Just LV to LV mirroring on same volume group that not depend on disk size , I additonal attached sample mirror script under:

< root mirror shell script sample file >
#!/bin/sh
clear
echo "\n"
date
echo "\n"
echo =============mirror begin===================
pvcreate -B /dev/rdsk/c0t0d0
echo "\n"
echo =============pvcreate compleate=============
sleep 3
vgextend /dev/vg00 /dev/dsk/c0t0d0
echo "\n"
echo =============vgextend compleate=============
sleep 3
mkboot /dev/rdsk/c0t0d0
mkboot -a "hpux -lq" /dev/rdsk/c0t0d0 # mirror disk
mkboot -a "hpux -lq" /dev/rdsk/c2t3d0 # orignal os disk
echo "\n"
echo =============mkboot compleate===============
sleep 3
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c0t0d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c0t0d0
echo "\n"
echo =============lvetend compleate===============
sleep 3
lvlnboot -R /dev/vg00
echo "\n"
echo =============mirror disk compleate===========
banner "mirror-disk compleate"

#!The end

good luck!
Easy going at all.
Michael Steele_2
Honored Contributor

Re: Mirroring rootvg to a larger drive

At 36 gig you're right at the ceiling with PE_SIZE and MAX_PE.

PE_SIZE default = 4 mb.
MAX_PE default = 1016.

If the size of any PV (* disk *) in the VG exceeds (* 1016 * PE_SIZE *) then increase the MAX_PE to a greater value other than the default of 1016. So increase the MAX_PE first. However, increase PE_SIZE if you get "File too large error" which indicates the LVM header is too small.

Next valid PE_SIZE is 8mb.

I'd reinstall the O/S onto the 36 gig disks and blow away the eighteens.
Support Fatherhood - Stop Family Law
Clara Rowe
Frequent Advisor

Re: Mirroring rootvg to a larger drive

After I do a vgextend to the new drive. If it only shows the 18 gigs and I mirror to that. Could I not make it primary and extend it to see the full 36gb?
Take time to smell the roses.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Mirroring rootvg to a larger drive

Clara,

When you first created your vg00 with 18GB disk, your maxPE per PV was set to accommodate a maximum of 18GB disks.

So only those many PE will be alloted from 36GB and hence you are seeing 18G only.

Unless you created the volume group with a non-default maxPE value, you cannot add a bigger disk to it. You can but the size will be limited as you are seeing now.

There are work arounds but I would not suggest at this time.

A good and reliable option is to have a make_tape_recovery tape. It may be 2-3 hrs of downtime but that procedure is safe. Create the tape using the following command

/opt/ignite/bin/make_tape_recovery -v -I -x inc_entire=vg00 -a /dev/rmt/0m

Take a good backup of the system.

Take out the 18GB disk and keep it safe for backout.

Use make_tape_recovery tape to
reinstall the OS.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Mirroring rootvg to a larger drive

You've got a good plan Clara.

The Ignite plan involves downtime but insures you have a perfect backup of vg00. I've used this methodology twice in the past year. Its a good way to go.

When you boot and intervene in the Ignite process you can adjust filesystem size, which is very useful.

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: Mirroring rootvg to a larger drive

Hi Clara:

Mirroring is implemented at the logical volume level, not at the physical disk layer.

Thus the answer to your opening question, of "is it possible to mirror an 18GB drive to a 36GB drive", is *yes*. *However*, is is very likely that you will not be able to utilize the full 36GB space.

The geometry of the LVM header is circumscribed by 'max_pe', 'pe_size', 'max_pv' and 'max_lv' and is fixed during a 'vgcreate' and cannot be altered. When a 'vgextend' is done to add a new physical volume (as for instance for mirroring), the LVM header is replicated to the new physical volume.

A better approach would be to make an Ignite 'make_tape_recovery' tape and *reinstall* your vg00 to the 36GB drive, and then mirror to the 18GB drive until such time as your replace it.

Regards!

...JRF...
Michael Steele_2
Honored Contributor

Re: Mirroring rootvg to a larger drive

As indicated in the above you???ve exceeded your MAX_PE because of the ceiling imposed by the 18 gig disk. You can not fully utilize the 36 gig disk because of this ceiling so you???re only using the first 18 gig of this 36 gig disk.

Consequently, you need to reinstall the O/S with a make_tape_recovery and follow the Advanced recovery options. Make two tapes and verify them before starting this risky procedure.

Start two new postings requesting how to verify a make_tape_recovery and how to install using the advanced recovery options.

Do not proceed until you've got it all down on paper first for your going to need all of your file system sizes for your core O/S, hostname, ips, etc.
Support Fatherhood - Stop Family Law
Clara Rowe
Frequent Advisor

Re: Mirroring rootvg to a larger drive

Thank you all very much. I appreciate you all taking the time and lending your knowledge and experience.

Clara
Take time to smell the roses.
James R. Ferguson
Acclaimed Contributor

Re: Mirroring rootvg to a larger drive

Hi (again) Clara:

Although this may be obvious to you, I'll remind you anyway.

Make your Ignite recovery tape with the latest Ignite version from here:

http://www.software.hp.com/products/IUX/download.html

Use:

# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn

Now, when you boot from the Ignite tape thus made, your recovery will be interactive (because of the '-I' option used to create the tape).

Select the Advanced Installation tab from the Ignite menu when it is presented. From there, the "Filesystem" tab will offer you the ability to (re)size) your logical volumes. Choosing this method means that you can resize your logical volumes as a natural part of the reinstallation.

Regards!

...JRF...