Operating System - HP-UX
1753775 Members
7432 Online
108799 Solutions
New Discussion юеВ

Re: LVM configuration in RAID1

 
SOLVED
Go to solution
Abubakkar
Frequent Contributor

LVM configuration in RAID1

Please clear any one hwo to configure RAID 1 in LVM? explain step by step
3 REPLIES 3
kemo
Trusted Contributor
Solution

Re: LVM configuration in RAID1

Creating a mirrored boot disk

In this example the disk to be used as an additional mirror copy will be /dev/dsk/c0t5d0 on which as well the root as the swap logical volume will be mirrored. The primary mirror copy will be on /dev/dsk/c0t6d0.
To mirror the root file system, add a bootable LVM disk. Create a physical volume using pvcreate with the -B option.
# pvcreate -B /dev/rdsk/c0t5d0
Add the physical volume to the existing root volume group with vgextend:
# vgextend /dev/vg00 /dev/dsk/c0t5d0
Use mkboot to place boot utilities in the boot area:
# mkboot -l /dev/rdsk/c0t5d0
Use mkboot to add an AUTO file in boot LIF area:
# mkboot -a "hpux" /dev/rdsk/c0t5d0
Or, use the -lq option to allow the system to boot in the event that one of the disks is unavailable, resulting in a loss of quorum.
# mkboot -a "hpux -lq" /dev/rdsk/c0t5d0
NOTE: Use the -lq option when the root volume group contains only 2 disks. If more than 2 disks are in the root volume group, the -lq option is not needed as quorum will be maintained even if 1 disk fails.
Check the contents of the AUTO file with
# lifcp /dev/rdsk/c0t5d0:AUTO -
Alternatively, one could set the alternate boot path variable according to e.g.
# setboot -a 8/0/19/0.5.0
The hardware address of the disk that will become the mirror disk can be determined with 'ioscan -fnC' disk. To check use setboot without any arguments.
Use pvdisplay -v to the order of the logical volumes on the primary disk.
# pvdisplay -v

NOTE: In the following, the standard sequence lvol1, lvol2, lvol3, and so forth, is assumed.
Mirror the boot logical volume, primary swap logical volume, root logical volume and other logical volumes as needed, to the mirror disk in the correct sequence

# 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 (additional LV)
Use pvdisplay -v to the order of the logical volumes on the mirror disk to insure they are in the correct order.
# pvdisplay -v
Update all physical volumes in the volume group so that the logical volume become the root, boot, primary swap, or a dump volume when the system is next booted:
For HP-UX 10.20 (not updated to) and 11.X only:
# 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
For HP-UX 10.01, 10.10, and updates to 10.20 only:
# lvlnboot -r /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
Check with
# lvlnboot -v
Both disks must be listed for root, boot and swap definitions.

NOTE: If forgotten, it often occurs that the system has to be booted in LVM maintenance mode. If you need to know how to boot systems in LVM maintenance mode or other mode, please refer to document OZBEKBRC00000607.

In order to test the mirror configuration, shut down the system and boot from the mirror disk.
# shutdown -ry 0
The system will shut down and reboot. As the system starts to come back up, look for the message (system's output may vary):
TO INTERRUPT THE BOOT SEQUENCE, PRESS ...
Interrupt the boot sequence. This will display the Boot Admin display. At the boot_admin> prompt type:
bo Mirror_disk_hardware_address or
bo alt
if the alternate boot device has been configured. The system will prompt to interact with IPL, answer 'no', and the system will boot from the mirror root disk.

Ismail Azad
Esteemed Contributor

Re: LVM configuration in RAID1

Hi,

Striping and mirroring when related to the LVM subsystem is done at the LV level and depending on which LVM version you are using you can have maximum numbers of mirrors for a particular LV which can be 3 in LVM v1 or 6 on higher versions. The above procedure which has been mentioned is for a boot disk. Mirroring can be done for a single LV and you can set scheduling , allocation and mirror consistency recovery policies.

Regards
Ismail Azad

Read, read and read... Then read again until you read "between the lines".....
Torsten.
Acclaimed Contributor

Re: LVM configuration in RAID1

Regarding boot disks, procedures are different for HP9000 and Integrity servers, see appendix:

When_Good_Disks_Go_Bad_WP
http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!