Operating System - HP-UX
1821469 Members
2819 Online
109633 Solutions
New Discussion юеВ

Re: How to create a RAID 1 mirrored disk setup...?

 
SOLVED
Go to solution
cninham
Frequent Advisor

How to create a RAID 1 mirrored disk setup...?

Regarding a HP 9000/800/L2000 server, and wanting to install a fresh copy of HP-UX 11i (HP-UX 11.11).

I have four hot swappable [LVD] SCSI drives, two 9 GB and two 18 GB hard drives. I would like to have the [9 + 18 GB] drives mirrored to the second set of [9 + 18 GB] drives, and to install the OS so the I have a mirrored RAID 1 environment, with the boot partition and directories required for boot on the 9 GB drive. The 18 GB drive I would like to use for Oracle databases.

How do I install/setup HP-UX 11i to be a RAID 1 mirrored environment? Can I canfigure this at the initial installation of the OS? During the Install Options, under "Software" I saw an option for RAID 1 (and RAID 0). But I cannot figure out where to specify which drives should be mirrored, and how...??? Should I do a "normal" install, using one (i.e the 9 GB drive) or two drives (using the 9 + 18 GB drives in the same/different volume group), and then setup the RAID mirror AFTER completeing the OS install...? Do I use SAM to do this?

From reading general RAID information, it seems that RAID 1 is recommended only for a two disk system, and if I wanted to use 4 drives, then I need to use RAID 10. Is this so? Is it possible to do RAID 10 on a standard L2000 server running HP-UX 11i?

Thank you,

Cameron
16 REPLIES 16
Sridhar Bhaskarla
Honored Contributor
Solution

Re: How to create a RAID 1 mirrored disk setup...?

Hi Cameron,

It's better to configure the mirroring after you are done with the OS install.

1. Load OS onto a 9GB drive. It will create vg00 with one disk.
2. Add another 9GB to vg00 and extend the mirrors to it. Search for forums for setting up a 'mirror boot disk'. You should see quite a few messages on it. Follow the instructions.
3. Create a new volume group say 'vg01' with two 18GB disks. Create the logical volumes, filesystems and mount points for your DB and install your database onto them. Then mirror those lvols to the other 18GB disk.

You can use SAM to create VGs, LVs, Filesystems and their mirrors. But it is much easier if you do it through command line. You can get some idea on how LVM works from the following document

http://docs.hp.com/hpux/onlinedocs/5187-2216/5187-2216.html

Look at "Administering a System: Managing Disks and Files" section.

There are few things that you cannot do with LVM.

1. Either mirroring or striping. Both do not co-exist. There is a way to do it using "Extent Level Striping". But that's inefficient and does not provide too much performance.
2. Once the volume groups are created, the VG parameters like MaxPE, MaxLV etc., cannot be altered. So, it's better to specify non-default values for -e, -l, -p and -s. You can change these values during the initial installation too.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
jason morgan_3
Occasional Advisor

Re: How to create a RAID 1 mirrored disk setup...?

Your questions could be answered by checking out this url

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=237469


-j
Steven E. Protter
Exalted Contributor

Re: How to create a RAID 1 mirrored disk setup...?

If you have mirror/ux this is simple, so long as you don't try and mix raid and striping.

To create a raid one mirror

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c6t4d0

HP-UX comes with Raid 5 type striping build into the LVM.

VxVM veritas volume manager is similarly configured except you can mirror the root vg without add in software.

Here is a complete procedure for creating a bootable, raid 1 mirrored system.

vcreate -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 disk

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
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

Thank you ALL for your input and generous help. Using the information provided by you, I will create the RAID 1 mirrored disks / setup. If I run into any glitches or problems, I will update this support issue later.

Cameron
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?


I am following the above advice, and specifically the step-by-step instructions at the link:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=237469

to create a mirrored DISK (all partitions). But I have more questions...

DO I HAVE TO BE IN SINGLE USER MODE IN ORDER TO CREATE THE MIRRORED LOGICAL VOLUMES...???

Details of the server in question:

I have installed HP-UX 11.11 (11i) on the 18GB drive located in slot A1, or 0/0/2/0.2, device /dev/dsk/c2t2d0. I want to mirror this entire drive (all logical volumes) to the 18 GB drive located in slot B1, or 0/0/1/1.2, which would be device /dev/dsk/c1t2d0. During the install of the OS, I opted not to create seperate physical partitions/logical voluems for all the "standard" OS directories. Instead, I specified a physical logical volume for /home and /tmp, but the rest was all created/assigned under the root directory ("/"). Thus, my logical volume layout for /dev/dsk/c2t2d0 is:

lvol1 /stand
lvol2 swap/dump
lvol3 /
lvol4 /home
lvol5 /tmp


During the [attempted] creation of the mirrored logical volumes, when I issue the commands:

pvcreate -B /dev/rdsk/c1t2d0
mkboot -l /dev/rdsk/c1t2d0
mkboot -a "hpux(;0)/stand/vmunix" /dev/rdsk/c1t2d0
vgextend /dev/vg00 /dev/dsk/c1t2d0
...etc...

