1838250 Members
4321 Online
110125 Solutions
New Discussion

Re: bootable mirror disk

 
FTSE SysAdmin
Frequent Advisor

bootable mirror disk

Hi,

I've one problem to solve with one rp7400. We have this system with two disks, and I intent to have bootable mirror disk.

I don't have any doubts about the procedure to mirror this second disk... however my problem is... the second disk (the supposed mirror) is under the same volume group and has not been created with "pvcreate -B" ... so this may mean that I would not be able to have a bootable mirroed disk(??)...

Would you know any way to remove the second disk from the volume group in order to pvcreate it with -B... and without a need to destroy this volume group? (This disks is not in use by any logical vol) Many thanks

Kind Regards,
Miguel Ribeiro
Miguel Ribeiro
12 REPLIES 12
Ken Hubnik_2
Honored Contributor

Re: bootable mirror disk

Sub your second disk address in


vgreduce /dev/vg01 /dev/dsk/c0t5d0

pvcreate -B -f /dev/rdsk/c0t5d0
vgextend /dev/vg00 /dev/dsk/c0t5d0
mkboot -l /dev/rdsk/c0t5d0
mkboot -a "hpux -lq" /dev/rdsk/c0t5d0
lifcp /dev/rdsk/c0t5d0:AUTO -
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c0t5d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c0t5d0
pvdisplay -v /dev/vg00
lvlnboot -r /dev/vg00/lvol3 /dev/vg00
lvlnboot -b /dev/vg00/lvol1 /dev/vg00
lvlnboot -s /dev/vg00/lvol2 /dev/vg00
lvlnboot -d /dev/vg00/lvol2 /dev/vg00
Vicente Sanchez_3
Respected Contributor

Re: bootable mirror disk

Hi Miguel,

To be bootable, -B option is needed, so the second disk is not bootable.

If this disk has no lvol configured, you can remove from VG and begin the boot mirror from the begining.

HTH, Vicente.
pap
Respected Contributor

Re: bootable mirror disk

Hi,

It seems that your questions is about booting from the second mirrored disk in case any problem with the first disk.


No, You do not have to worry even if the disk is not created using pvcreate -B neither you need to remove the disk from the volume group.

The second disk must be on /dev/vg00 if you want to create mirror. Still you can configure the second disk as mirror disk for your system. Just follow the procedure as mentioned in the System admin manual for root disk mirroring.

1. pvcreate -B /dev/rdsk/second_disk

and so on....

Do not forget to use "hpux -lq" switch while running mkboot command. Otherwise you will have to give command hpux -iq at the isl prompt when you want to boot through second disk.

Hope this will be useful and will resolve your trouble.

NOTE : It won't matter if anything is on the second disk at this time. Simply start to mirror the second disk and run pvcreate -B command and other commands which you can find from the forum.


-pap
"Winners don't do different things , they do things differently"
Pete Randall
Outstanding Contributor

Re: bootable mirror disk

Check out man pvremove. That might be what you're looking for.

Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: bootable mirror disk

Hi:

If you want to see if a disk is bootable, do 'lvlnboot -v'. If this disk *is* bootable and therefore *was* created with 'pvcreate -B', you will see the notation "Boot Disk" as for example:

# lvlnboot -v
Current path "/dev/dsk/c5t1d2" is an alternate link, skip.
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (10/0.6.0) -- Boot Disk
/dev/dsk/c2t0d2 (10/8.0.2) -- Boot Disk
/dev/dsk/c5t1d2 (10/16/4.1.2) -- Boot Disk

In your case, since there are no logical volume extents on the disk, simply 'vgreduce' the disk that you failed to correctly 'pvcreate' and begin again:

# vgreduce /dev/vg00 /dev/dsk/cXtYdZ

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: bootable mirror disk

You don't need to destory the volume group

lvremove any other logical volumes off the disk.

vgreduce the desk out of the volume group.

lvremove /dev/vg00/lvolname
vgreduce vg00 /dev/dsk/c#d#d#

pvcreate -B /dev/rdsk/c#d#d#

mkboot /dev/rdsk/c#d#d#

mkboot -a hpux -lq (;0)/stand/vmunix" /dev/rdsk/c#d#d#

vgextend /dev/vg00 /dev/dsk/c#d#d#

lmextend -m 1 /dev/vg00/lvol1 /dev/dsk/c#d#d#

Same thing for every other fs in vg00




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
Ken Hubnik_2
Honored Contributor

Re: bootable mirror disk

Sorry the vgreduce should be vg00 not vg01
Pete Randall
Outstanding Contributor

Re: bootable mirror disk

Sorry - brain cramp - forget the pvremove idea.

Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: bootable mirror disk

Hi Pete:

Sorry, Pete, 'pvremove' is not what is needed. First, it wouldn't work because his disk is part of the volume group. Second, the command merely clears the LVM private area so an LVM disk could be used with VxVM for instance. The command replaces the need to write zeros over LVM headers.

Regards!

...JRF...
pap
Respected Contributor

Re: bootable mirror disk

Hi,
I forget to mention few points.

before running pvcreate -B you need to remove the disk from vg00.

vgreduce /dev/vg00 /dev/dsk/sec_disk_dev

pvcreate -B /dev/dsk/rsec_disk_dev
vgextend /dev/vg00 /dev/dsk/sec_disk_dev
;;
;;
;; and so on.


Thanks,
"Winners don't do different things , they do things differently"
FTSE SysAdmin
Frequent Advisor

Re: bootable mirror disk

Hi :-)

I'm impressed with the excelent help that you guys are giving me and your fast reply... many thanks for all :-)

I'm going to test to remove the disk from the vg00 ... I've created a testing system to replicate the problem that we have with the production system...

Many thanks :-) ... I'll be back with update as soon as I finish this test...

I intent to replicate this changes this friday during working hours in our production system :-)

Regards,
Miguel

Miguel Ribeiro
Gratien D'haese_1
Occasional Advisor

Re: bootable mirror disk

Hi,

do not forget to add the second boot disk to the /stand/bootconf file too.

kind regards,
Gratien D'haese