Operating System - HP-UX
1752620 Members
4198 Online
108788 Solutions
New Discussion юеВ

Re: Advice with mirroring and hotspare for a novice

 
SOLVED
Go to solution
marko asplund
Frequent Advisor

Advice with mirroring and hotspare for a novice

hi

i've just received a new HP 9000 server (rp3410) running HP-UX 11i v1 and i need to set up the file systems to use disk mirroring. i haven't done it before so i'd like to get some advice or references to documentation regarding the subject.

the system is currently running on one disk which has (1 volume group, 8 logical volumes). i'd like to create a mirror for this disk and assign a hotspare for the mirror pair. i assume that the 'Disks and File Systems' tools in SAM can be used to accomplish this somehow but how do i do it exactly? i'm still planning on changing the logical volume setup on the currently used disk, does this affect mirroring? can i modify the logical volume setup for the mirror pair after mirroring has been configured?

are there any common caveats i should be aware of?

we have a MirrorDisk/UX license for doing the mirroring.


br. aspa
9 REPLIES 9
Mobeen_1
Esteemed Contributor

Re: Advice with mirroring and hotspare for a novice

Marko,
The following link should give you all the required information on mirroring in HP-UX

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

Additionally i would strongly urge you to read the following document (Chap 6) to get a better insight into the concepts

http://docs.hp.com/hpux/pdf/B2355-90742.pdf

If you need any specific information, throw it at us and we will try to do our best

rgds
Mobeen
Sunil Sharma_1
Honored Contributor

Re: Advice with mirroring and hotspare for a novice

Hi,

There is no Hotspare concept in HP LVM.

Other information is well covered in given threads

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
marko asplund
Frequent Advisor

Re: Advice with mirroring and hotspare for a novice

thanks for the great references.

the Sysadmin guide says you can use either VERITAS Volume Manager or HP LVM (+MirrorDisk/UX) for mirroring. which one should i use in this case? i'd like to mirror all logical volumes including / and swap.


br. aspa
Joseph Loo
Honored Contributor

Re: Advice with mirroring and hotspare for a novice

hi,

based on your description, u r only planning to mirror the boot disk?

if u want to just do that, please follow the steps (for MirrorUX) given in this guide:

http://www1.itrc.hp.com/service/cki/search.do?category=c0&mode=id&searchString=LVMKBRC00005103&searchCrit=exactphrase&docType=Security&docType=Patch&docType=EngineerNotes&docType=BugReports&docType=Hardware&docType=ReferenceMaterials&docType=ThirdParty&search.x=14&search.y=7

or proceed to "technical knowledge base" and search by doc id for "LVMKBRC00005103".

regards.
what you do not see does not mean you should not believe
marko asplund
Frequent Advisor

Re: Advice with mirroring and hotspare for a novice

i read through the documentation and with the following commands it seems i managed to mirror all the logical volumes (including /stand, / and swap):

pvcreate -B /dev/rdsk/c2t1d0
vgextend /dev/vg00 /dev/dsk/c2t1d0
mkboot /dev/rdsk/c2t1d0
mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0
... # repeat the above for all existing logical volumes

does this look right?

according to the documentation MirrorDisk/UX supports the concept of a hot spare. i created a spare with the following commands:

pvcreate /dev/rdsk/c3t2d0
vgextend -z y /dev/vg00 /dev/dsk/c3t2d0

now, i'm still a bit uncertain how logical volume mirrors are affected when i resize a volume. is resizing possible with mirrored volumes?


br. aspa
Pete Randall
Outstanding Contributor

Re: Advice with mirroring and hotspare for a novice

Marko,

I'm attaching the complete, tried and true procedure for mirroring your root disk.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Advice with mirroring and hotspare for a novice

Oh - regarding your resizing question, yes you can resize mirrored lvols - provided you have enough space on both of the disks.


Pete

Pete
Bill Hassell
Honored Contributor
Solution

Re: Advice with mirroring and hotspare for a novice

LVM is much simpler to use if you're not already familiar with VxVM volume manager. Note that MirrorDisk/UX is a purchased product so it must be installed on your system before the lvextend -m 1 command will work. To see if it exists:

swlist -l fileset|grep -i mirror

You will see LVM-MIRROR-RUN if the product has been installed.

If you are just using two disks, one primary and one mirror, then the commands are correct for the first set of commands. pvcreate forms a boot and header area, vgextend adds the disk to the current volume group and mkboot commands setup the second disk so it can also be bootable. The lvextend -m 1 does the actual mirroing. You repeat just the lvextend command for each lvol on the disk. It isn't necessary to specify the target disk for mirroring in this case. Using a target disk for mirroring is used with volume groups that have many unused disks to specify the desired location for the mirror. You can do the lvextends in a simple loop from the command line:

for LV in 1 2 3 4 5 6 7 8
do
lvextend -m 1 /dev/vg00/lvol$LV
done

Now the manual is probably a bit misleading with the explanation of a hot spare. The vgextend command will indeed add the 3rd disk to the group but it won't be of any use as it will have no data on it. Instead, you can change the lvextend command from -m 1 to -m 2 and specify the physical disks in the order you want to use. This is double mirroring and quite useful in taking backups. All 3 disks will be continuously synced with very low overhead and at any time, you can reduce the mirror count to split off one of the mirrors, then mount the separate disk under it's own set of mountpoints. NOTE: The maximum number of additional disk space that can be added to a volume group is fixed when the VG is created and cannot be changed. So if there aren't enough extents slots in the VG, an additional disk can't be added.

And resizing is completely transparent. If you increase the size of an lvol, all of the mirrors are extended automatically. Note that to extend a filesystem without un-mounting it, you'll need the extra product Online JFS. Without Online JFS, to extend a filesystem, you unmount it, extend the lvol with lvextend, then extend the filesystem with extendfs. Now you can remount the larger filesystem. It is recommended never to reduce a filesystem without a full backup. Note that root can use lvreduce ay any time which generally destroys the lvol.


Bill Hassell, sysadmin
Kyris
Frequent Advisor

Re: Advice with mirroring and hotspare for a novice

Please see attached file which hopefully will help.

kyris