I get some errors (which I had forgotten to write down! duh!).

Thank you,

Cameron

cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

after booting into single user mode, and issuing a "mount -a", these are the errors that I get:

# ./mkboot -l /dev/rdsk/c1t2d0
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? y
# ./mkboot -a "hpux(;0)/stand/vmunix" /dev/rdsk/c1t2d0
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? y
# ./vgextend /dev/vg00 /dev/dsk/c1t2d0
vgextend: Couldn't install the physical volume "/dev/dsk/c1t2d0".
Device busy
#



Any help will be appreciate, please.

Thank you.

Cameron
Sridhar Bhaskarla
Honored Contributor

Re: How to create a RAID 1 mirrored disk setup...?

Hi Cameron,

You can do the mirroring part in multi-user mode. You don't need to do it single-user mode.

There are quite a few threads on the exact procedure including this one. You can follow SEP's procedure.

However, remember that lvol1 (/stand) should be the first logical volume to be present on both the disks which means you have to extend it first. I suggest you do it clean. Do not forget the setboot command.

Post the errors if you get any.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

Sri,

Thank you for replying. What do you mean by 'do it clean'...?

Thanks,

Cameron
Sridhar Bhaskarla
Honored Contributor

Re: How to create a RAID 1 mirrored disk setup...?

I posted the reply before you added your next message. I thought you already vgextended c1t2d0 into vg00. Looks like it failed.

Make sure c1t2d0 is "the" mirror disk. You can find out if the disk is in use by doing 'strings /etc/lvmtab |grep c1t2d0'. If it is not used, then you will need to do a pvcreate before you do mkboot.

pvcreate /dev/rdsk/c1t2d0 (specify -f if it complains)

Then follow mkboot -l etc., etc procedure.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: How to create a RAID 1 mirrored disk setup...?

A little correction - -B is needed to make it bootable with pvcreate option

Use pvcreate -B /dev/rdsk/c1t2d0 (use -f if it complains)

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

Before I issue the commands suggested by you and SEP, should I go into SAM and add the disk (which is to be the mirrored disk) to the volume group vg00...?

Thanks,

Cameron
Sridhar Bhaskarla
Honored Contributor

Re: How to create a RAID 1 mirrored disk setup...?

Cameron,

No. You shouldn't use SAM to add the disk. The procedure does already include to add the disk to vg00 with vgextend. If you follow step by step, it should work.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

To everyone, and specifically STEVEN en SRI:

THANK YOU ALL for your help. Following your instructions I sucessfully managed to create a mirrored bootable disk!

Regards,

Cameron
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

Sorry -- one LAST question:

After creating the mirrored drives, how do I know from WHICH boot path the server was bootd up? E.g. was it the primary /dev/rdsk/c2t2d0 (0/0/2/0.2) or alternative /dev/rdsk/c1t2d0 (0/0/1/1.2)...?

Thanks

Cameron
Sridhar Bhaskarla
Honored Contributor

Re: How to create a RAID 1 mirrored disk setup...?

Hi Cameron,

Do an 'lvdisplay -v /dev/vg00/lvol1|more' and observe the output. It should list the mirrored PVs as PV1 and PV2. PV1 is the current boot disk.

You can get it from setboot also but it can be overridden if you interacted with the BCH and specified the path manually.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
cninham
Frequent Advisor

Re: How to create a RAID 1 mirrored disk setup...?

Hello Sri,

Thank you for replying. During the boot, at the 'Early Boot VFP' whether I enter 'BO PRI' or 'BOOT ALT'. When the server is up, at the console/prompt, I do 'lvdisplay -v /dev/vg00/lvol1|more'. However, I see the same results for VP1 and VP2, regardless of whether I booted from PRI or ALT...?

It appears to me that 'lvdisplay -v /dev/vg00/lvol1' does not tell me which actual boot path (PRI or ALT) was used to boot from...

Here are the results:

BOOTING FROM *PRI* BOOT PATH:
-----------------------------

# lvdisplay -v /dev/vg00/lvol1|more
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 512
Current LE 128
Allocated PE 256
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t2d0 128 128
/dev/dsk/c1t2d0 128 128

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t2d0 00000 current /dev/dsk/c1t2d0 00000 current
00001 /dev/dsk/c2t2d0 00001 current /dev/dsk/c1t2d0 00001 current
00002 /dev/dsk/c2t2d0 00002 current /dev/dsk/c1t2d0 00002 current
...etc...
...etc...
...etc...


BOOTING FROM *ALT* BOOT PATH:
-----------------------------

--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 512
Current LE 128
Allocated PE 256
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t2d0 128 128
/dev/dsk/c1t2d0 128 128

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t2d0 00000 current /dev/dsk/c1t2d0 00000 current
00001 /dev/dsk/c2t2d0 00001 current /dev/dsk/c1t2d0 00001 current
00002 /dev/dsk/c2t2d0 00002 current /dev/dsk/c1t2d0 00002 current



Am I missing something?

Thank you,

Cameron