1833866 Members
2294 Online
110063 Solutions
New Discussion

Re: Mirroring boot disk

 
AMAT SA
Advisor

Mirroring boot disk

Is it possible to mirror 9 GB boot disk with 36 GB disk? If yes how to do it?

Thanks.
13 REPLIES 13
Patrick Wallek
Honored Contributor

Re: Mirroring boot disk

You don't mirror disk-to-disk, you mirror by each lvol.

So, yes you can mirror lvol's on the 9GB disk to the 36GB.

Just vgextend the VG so that the 36GB disk is included in the VG. Then do an 'lvextend -m 1' for the LVOLs that you want to mirror.

It's as easy as that.
James R. Ferguson
Acclaimed Contributor

Re: Mirroring boot disk

Hi:

Yes. MirrorDisk/UX implements mirroring at the logical volume level.

Since your 9GB disk undoubtedly was created with a 'max_pe' and 'pe_size' value that maps about 9GB of physical space, however, you will *not* be able to allocate extents on your 36GB disk beyond the number allowed on your 9GB disk. You can determine the limit by doing a 'vgdisplay'. Look at the "Max PE per PV" and the "PE Size" to calculate the useable space.

To mirror to the 36GB disk, do:

# pvcreate ???B /dev/rdsk/cXtYdZ
# vgextend /dev/vg00 /dev/dsk/cXtYdZ
# mkboot /dev/rdsk/cXtYdZ
# mkboot ???a "hpux ???lq" /dev/rdsk/cXtYdZ
# for LV in 1 2 3 4 5 6 7 8
> do
> lvextend ???m 1 /dev/vg00/lvol${LV} /dev/dsk/cXtYdZ
> done
# lvlnboot ???v

# mkboot ???a "hpux ???lq" /dev/rdsk/cXtYdZ #...for original volume, too...
# setboot ???a [alternate_path] #...for new mirror...
# lifcp /dev/rdsk/xCtYdZ:AUTO - #...copy to stdout for verification...

Regards!

...JRF...
James A. Donovan
Honored Contributor

Re: Mirroring boot disk

A. Clay Stephenson
Acclaimed Contributor

Re: Mirroring boot disk

Yes, but there are some gotcha's. Not all boxes are able to boot using 36GB drives; some will require a firmware upgrade.

I assume that your 9GB is the current disk. In that case, everything above 9GB will go to waste on the 36GB drive. The number of physical extents and extent size is set at vgcreate time and cannot be altered.

The mirroring is actually done at the LVOL level.

1) pvcreate -B /dev/rdsk/rawnewdisk

2) vgextend /dev/vg00 /dev/dsk/newdisk

3) mkboot -a "hpux -lq (;0)/stand/vmunix /dev/rdsk/rawnewdisk

4) for each lvol in vg00
lvextend -m 1 /dev/vg00/lvoln /dev/dsk/newdisk

That should do you.

If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: Mirroring boot disk

Yes! There is no difference in mirroring two 9GB and a 9 and 36GB, becuase the mirroring takes place in logical volume level. This document will explain the step by step process:

TKB #LVMKBRC00005103:
http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000066581345
Life is a promise, fulfill it!
Sridhar Bhaskarla
Honored Contributor

Re: Mirroring boot disk

Hi,

Just wanted to give you heads up. If you already have teh volume group setup with 9GB disk and if you didnt' specify non-default options with -e, then you cannot add 36G into the volume group. So you will be better off with create a new volumegroup with 36GB, create filesystems on it, copy the data from 9GB disk, mount the new filesystems on the old mount points, test the application. Once the application is well tested, then remove the old volumegroup to free up the disk and then add the disk to the new volumegroup and then mirror.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Tully
Honored Contributor

Re: Mirroring boot disk

If the 9Gb disk was the first in the volume group, then you will only get the first 9gb from that disk. Unfortunately that is how LVM works. Your best bet would be to create a new root volume group with the 36Gb disk.

If your willing to lose the rest of your disk, then mirroring is possible at the volume group level.

# for LVOL in /dev/vg00/lv*
> do
> echo $LVOL
> lvextend -m 1 $LVOL
> done
Anyone for a Mutiny ?
AMAT SA
Advisor

Re: Mirroring boot disk

Hi Tully,

We want to use full 36 GB. First disk we added to vg00 was 9 GB. So we can not extend Max PE.

How to create new root volume group without downtime? Or any other options we have to get it done?

Thanks.
Sridhar Bhaskarla
Honored Contributor

Re: Mirroring boot disk

Hi,

The best and safe option is to use ignite tape recovery process.

Make a make_tape_recovery tape.

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

Boot through the tape and point the boot disk to 36g disk and install.

Once everything is up and running, add 9g to vg00 and establish mirroring.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Mirroring boot disk

Your least evil answer is to get another 9GB disk; you could add it to vg00, loose no disk space, and experience no downtime. The 36GB drive could then be in another VG. You could add the 36GB and also experience no downtime but you would lose usable diskspace.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: Mirroring boot disk

Sridhars solution is your best solution for minimal downtime.

Ignite is definitely the answer.
Michael Tully
Honored Contributor

Re: Mirroring boot disk

Looks like you have a few possibilities.

Get another 9Gb disk
or
Get another 36gb disk
or
Create an ignite tape and build your OS on the 36gb disk

I would purchase an additional 9Gb disk and mirror it to your original disk. That way there is no wastage, and utilise the 36gb for something else. 9gb disks can be sourced fairly cheaply.
Anyone for a Mutiny ?
avsrini
Trusted Contributor

Re: Mirroring boot disk

Hi Amat,
If you want to replace the boot disk with 36GB without downtime, then mirroring + spliting and Ignite UX is the best methods.

If you want to increase the lv size's of root vg, then
you cant use this method.

For this add this disk to a new vg, pvcreate with bootable. create the lv's with required size's. (check for contigeous options for boot, root and swap).
create fs's (boot lv should be hfs). mount file systems.

copy the files using cpio or any method you are comfortable with.

change the bootpath to new disk using setboot -p HWAddr_of_newdisk.

edit the /stand/bootconf file and change the boot disk device file.

boot into lvm maintenance mode, export the current vg00
and the vg you created now. import the newvg to vg00.

now boot to the multi-user mode.

Rgds
Srini.
Be on top.