[HPADM] SUMMARY[2]: Hp mirroring

From: Ronelle Van Niekerk (rvanniek@ecgd.gov.uk)
Date: Thu Aug 29 2002 - 10:38:15 EDT


OK, apparently my last summary wasn't good enough - though many people
thought it good enough to point me to docs.hp.com.

Here are some of the answeres I received:

With LVM, you can define how the space is allocated between mirrored
copies
using the '-s' and '-C' options in lvcreate.

If the -s (strict allocation policy) option is set to 'y', mirrors
cannot
reside on the same physical volume (this is the default). If it is set
to
'n', the mirrors can be written to the same physical volume. There is
also a
'g' option, which is used if you want to set up Physical Volume Groups
(PVG's) which are a group of physical volumes that LVM treats as a
single
volume when striping data.

The -C option determines how the physical extents are placed on the
physical
volume. When this option is set to 'y', extents are placed in ascending
order, no gap exists between the extents, and the extents all reside on
the
same physical volume. If set to 'n' (the default), then the extents can
be
placed anywhere there is free space on the physical volume.

The best way to ensure your mirrors are exactly the same on the volumes
you
want is to configure your LV with -s set to 'y' and -C set to 'y.'

For example, you have a Volume Group with disks /dev/dsk/c1t1d0 and
/dev/dsk/c2t1d0 (created with 'vgcreate /dev/vg01 /dev/dsk/c1t1d0
/dev/dsk/c2t1d0'.

Create the LV, test_lv with this command:

        lvcreate -l 1000 -s y -C y -n test_lv /dev/vg01

This creates the LV, test_lv, on /dev/dsk/c1t1d0 (the first disk listed
in
your 'vgcreate'command) in your volume group with strict allocation and
contiguous options turned on.

Then,

        lvextend -m 1 /dev/vg01/test_lv

This causes the mirror to be placed on /dev/dsk/c2t1d0 automatically,
since
the -s option is turned on.

There are other options available, but I hope this gets you started.
Review
the man pages for lvcreate and lvextend for additional information.

I hope this helps.

Steve Illgen

------------------------------------------------------------------------
------------------------------------------------

Mirroring occurs only *within* a VG (Volume Group) and only LVOLs
(Logical
Volume) are mirrored. You specify an LVOL to mirror and unused physical
extents within the *VG* are used to create the mirror of the LVOL.
There are 2 ways to decide which PVs (Physical Volume, which = disk or
LUN)
the extents come from:
  a) you (the admin) decide at mirror-creation time
  b) you let the system (LVM) decide
Either way, once, the PVs are specified, the unused extents are simply
used
up from bottom to top, so you don't have control on where they are used
on
the PV.

In scenario a),
the admin simply specifies the PVs in the mirroring command:

  lvextend -m 1 /dev/vgxx/lvolxx /dev/dsk/..x.. (/dev/dsk/..y..)

Here, the LVOL already exists and you are simply adding a mirror, but
you
are saying, "Take the mirrored PVs from PVx first and, if you need more,
then take the rest from PVy."

In scenario b), you don't specify the PVs that will be used and LVM.
decides
automatically. However, there are 3 policies used to limit LVM's
choice:
  strict (default)
  non-strict
  PVG (Physical VG) strict

STRICT: means I don't care which PV you use, as long as it is from a
*different* PV than the one on which the LVOL resides. Duh!!!
Normally, we
want to mirror on a different disk since we are trying to protect form
disk
failure.

NON_STRICT: However, you *can* allow the mirroring to occur on the
*same*
PV, if you want!! I've never seen anybody do this. The only thing that
I
can see that this is useful for, is to allow you to do a mirror split
for
backup purposes and you don't have the luxury of full, extra disks.
This
may have been an issue in the early days, but now disk are so cheap ...

PVG_STRICT: a PVG is simply a group of PVs within the VG and is an
artifact
that the admin can create, manually, by simply creating/editing the
/etc/lvmpvg file. When you use this policy, you manually create 2 PVGs
within the VG by listing the PVs that belong to each PVG and then LVM
will
be sure to create the LVOL *within* one PVG and, when you mirror it,
take
the mirrored extents from the *other* PVG. This is useful in the case
where
you have several PVs and more than one controller (HBA). Ideally, you
not
only want to mirror to a different disk, but you would also want to
mirror
to a PV on a different *controller*. This way you are protected from a
controller failure, as well.
Using PVGs simply allows you to create the 2 groups such that each PVG
is on
a separate set of controllers and, once you've set them up, then you
don't
have to worry any more about being sure to specify exactly which PV is
on a
different controller - LVM will just be sure to use one from the other
PVG.
You will not have control over *which* PV LVM actually picks, nor over
which
extents is uses from these PVs.

A lot of people specify everything manually, being very careful to use
matching disk sizes and to specify corresponding disks on pairs of
controllers. This way they can be sure that mirrored "PV pairs"
(remember,
really, only LVOLs are mirrored, not PVs) look alike in the way that the
extents are allocated, which, obviously not a necessity, but can be a
convenience and just looks "cleaner".

Bob Vance

------------------------------------------------------------------------
-----

HP-UX MirrorDisk/UX mirrors logical volumes. By default mirrored LVs
are on different physical disk(s) from the originals. The most common
thing to do is mirror your boot disk so that you have an alternate boot
disk. Both disks have to be in the volume group. LVM simply maintains
physical extents on both drives in parallel instead of just on one
drive. It's very simple, really.

When your mirrored boot disk fails, your system will most likely panic
(or at least grind to a halt). The subsequent reboot will utilize your
alternate boot disk. After you replace the failed disk, you restore the
LVM data to the new disk and resync your mirrors. On your next reboot,
you will come up on your new disk, and the alternate will go back to
being the alternate.

Jim Turner

------------------------------------------------------------------------
--------

And Galen Scalone gave me this link:

http://www.interex.org/pubcontent/enterprise/sep00/13scalone.html

             

> -----Original Message-----
> From: Ronelle Van Niekerk
> Sent: 29 August 2002 10:22
> To: HP (E-mail)
> Subject: Hp mirroring
>
> OK, can some one please explain the mirroring on HP to me.
>
> Does the mirroring just use any space on a disk not allocated to a
> volume group if you dont; specify which disk to use?
>
> What happens when your disk fails and the mirror kicks into place?
> Once you replace your disk, does it automatically catch up and take
> over from the mirror again?
>
> TIA
> Ronelle van NIekerk

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:18 EDT