1835527 Members
2906 Online
110078 Solutions
New Discussion

Mirroring

 
SOLVED
Go to solution
Gunther Schulze
Frequent Advisor

Mirroring

I've got a DS2100 JBOD attached to a rp5430 running 11.0. The DS2100 holds 4 18GB drives. I have assigned two of these drives to a database as one logical drive. How would I mirror this logical drive composed of two physical drives to the remaining two drives?
The only constant in life is change.
6 REPLIES 6
Stefan Farrelly
Honored Contributor

Re: Mirroring


1. Add the remaining 2 drives into the same volume group as your existing ones. (use pvcreate and vgextend)

2. use the lvextend -m 1
command to mirror each lvol you need to. If you want to specifiy exactly which disk to mirror to add the /dev/dsk/cxxxxx device to the lvextend command.

Thats it !
Im from Palmerston North, New Zealand, but somehow ended up in London...
Jim Turner
HPE Pro

Re: Mirroring

Howdy!

You don't mention whether or not you're running these two DB drives as raw or cooked. Mirroring (Mirror/UX) is done by logical volume (LV). I believe the default policy is strict allocation which will ensure that mirrored extents go to a physical drive other than where the original is located.

You will need the purchased Mirror/UX product. I can post/attach the procedure I use to mirror LV's in vg00 (for alternate boot) if desired. It could be easily adapted to non-vg00 use.

Cheers,
Jim

Re: Mirroring

You do, of course need to have the software MirrorDisk/UX installed to do this. Check if you have this s/w using:

swlist


HTH

Duncan

I am an HPE Employee
Accept or Kudo
Gunther Schulze
Frequent Advisor

Re: Mirroring

Yes, I do have the MirroDisk/UX product. I would appreciate the procedure you use. I was just curious if the mirroring procedure would be a little trick since I'm mirroring two physical disks as one logical drive to another two physical disks that haven't been configured as a logical drive.
The only constant in life is change.
Jim Turner
HPE Pro
Solution

Re: Mirroring

Modify as necessary . . .

Mirror Boot Drive

For this example, the original boot disk is /dev/dsk/c0t6d0 (8/4.6.0), and the new mirror disk is /dev/dsk/c0t5d0 (8/4.5.0). You will need to substitute the disk devices and hardware paths from the new server as appropriate. Having LV names of lvol1 up through a max of lvol9 is also assumed.

# Prepare bootable disk.
pvcreate -B -f /dev/rdsk/c0t5d0

# Add the new disk to /dev/vg00.
vgextend /dev/vg00 /dev/dsk/c0t5d0

# Write boot (LIF) info to the disk.
mkboot /dev/rdsk/c0t5d0

# Update AUTO file on both disks so vg00 will activate without a quorum.
mkboot -a "hpux -lq" /dev/rdsk/c0t5d0
mkboot -a "hpux -lq" /dev/rdsk/c0t6d0

Mirror each logical volume in vg00. Note "ls -1" means "ls minus one":
# for i in $(ls -1 /dev/vg00/lvol*)
> do
> lvextend -m 1 $i
> done
The newly allocated mirrors are now being synchronized. This operation will take some time. Please wait ....
[Note that this proc assumes all LV's in vg00 are named lvol1, lvol2, etc. If not, you must mirror lvol1, lvol2, and lvol3 in that order before any others.]

Disable mirror write cache and mirror consistency recovery for
swap/dump. Assuming swap/dump is lvol2:
# lvchange -M n -c n /dev/vg00/lvol2

# Recover any missing links to LV???s and update the BDRA of each bootable PV.
lvlnboot ???R

# Set BOOT, SWAP, and ROOT.
lvlnboot -b /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
lvlnboot -r /dev/vg00/lvol3

# Check stable storage.
setboot

# If boot paths and switches are not set properly,
# perform the following as needed.
setboot -p 8/4.6.0 # Primary boot path
setboot -a 8/4.5.0 # Alternate boot path
setboot -s on -b on # Activate autosearch and autoboot

During a "normal" reboot, the primary boot disk will be used. If the system boots and the primary boot disk has failed, the system will automatically boot off of the alternate boot disk.
Gunther Schulze
Frequent Advisor

Re: Mirroring

Thanks very much !
The only constant in life is change.