1830581 Members
2915 Online
110015 Solutions
New Discussion

Re: Disk mirroring

 
Aftab Sadiq
Advisor

Disk mirroring

We have got 2 internal hard disk in HP9000 (N-class) server. One of them is boot disk(vg00)and HP-UX(11.0) 64-bit is installed.
Hardware Number Volume Total
Path of Paths Use Group Mbytes Description
0/0/2/0.6.0 1 LVM vg00 8683 SEAGATE ST39102LC
0/0/2/1.6.0 1 Unused -- 8683 SEAGATE ST39102LC

How do I know if those disks are mirrored?
If they are not mirrored then How can I mirrored them?

This is our database server and in production. So is there anyway to mirror other disk without shutting down the server?

Thanks in advance

Aftab Sadiq
13 REPLIES 13
Rainer_1
Honored Contributor

Re: Disk mirroring

mirroring is done at logical volume level.
you can check it with ie:

lvdisplay /dev/vg00/lvol1

look at the output for the line

Mirror copies

if there stood 1 you have mirroring.

As your disk at 0/0/2/1.6.0 is marked as Unused there will be no mirroring.

To set up mirorring do a search with 'mirroring' at this forum, there are several threads for mirroring.
Dan Hetzel
Honored Contributor

Re: Disk mirroring

Hello,
Hi,

Here are the steps to mirror your boot disk:

1) pvcreate -B /dev/rdsk/cxtyd0

Add a physical volume to vg00
2) vgextend /dev/vg00 /dev/dsk/cxtyd0

3) mkboot /dev/rdsk/cxtyd0

4) mkboot -a "hpux (52.3.0;0)/stand/vmunix" /dev/rdsk/cxtyd0

5) lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cxtyd0

6) lvlnboot -v

Then, for each logical volume in turn
7) lvdisplay -v /dev/vg00/lvolx

Make sure to replace cxtyd0 by the device file for your unused disk.



Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Paula J Frazer-Campbell
Honored Contributor

Re: Disk mirroring

Hi
As your disk info is :-
0/0/2/0.6.0 1 LVM vg00 8683 SEAGATE ST39102LC
0/0/2/1.6.0 1 Unused -- 8683 SEAGATE ST39102LC
and 0/0/2/1.6.0 1 is unused then these disks are not mirrored.

You require to have HP-UX Mirrordisk installed before you can continue. To check enter:-

swlist and look for :-

B2491BA B.11.00 MirrorDisk/UX

HTH

Paula

If you can spell SysAdmin then you is one - anon
MARTINACHE
Respected Contributor

Re: Disk mirroring

Hi,

The second disk is UNUSED so not use for mirror.

In order to mirror vg00 :

(supposing your second disk is /dev/dsk/c2t2d0)

pcvreate -B /dev/rdsk/c2t2d0
vgextend /dev/vg00 /dev/dsk/c2t2d0
mkboot /dev/rdsk/c2t2d0
mkboot -a "hpux -lq" /dev/rdsk/c2t2d0

for each logical volume in vg00 :

lvextend -m 1 /dev/vg00/lvolXX /dev/dsk/c2t2d0

lvlnboot -R
lvlnboot -v

Now, you should reboot your system and abort the boot sequence in order to modify the alternate boot path.

Regards,

Patrice.
Patrice MARTINACHE
Dan Hetzel
Honored Contributor

Re: Disk mirroring

Hi,

I forgot mentioning that this could be done without rebooting your system.

It would have been better to install your database on a separate physical volume (performance wise).

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
James R. Ferguson
Acclaimed Contributor

Re: Disk mirroring

Hi:

An excellent guide to mirroring and other common LVM maintainence is the "HP-UX System Administration Tasks" manual. This manual is written in straight-forward terms with step-by-step instructions for mirroring, etc. You can get a PDF or HTML version at www.hp.docs.com

Here is a direct link:

http://docs.hp.com/hpux/onlinedocs/B2355-90672/B2355-90672.html

As noted in some of the above post, you do NOT NEED TO REBOOT TO MIRROR a disk, although you WILL NEED TO REBOOT TO INSTALL the MirrorDisk/UX product if you haven't already. MirrorDisk/UX must be purchased as a separate license above from the core OS license. In my opinion, it's a "must have".

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Disk mirroring

Hi (again):

Sorry, that's www.docs.hp.com for the home documentation page. I always jumble the order!

...JRF...
Ruediger Noack
Valued Contributor

Re: Disk mirroring

Hi,

in addition to all suggestion above i would also change the boot string on the first disk :

mkboot -a "hpux -lq" /dev/rdsk/cxtyd0

This is nessasary for autoboot in case of mirror disk failure.

Ruediger



Aftab Sadiq
Advisor

Re: Disk mirroring

Where can I get MirrorDisk software? I could not find on application-software CDs (June-2000).
Elizabeth_2
Valued Contributor

Re: Disk mirroring

Hi Aftab!

The Software itself is available on the Application CD Sets (DARTS) but it is codeword protected. It is typically located on CD #1 of the set.

For series 800 machines at 10.20 it is:
B2491BA B.10.20 MirrorDisk/UX

For series 700 machines at 10.20 it is:
B5403BA B.10.20 MirrorDisk/UX

