Operating System - HP-UX
1752618 Members
4257 Online
108788 Solutions
New Discussion юеВ

Reusing disk as a mirror boot disk

 
SOLVED
Go to solution
Peter Gillis
Super Advisor

Reusing disk as a mirror boot disk

HPUX 11.11 v1 on RP2470 (parisc system)
HI. Currently we have 1 boot disk with ux 11.11v1 on it, and another boot disk with ux11.00 on it. We are ready to blow away the ux11.oo disk, and wish to reuse the disk as the mirror disk of ux11.11v1 disk.
Would someone please check if I have the process correct??

For the 11.00 disk:
remove the 11.00 info and vol structures

umount filesystems on vg to be removed (vg11).
vgchange -a n /dev/vg11
lvremove -f for all lvols on vg11.
lvremove /dev/vg11

Make bootable -
pvcreate -fB /dev/rdsk/cYtXd0 - the disk that had the 11.00 on it.

mkboot /dev/Rdsk/cYtXd0
mkboot -a "hpux -lq(;0)/stand/vmunix /dev/Rdsk/cYtXd0
lvlnboot -b /dev/vg00/lvol1 /dev/vg00
lvlnboot -s /dev/vg00/lvol2 /dev/vg00
lvlnboot -r /dev/vg00/lvol3 /dev/vg00

( Do I need to really issue the above 3 cmds, because wouldnt the bootability, swap etc be there after the lvols are extended and vg synd'd? )

lvextend -m 1 /dev/vg00/lvol1/ /dev/dsk/cYtXd0 extending the lvo1s on to the disk that had ux11.0 on it.
Issue the lvextend command for each of the lvols on the vg00.
vgchange -a n /dev/vg00

vgsync /dev/vg00

This command takes a while to execute, due to amount of data on the original disk being mirrored.

vgchange -a y /dev/vg00

Once complete, verify the two disks are in the one vol group:

lvlnboot -v
and
vgdisplay -v /dev/vg00

Have I got this right??
Thanks for input, and plenty of points to be had.
Maria
5 REPLIES 5
DCE
Honored Contributor

Re: Reusing disk as a mirror boot disk

Maria,

You do not have to do the vgchange and vgssync commands. When you extend the mirrors to the second disk, each lvol is sync'd at that time - in fact the lvextend command will take varying amount of time to complete, depending on the size of the lvol being mirrored.

The lvlnboot commands are a good set of commands to run - That way you are sure everthing is fully configured.

Dave
Mridul Shrivastava
Honored Contributor
Solution

Re: Reusing disk as a mirror boot disk

I would like to add something to it:
1. If you do vgchange -a n /dev/vg11--> you won't be able to execute any command successfully after this as it will give error that vlmtab doesn't contain this volume so lvreduce/lvremove and vgremove command needs to be executed when vg11 is active.
2. After executing pvcreate command need to execute vgextend /dev/vg00 /dev/dsk/cxtydz
for step by step procedure please refer the following link to mirror the root disk.

Please make a note that if we deactivate the vg then no vg related commad would complete successfully as lvmtab won't have any details of that vg (its used when need to restore vg configuration or configuration related activities).
Time has a wonderful way of weeding out the trivial
Tim Nelson
Honored Contributor

Re: Reusing disk as a mirror boot disk

Some of what you have listed is overkill

add the old disk to your running vg
,extend the lvols so you are mirrored.

You are pretty much done.

shutdown and boot from BHC to the mirror disk to test.

You can use lifcp /dev/rdsk/cxtxd0:auto -
this will show you the auto file for boot to confirm the settings used during mkboot as a check.

Easy as pie.
Robert-Jan Goossens_1
Honored Contributor

Re: Reusing disk as a mirror boot disk

Hello Maria,

add on to above answers.

you do not need to remove all lv's separately.

# vgchange -a n /dev/vg11
# vgexport /dev/vg11

Just before you pvcreate the old 11.0 disk, copy something to the first part of the disk to remove all old lvm information.

# dd if=/dev/null of=/dev/rdsk/cxtydz bs=1024k count=10

# pvcreate -fB /dev/rdsk/cYtXd0
# mkboot -l /dev/dsk/cxtydz
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cxtydz -->Mirror Boot disk
# vgextend /dev/vg00 /dev/dsk/cxtydz
# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -R
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cxtydz
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/cxtydz
# lvextend -m 1 ... do this for all remaining lvols in vg00
# vgcfgbackup vg00

check part

# lvlnboot -v
and
# vgdisplay -v /dev/vg00

Hope this helps,
Robert-Jan
Peter Gillis
Super Advisor

Re: Reusing disk as a mirror boot disk

Thanks heaps. I have successfully and confidently removed data of old disk and mirrored the root disk to the old disk. I had no problems whatsoever. Thanks in particular to Mridul and Robert-Jan.
regards
Maria