1833048 Members
2396 Online
110049 Solutions
New Discussion

new to Mirroring

 
Norman Dignard_1
Occasional Contributor

new to Mirroring

We just installed a LClass H9000 server with 2-9Gb hotswappable harddrives
running HPUX 11.00

We want to mirror the disks and would like to know what to do and what to watch
out for. Do you need to mirror the entire drive or only critical data/volumes?
We are using this as a file server for Clearcase and have created a Lv just for
its data storage.

Does mirroring also copy open files? Clearcase uses a Raima database that is
continuosly being accessed. I also saw in this forum that mirroring does not
provide redundance if the main boot disk goes down. Please correct me if I'm
wrong.

In doing backups to DLT is there anything to be aware of? Do you back up from
the mirror copy or the source? How about on doing restores from backup tape?


Much appreciate any info you can provide.
6 REPLIES 6
Dan Hull
Regular Advisor

Re: new to Mirroring

To answer your questions, let me explain a little of how mirroring actually
works. There are a number of misconceptions about how mirroring works, so I
will try to clear those up at the same time.

1) You do not mirror drives or data, you only mirror
logical volumes

2) Mirroring doesn't "copy" files. It provides
multiple, simultaneous copies of everything in a
logical volume.

3) You cannot specifically access the "mirror" or the
"original" copies of the data, because...

4) Once mirroring is turned on for an lvol, there is
no "primary", "original", or "backup" as far as the
system is concerned.

The way it works:

When you mirror an lvol, the system allocates two extents of disk space
(usually on two physical devices) for each extent's worth of data to be held in
the lvol. When a data read or write action is required, the software checks to
see if one of the disks is busy. If it is available at that moment, then it
reads (or writes) the data. If it's not available, either because it's simply
busy doing something else, or because it's broken, it goes to the other disk
for the info.

If it's writing data, it works the same way, adding another step. Once the data
is written to one of the disks, it watches for the other disk to become
available. Once it's free, the mirroring software writes the data to that disk
also.

This is all handled at a fairly low level of the OS, so it doesn't matter if
files are "open" or not.

The redundancy of the data is provided as long as the software can access the
disks. If one disk becomes inaccessible for too long, the extents are said to
be "stale". If you only mirror a data lvol, then your root disk going bad won't
affect the data any more than if you weren't using mirroring. But if you can't
boot the machine, then of course you can't get to the data! This is why people
also mirror root :)
Melvyn Burnard_1
Regular Advisor

Re: new to Mirroring

Mirroring is reasonably straight forward and fairly simple once you grasp a few
important concepts, such as:
You mirror logical volumes, not physical disks
You mirror at Physical Extent level, so "open" files have no meaning at this
level
You access the file system/raw logical volume, and the OS will decide which LV
it tries to read from first, if the q is busy.

MAy I suggest you go to the link I have supplied below and have a good read.
Steve White_8
Frequent Advisor

Re: new to Mirroring

If the 2 * 9 GB drives are simply for data then it is quite straight forward to
implement mirroring. You would have originally created a logical volume i.e.
/dev/vg01/lvol1. You would then run lvextend -m 1 /dev/vg01/lvol1
/dev/dsk/cxtxdx. You then only need to repeat the process for you other logical
volumes.

If you system only has 2 disks and you want to implement mirroring for your
data and operating system it is significantly more involved.

You can send me an e-mail if you want more details regarding mirroring the O/S.
CHRIS_ANORUO
Honored Contributor

Re: new to Mirroring

Check this link:
http://www.software.hp.com/products/IUX/docs/diskmirror.pdf
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Devbinder Singh Marway
Valued Contributor

Re: new to Mirroring

Another thing to take into consideration is the physically layout of the disks e.g. if you have two SCSI controller cards make the mirror copy on one of the scsi cards , just for more redundancy really.

Regards

Dev
Seek and you shall find
Dave Wherry
Esteemed Contributor

Re: new to Mirroring

I wanted to add just a couple of things to the previous answers.
Steve is right, the lvextend is that simple. Prior to that though, the second or mirror disk needs to be added into the volume group of the lvols you want to mirror. Both disks have to be in the same volume. Basic, but, don't overlook it.
Dans' comments were all correct, with an exception. For strictly mirroring you can not choose if you are going to hit the primary or the mirror. The OS does all of that for you.
You can however split the mirror off and access it directly. If you do a lvsplit you can mount that mirror piece and use it. It is a static copy of the primary, does not continue to get updated. This might be usefull if you want to backup a file system or database at a point in time. You can then join the mirror later and it will resync.
There are other ways to do this like snapshot. It's just a possibility.