If you have not purchased a license and would wish to do so, you should contact your salesperson or the HP Advantage Center at: (800) 637-7748

If you have purchased the license, but do not have the codeword to unlock the product off the Applications CD then you should contact our Codewords Dept at (800) 538-1733

Once you have the codeword, you will need to:

1) Mount the appropriate applications CD.

2) Start-up the interactive version of swinstall
# swinstall

3) Specify the Source Type as "Local CD ROM" and point the Depot Path to where the CD is mounted.

4) Choose the "Add Codeword" option from the "Actions" pull-down menu.

5) Mark the software selection and then choose "Install Analysis" from the "Actions" menu to install.

As far as system downtime, please allow enough time in order to reboot your system.

Note:
MirrorDisk/UX installs a non-patched verison of the lvm commands, which overwrites the patched binaries. swlist still shows the lvm patches as applied, but what(1) shows non-patched versions. Re-apply any lvm command patches are after loading MirrorDisk/UX

Elizabeth_2
Valued Contributor

Re: Disk mirroring

Hi Aftab!

One more note on mirroring... You mentioned that you were going to mirror two disks. Are these your boot/root disks make sure that you deactivate the quorem. If you don't, and one of the disk failes the system won't boot.

The default LVM quorum requirement is that 51 percent (or greater) of the disk devices that make up a volume group be present/available for the volume group to be activated. The volume group must be activated in order to have access to the logical volumes it contains. Failure to meet the quorum requirement for the root volume group will stop the system from booting, even if the failed or missing disk is not the boot disk.

For example, assume vg00 has 2 disks. One is the boot disk and the second only has logical volumes used by an application. If the second disk fails the system will not boot because only 50% of the disks are available in vg00.

To boot the system without quorum, interrupt the boot process, boot from the primary path and interact with IPL. Add the -lq option to the boot
string like the following in order to boot to single user mode:

ISL> hpux -is -lq (;0)/stand/vmunix

To override quorum for a non-root volume group use the following syntax when activating the vg:

vgchange -q n /dev/vgXX
Juergen Nagel
New Member

Re: Disk mirroring

Hi,
This is my cookbook to mirror a boot disk.

/dev/rdsk/c0t9d0 Spiegel
/dev/rdsk/c0t8d0 Original


* pvcreate -B /dev/rdsk/c0t9d0 or * pvcreate -Bf /dev/rdsk/c0t9d0
* mkboot -l /dev/rdsk/c0t9d0
* mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c0t9d0
* lifls -il /dev/rdsk/c0t9d0
* lifrm /dev/rdsk/c0t9d0:PAD
* lifls -il /dev/rdsk/c0t8d0 >/tmp/lif8
* vi /tmp/lif8
you must delete the entry for HPUX ISL AUTO LABEL and the title
* cat /tmp/lif8 | awk '{print "lifcp -r -T"$2" /dev/rdsk/c0t8d0:"$1" /dev/rdsk/c0t9d0:"$1}' >/tmp/lif8-9
* chmod 700 /tmp/lif8-9
* /tmp/lif8-9
* vgextend /dev/vg00 /dev/dsk/c0t9d0
* for i in 1 2 3 4 5 6 7 8 9 10
> do
> lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c0t9d0
> done
* lvlnboot -v Boot Definitions for Volume Group
/dev/dsk/c0t9d0 Root: lvol3 on: /dev/dsk/c0t8d0 /dev/dsk/c0t9d0 Swap: lvol2 on: /dev/dsk/c0t8d0 /dev/dsk/c0t9d0 Dump: lvol2 on: /dev/dsk/c0t8d0,
* lvlnboot -r /dev/vg00/lvol3
* lvlnboot -b /dev/vg00/lvol1
* lvlnboot -s /dev/vg00/lvol2
Darrel Louis
Honored Contributor

Re: Disk mirroring

These are the instructions to mirror your root volumegroup:

The following example will create a single mirror for the root and primary swap logical volumes. The commands assume the following: * The root volume group is
vg00 * The root logical volume is lvol1 * The primary swap device is lvol2 * The root bootable system disk is Instance 0 *
The mirror copy disk is Instance 1 The following commands will accomplish the task: ( replace the device files with appropriate ones to your system ! )
Make sure that both disks are on a different SCSI-card, case one of the SCSI-cards are defect, the system is still operational on one of the boot disks.
Note: if /stand is on a separate lvol, your root lvol will be lvol3 instead of lvol1

# pvcreate -B /dev/rdsk/c0t1d0
# mkboot -l /dev/rdsk/c0t1d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t0d0 Original boot disk
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t1d0 Mirror Boot disk
# vgextend /dev/vg00 /dev/dsk/c0t1d0
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t1d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t1d0
# lvextend -m 1 ... do this for all remaining lvols in vg00
# lvlnboot -r /dev/vg00/lvol1
# lvlnboot -s /dev/vg00/lvol2
Note: if /stand is separate, replace last two steps with:
# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -R
to check your boot info run : # lvlnboot -v
# vgcfgbackup vg00

To change either primary or alternate boot path:

boot into ISL and type:

primpath 8/4.5.0 (replace 8/4.5.0 with the hardware path appropriate to machine)
altpath 8/4.8.0 (replace 8/4.8.0 with the hardware path appropriate to machine)