Operating System - HP-UX
1833513 Members
3507 Online
110061 Solutions
New Discussion

Re: Externd to mirror disk

 
SOLVED
Go to solution
Ralf Buchhold
Regular Advisor

Externd to mirror disk

Hello
i want to extend vg01 with an secon disk to mirror all lvol´s from vg01 to the mirror disk.
Please look at the attached file.
Perhaps the mirror disk should be: 0/2/1/0.8.0
Is it possible to use sam ?
Thanks
Ra
7 REPLIES 7
Joseph Loo
Honored Contributor

Re: Externd to mirror disk

hi ralf,

u may like to refer to this doc:

http://www2.itrc.hp.com/service/cki/docDisplay.do?hpweb_printable=true&docLocale=en_US&docId=200000072951433

regards.
what you do not see does not mean you should not believe
Stf
Esteemed Contributor
Solution

Re: Externd to mirror disk

To mirror a disk you can't use sam
you must have installed mirrordiskux!!!
and you must use the lvextend -m 1 command...

Stf ;-)
MarkSyder
Honored Contributor

Re: Externd to mirror disk

Provided you have MirrorDisk installed you CAN use sam to mirror the lvols - I do it all the time!

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Devender Khatana
Honored Contributor

Re: Externd to mirror disk

Hi,

Follow steps below. SAM can be used for this but do not provide some special features like keeping all PE's on second disk itself. Meaning that if your first disk has some free extents then your existing lvols will be mirroed in those PE's and once all those are utilized, the second disk will be used for mirroring causing two copies of one LE's on same disk and causing problems in case that disk fails. This can be very well controlled by commands.

1 Find the device file for spare disk by
#ioscan -fnC disk
& confirm by
#diskinfo /dev/rdsk/cxtydz

2. Extend you VG to the new disk
#vgextend vg01 /dev/dsk/cxtydz

3. Mirror your lvols to second disk
#lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/cxtydz

Repeat for all lvols in vg01.

Note that your new disk should be of the size of atleast equal or more than the size of all lvols in total.

HTH,
Devender
Impossible itself mentions "I m possible"
MarkSyder
Honored Contributor

Re: Externd to mirror disk

Devender's reply frightened me into checking my mirrored systems!

Go into sam, disks and filesystems, logical volumes. Highlight the LV you want to check, click actions, more information.

To my relief, it shows that all my mirrored lvols are on two discs. But this does raise an interesting point: software that mirrors an lvol on the same disc is the kind of product I would expect from Microsoft, not HP. Any comment from HP?

Mark
The triumph of evil requires only that good men do nothing
AIMC
Frequent Advisor

Re: Externd to mirror disk

Try this,

You just need the device file of the new disk & the device file of the VG.

HTH

#!/usr/bin/sh
echo "Please give me the device file of the data disk in the form
/dev/dsk/cXtYdZ..."
read DISK
RDISK=$(ioscan -fnkC disk |grep $DISK |awk '{print $2}')
pvcreate $RDISK
echo "Please give me the devie file of the volume group in the form
/dev/vgname..."
read VG
vgextend $VG $DISK
echo "How many copies will this be? (1/2)"
read COPIES
for LVOLS in $(vgdisplay -v /dev/vg00 |grep 'LV Name' |awk '{print $3}')
do lvextend -m $COPIES $LVOLS $DISK
done
echo "Your data disk has now been mirrored, please verify...."
exit 0
MarkSyder
Honored Contributor

Re: Externd to mirror disk

sam is a lot more efficient than I was led to believe by an earlier answer:

sam -> discs and filesystems -> logical volumes -> actions -> modify.

Right at the bottom is mirroring policy. Just make sure separate discs is selected.

Mark
The triumph of evil requires only that good men do nothing