vicker313 tech blog

May 11, 2009

Set mirroring in HPUX using MirrorDisk

Filed under: HPUX — Tags: , — vicker313 @ 12:11 pm

HPUX 11iv3 has a feature called MirrorDisk that enable user to do software mirroring, basically is integrated with LVM. However you need to pay extra in order to use it. After installing this feature, follow steps below to mirror the disks (assume the new disk as c2t2d0):

  1. Create physical volume for new disk:
    pvcreate -f -B /dev/rdsk/c2t2d0
  2. Add disk to current root volume group.
    vgextend /dev/vg00 /dev/dsk/c2t2d0
  3. Make new disk bootable.
    mkboot /dev/rdsk/c2t2d0
  4. Copy correct AUTO file into new LIF area.
    mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c2t2d0
  5. Here is the part to mirror up the logical volume, boot (stand) logical volume need to be done first so that it occupies the first contiguous set of extends on the new disk. Normally logical volume 1 is for stand, 2 is for swap and 3 is for root.
    lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t2d0
    lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t2d0
  6. Update the boot information contained in BDRA for the mirror copies of boot, root and primary swap.
    lvlnboot -b /dev/vg00/lvol1
    lvlnboot -v -r /dev/vg00/lvol3
    lvlnboot -s /dev/vg00/lvol2
  7. Check if the BDRA is correct.
    lvlnboot -R /dev/vg00
  8. Verify if the mirrors were properly created.
    lvlnboot -v

After finish all the steps, try to restart the server and boot from the new disk. If server is able to boot, it means the mirroring setup is success.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: