Operating System - HP-UX
1830207 Members
2129 Online
109999 Solutions
New Discussion

Re: mirroring a single larger disk on multiply smaller disks

 
SOLVED
Go to solution
aique
Frequent Advisor

mirroring a single larger disk on multiply smaller disks

Hi,
Although it sounds funny but i just need to confirm that Can we mirror a logical volume residing on single larger disk (say 2TB) with multiple smaller disks (say 500GB each) ??

BR

AQ
16 REPLIES 16
Pete Randall
Outstanding Contributor

Re: mirroring a single larger disk on multiply smaller disks

Of course. MirrorDisk/UX is LVM based and therefore has no perception of the physical disks that make up the logical volume. As long as you have sufficient space, it will work just fine.


Pete

Pete
sujit kumar singh
Honored Contributor

Re: mirroring a single larger disk on multiply smaller disks

hi

if the present LV that you wish to mirror is set as Contiguous policy make sure that this sort of mirroring that is desired here, you will need to make that Non-Contiguous by running lvchange -C n .


Also Using a PVG can help in here.


REgards
Sujit
James R. Ferguson
Acclaimed Contributor

Re: mirroring a single larger disk on multiply smaller disks

Hi:

Since LVM mirroring occurs at the _logical_ _volume_ level, yes. I presume that you are only interested in providing high-availability for one or more, but not all the logical volumes.

By default, LVM will not allow you to place mirrored extents on the same physical disk. This is the 'strict' policy. To defeat this negates the value of mirroring.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: mirroring a single larger disk on multiply smaller disks

Shalom,

Sure, just keep notes because the next time you have to re-arrange storage you will wonder what fool came up with this setup.

Just change the desk in the lvextend -m 1 statement

:-)

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

Re: mirroring a single larger disk on multiply smaller disks

Hi,
Thanks guys for your valuable replys. Let me refine my previous question again for more clarification :) As I mentioned earlier, I have a single logical volume on a 2000GB disk. I now want to mirror it but I right now have multiple smaller size disks say 500GB each. So what I need to confirm is, can I specify multiple disks in "lvextend -m 1" command e.g.
lvextend -m 1

BR
AQ
Eric SAUBIGNAC
Honored Contributor

Re: mirroring a single larger disk on multiply smaller disks

Bonjour Abdul

Definitively yes.

Eric
aique
Frequent Advisor

Re: mirroring a single larger disk on multiply smaller disks

OK, can we see the progress of "lvextend -m 1" comomand by any means? Actually I need to guess that how much time a lvol of 2TB would take to get mirrored? Any suggestions???

AQ
Pete Randall
Outstanding Contributor

Re: mirroring a single larger disk on multiply smaller disks

> Any suggestions?

Yes: patience. This is going to take a l...o...n...g time - probably hours and hours.


Pete

Pete
sujit kumar singh
Honored Contributor
Solution

Re: mirroring a single larger disk on multiply smaller disks

Hi

You can see by the command lvdisplay

#lvdisplay -v /dev/vgXX/lvolY | grep -i stale|wc -l

there you can see that the Stale Extents are decreasing and the Current Extents are increasing for the NEW PVs.


After sometime
#lvdisplay -v /dev/vgXX/lvolY | grep -i stale|wc -l


This way you can have an idea that mirror sync is going on as you will find the no of Stale Extents Secreasing.


Regards
Sujit
Pete Randall
Outstanding Contributor

Re: mirroring a single larger disk on multiply smaller disks

As far as seeing progress, the only idea I can think of is to watch the activity on the disk volumes that are being mirrored to. You could use glance, if available, or one of the more traditional utilities (sar?, iostat?), or you could just watch the lights on the drives. If you've got 4 mirror drives, you can tell when you're one quarter done, half done, and three quarters done by when the activity switches to each successive disk.


Pete

Pete
aique
Frequent Advisor

Re: mirroring a single larger disk on multiply smaller disks

Thanks guys. Well can you please tell the procedure if i need to get back older disk from the mirror and from Volume Group as well? And would any downtime be required for this procedure? Actually we are shifting data from one storage to another storage?

AQ
Ganesan R
Honored Contributor

Re: mirroring a single larger disk on multiply smaller disks

Hi Abdul,

Answer for your first question -> OK, can we see the progress of "lvextend -m 1" comomand by any means?

Yes. you can. Use the command prefix with "timex" command. It will provide how much time the command took to finish the job.

#timex lvextend -m 1

Also you can watch the progress by using the command.

#lvdisplay -v |grep stale |wc -l

no of stale extends should reduce progressively.
Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: mirroring a single larger disk on multiply smaller disks

Hi Abdul,

>>>>Well can you please tell the procedure if i need to get back older disk from the mirror and from Volume Group as well? And would any downtime be required for this procedure?<<<<

No downtime required for this process.

Once you mirrored follow this process.

#lvreduce -m 0
#lvdisplay -v --> Make sure the lv is spread across only the newdisks.
#vgreduce

#pvremove /dev/rdsk/cxtxdx

Note: pvremove is to remove the lvm headers from the disk.
Best wishes,

Ganesh.
sujit kumar singh
Honored Contributor

Re: mirroring a single larger disk on multiply smaller disks

Hi

if you want to take the 2 TB disk out of the VG this can be simply done using:

#lvextend -m 0 /dev/vgXX/lvolY /dev/dsk/cxtydz

where /dev/dsk/cxtydz corresponds to the disk 2 TB disk.

repaeat this to remove the mirror for all LVs from this Disk.(make sure that you have valid mirror copies of allthe LVs on Other Disks before reducing mirror with lvreduce -m 0)


#vgreduce /dev/vgXX /dev/dsk/cxtydz
#vgreduce -l /dev/vgXX /dev/dsk/cxtydz

to remove the Alternate paths of the disk from the VG.

You have done that.
yes this can be done online.


After that if wish to remove the HW paths and device files of the Disk also then do.

#ioscan -fnCdisk
know the HW path for the Disk yiu want to remove from the system.

#rmsf -H

Regards
Sujit
aique
Frequent Advisor

Re: mirroring a single larger disk on multiply smaller disks

Thanks guys for your valuable support. Well I have some more questions like:
1) As we are mirroring multiple Logical Volumes (coming from EVA5000) with another Storage (EVA8000) one by one, could these newly mirrored Logical Volumes create any system performance issue as I/Os are now being written at 2 different locations?
2) There is a Volume Group which has 2 disks originally, one is local and other is from SAN i.e. from EVA5000. Two Logical Volumes are created in this VG. I noticed that 1 Logical Volume is spanning on all 2 disks i.e. some physical extents from 2nd disk are also used by this LV and Second LV is spanning on only 1 disk. So what I want to ask is: what steps should be followed to LVREDUCE these Logical volumes in order to redirect I/Os to mirror?
Note: In mirroring process, I have created seprate disks for each Logical volume.

regards,

AQ
Andres_13
Respected Contributor

Re: mirroring a single larger disk on multiply smaller disks

1) Definitively no. The more disk you have, the merrier.

2) lvextend and lvreduce should be enough.

Regards!