Operating System - HP-UX
1827295 Members
1959 Online
109960 Solutions
New Discussion

Re: commands for creating striped drives that are then mirrored

 
SOLVED
Go to solution
kevin Richard_2
Occasional Contributor

commands for creating striped drives that are then mirrored

Hi,

I am trying to figure out how to create a triple mirrored striped set of drives.
Basically looking at breaking the mirror setup when I need to do a backup leaving 2 drives still mirrored until backup gets done.

I am not sure of the command flow to do this? has anyone tried this?

Thank You

9 REPLIES 9
sujit kumar singh
Honored Contributor

Re: commands for creating striped drives that are then mirrored

Hi Kevin

if i am correct then you have an LV that is Striped and you want to create the 3 way mirroring of that.
if i am not correct then correct me and tell the OS version and waht is the LVM version of the VG?


in case you are having per 11.31 OS and situation , the mirroring and stripping is possible only with the use of PVGs and PVG based mirroring.


however in 11.31 you can simply create a striped vols nd go ahead with mirroring that
perhaps Sep,2008 release ... not too sure

any way for a mirrored LV use use the lvsplit command , fsck , mkdir, and mount that Split Lv , do backup, unmount and lvmerge after the backup is finished.


the question is of that if a striped LV is there , you can lvextend -m 1 for that if the OS is 11.23 and old.

in 11.23 you can use the PVG strict mirroring and using -Dy -s g of lvextend can create a mirrored and striped LV


regards
sujit


Ganesan R
Honored Contributor

Re: commands for creating striped drives that are then mirrored

Hi Kevin,

Striping is something different than mirroring. I assume that you want to have 2 mirror copies other than original one.
This you can achieve using this command.
#lvextend -m 2 lvname

But the problem is you cannot keep 2 copies one side and other one copy other side to take backup. Once you reduce the mirror you will no longer have access to the reduced copy.

You need to use lvsplit/lvmerge command if you want to take backup by splitting the mirror and merge it after backup.

Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: commands for creating striped drives that are then mirrored

Hi Kevin,

These are the steps you need to follow up.

I assume you have a logical volume which needs to be splitted for backup. First create two mirror copies.

#lvextend -m 2

After mirrored check with lvdisplay.
#lvdisplay -v

Now split the mirror using the following command.

#lvsplit -s backup /dev/vg01/lvol1

Now new lv created in the name of /dev/vg01/lvol1backup. But lvol1 will still have one mirror copy. You can mount lvol1backup on any mount point and take backup.

#mount /dev/vg01/lvol1backup /backup

After backed up you need to merge the lvol1backup with lvol1. For this you need to use the below command.

#umount /backup #lvmerge /dev/vg01/lvol1backup /dev/vg01/lvol1

After merging you will have 2 mirror copies again.

Hope this helps.
Best wishes,

Ganesh.
kevin Richard_2
Occasional Contributor

Re: commands for creating striped drives that are then mirrored

Thank You for your responses. The OS is

11.23. Drives would be on a 6402 Smart array controller.

Drive size is 72GB.
kevin Richard_2
Occasional Contributor

Re: commands for creating striped drives that are then mirrored

As usual I didnt make myself clear. I am looking for the commands to stripe the drives and then mirror those striped drives.

I have the flow for the breaking and merging of the mirror for the backup.
sujit kumar singh
Honored Contributor

Re: commands for creating striped drives that are then mirrored

hi


but if you are using the SA Smart Array Controller Card you would already might have teh drives being used in RAID !!!

can u give
#ioscan -fnCext_bus


find for the devices as /dev/cissX
give the O/P of
#sautil /dev/cissX
like
#sautil /dev/ciss4 etc
and also
#ioscan -fnCdisk.

Ganeshan already gave you a sequence of creating the mirror, Split, mount and backup and merge that you can do


regards
sujit
sujit kumar singh
Honored Contributor

Re: commands for creating striped drives that are then mirrored

Hi


What i mean to say that if the Disk Drives are connected to the RAID Controller card SA6402 then why you need to Stripe That from LVM, you can create RAID VOls on the disk and after that if you wish you can create a VG using that RAID Vol and if reqd then Mirror using LVM !!!



please post

#ioscan -fnCdisk
#ioscan -fnCext_bus
#sautil /dev/cissX
#vgdisplay -v
regards
sujit
Ganesan R
Honored Contributor
Solution

Re: commands for creating striped drives that are then mirrored

Hi Kevin,

If you want striped mirror, first you should create PVG. Because mirror on striped logical must need PVG. In your case you need 3 PVG's since you need 2 way mirroring. Create /etc/lvmpvg file with 3 PVG's.

Format should be like this..
# cat /etc/lvmpvg
VG /dev/vg01
PVG pvg1
/dev/dsk/c0t1d0
/dev/dsk/c0t2d0
PVG pvg2
/dev/dsk/c1t4d0
/dev/dsk/c1t5d0
PVG pvg3
/dev/dsk/c2t4d0
/dev/dsk/c2t5d0

Once you have PVG's in place, create a two way mirrored distributed logical volume using the below command.

#lvcreate -D y -s g -m 2 -L 1000M /dev/vg01

This will create a striped lv with 2 mirror copies. Each mirror will be placed in seperate PVG group. Once you have done you can follow the split/merge process to backup.

Hope this clear your doubts.
Best wishes,

Ganesh.
kevin Richard_2
Occasional Contributor

Re: commands for creating striped drives that are then mirrored

G,

Looks like those steps will do it. Ive ordered the drives and have the option of trying them on a test server, will then go
on to the Production server.

Thank You both (G & S) for your help.

K