Operating System - HP-UX
1753884 Members
7263 Online
108809 Solutions
New Discussion юеВ

Running OS on single disk, want to convert to RAID 1

 
SOLVED
Go to solution
ScottT_2
New Member

Running OS on single disk, want to convert to RAID 1

I have an rp8400 running HP-UX 11i. The OS is running on a single internal 36GB disk.

It is using LVM.

There is a second internal 36GB disk available (I moved all data off it to a separate array).

Is it possible to create a RAID-1 with the existing OS disk and this second disk, without having to reinstall the OS?
6 REPLIES 6
melvyn burnard
Honored Contributor
Solution

Re: Running OS on single disk, want to convert to RAID 1

Yes, provided you have the LVM Mirror sofwtare.
If you have Enterprise OE or Mission Critical OE loaded, the LVM Mirroring is included.
to check, use swlist something like:
swlist -l fileset |grep -i mirror


If you do have it then follow the manual Managing Systems and Workgroups for 11i:
http://docs.hp.com/en/B2355-90950/B2355-90950.pdf
starting at page 631 (I think)

If not, you will have to purchase it.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
James R. Ferguson
Acclaimed Contributor

Re: Running OS on single disk, want to convert to RAID 1

Hi Scott:

You not only can, but should, mirror your boot disk!

LVM mirroring can be done on-the-fly. The only impact is a small degragation in performance while synchronization of the logical volumes occurs.

HP-UX MirrorDisk/UX implements mirrors at the *logical volume* level. You will need to have purchased the product either as part of the OE (11i Operating Environment) or have licensed it separately. Should you need to purchase and install it after-the-fact, a reboot will be required, since the product requires kernel patches.

Otherwise, you do *not* need to worry about reinstalling anything!

To create your mirrored logical volumes, do:

# pvcreate -B /dev/rdsk/cXtYdZ
# vgextend /dev/vg00 /dev/dsk/cXtYdZ
# mkboot /dev/rdsk/cXtYdZ
# mkboot -a "hpux" /dev/rdsk/cXtYdZ
# for N in 1 2 3 4 5 6 7 8
> do
> lvextend -m 1 /dev/vg00/lvol${N} /dev/dsk/cXtYdZ
> done
# lvlnboot -R /dev/vg00
# setboot -a

# Using 'vi' add a line denoting the physical volume to '/stand/bootconf':

l /dev/dsk/cXtYdZ

...note the number-1 as the first field. This simply means an LVM disk.

Note, too, that your logical volumes should be mirrored in order. Specifically critical is that the first three holding '/stand'/, primary swap, and '/' ('root') are done in order.

Regards!

...JRF...

Steven E. Protter
Exalted Contributor

Re: Running OS on single disk, want to convert to RAID 1

My guide.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second dis

For LVM you need Mirror/UX a paid, add in product.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Victor Fridyev
Honored Contributor

Re: Running OS on single disk, want to convert to RAID 1

Hi,

You can find a script for system disk mirroring in the thread http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=993521

Please take into account that installation of Mirror-UX software requires reboot.

BTW, if you can not purchase license for Mirror-UX, you can backup your system disk with dd. On modern computers this takes about 1 min per GB.

I make such backups daily (nightly) for some of my servers using
subdd(){
if dd if=$1 of=/dev/null bs=32768k ; then
dd if=$1 of=$2 bs=32768k
fi
}

subdd /dev/rdsk/source /dev/rdsk/target
In case of system disk failure you have to replace physically system disk with its backup.
Advantages of such a backup is zero price and a possibility for fast undo if needed.
The disadvantages are: downtime in case of system disk failure and a need in operator's intervention.

HTH

Entities are not to be multiplied beyond necessity - RTFM
Wayne Fontaine
Advisor

Re: Running OS on single disk, want to convert to RAID 1

Just wondering, folks...

Wouldn't dd copy over bad sectors from the primary drive onto the backup drive.

Thanks,
Jim
ScottT_2
New Member

Re: Running OS on single disk, want to convert to RAID 1

I have acquired the MirrorDisk software, it will be a day or two before I can install it due to the reboot.

Will post when finished.

thanks