Split VG and move to new disks

 
SOLVED
Go to solution
Debbie Beresford
Frequent Advisor

Split VG and move to new disks

I am working on an RP2470 running HP-UX 11.23.  We currently have one vg with 9 lvols.  We will be replacing our existing disks with larger ones (external SAN).  For performance purposes, I am being asked to move each of 4 lvols to separate disks.  What is the best way to do this.  Mirroring to the new disk was originally suggested but it doesn't seem to make sense if I am going to have to create 5 separate vgs instead of the one large vg.

17 REPLIES 17
Torsten.
Acclaimed Contributor

Re: Split VG and move to new disks

You can have 4 LVOLS on 4 separate disks even if all the disks are within the same VG.

Do you really want to use 4 separate VGs?

Then you can only "copy" (backup/restore) your data from one VG to another.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Debbie Beresford
Frequent Advisor

Re: Split VG and move to new disks

No, I don't necessarily need 4 vgs.  I thought if I wanted to make sure the data was on a separate disk I had to do it that way.  The disks will be presented from the SAN as 5 separate disks.  How do I ensure the lvols go to separate disks?  These are for use with an Oracle database.  they want data in one place and the database divided into 4.

Torsten.
Acclaimed Contributor
Solution

Re: Split VG and move to new disks

You simply create an lvol with zero size, then use lvextend to extend the LVOL to a specific disk.

 

Same can be done while mirroring the data, let's say

 

# lvextend -m 1 /dev/vg01/lvol1 /dev/disk/disk1

# lvextend -m 1 /dev/vg01/lvol2 /dev/disk/disk2

etc ...

 


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Debbie Beresford
Frequent Advisor

Re: Split VG and move to new disks

That sounds great!  Kind of like killing 2 birds with one stone!  And no data restore.  Thanks very much for your help.

Torsten.
Acclaimed Contributor

Re: Split VG and move to new disks

In case your new LUNs from SAN will be larger than the existing disks you may have a problem with the VG limits (max_pe_per_pv).

In this case you need to increase these values using "vgmodify" first. Then you can mirror your data to the new array LUN.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Debbie Beresford
Frequent Advisor

Re: Split VG and move to new disks

max_pe_per_pv is currently set to 65535.  I have one disk presented with a size of 817 GB.  I will be presenting 5 disks that will total 1.3 GB.  What to I need to change this value to?

 

Torsten.
Acclaimed Contributor

Re: Split VG and move to new disks

Please show the output of

# vgdisplay -v vg__

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Debbie Beresford
Frequent Advisor

Re: Split VG and move to new disks

sochp3.socan.ca(sudo)> /usr/sbin/vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name                     /dev/vg01
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      9
Open LV                     9
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               65535
VGDA                        2
PE Size (Mbytes)            16
Total PE                    52306
Alloc PE                    42690
Free PE                     9616
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
 
   --- Logical volumes ---
   LV Name                     /dev/vg01/u09
   LV Status                   available/syncd
   LV Size (Mbytes)            170000
   Current LE                  10625
   Allocated PE                10625
   Used PV                     1
 
   LV Name                     /dev/vg01/u08
   LV Status                   available/syncd
   LV Size (Mbytes)            170000
   Current LE                  10625
   Allocated PE                10625
   Used PV                     1
 
   LV Name                     /dev/vg01/u07
   LV Status                   available/syncd
   LV Size (Mbytes)            40960
   Current LE                  2560
   Allocated PE                2560
   Used PV                     1
 
   LV Name                     /dev/vg01/u06
   LV Status                   available/syncd
   LV Size (Mbytes)            51200
   Current LE                  3200
   Allocated PE                3200
   Used PV                     1
 
   LV Name                     /dev/vg01/u05
   LV Status                   available/syncd
   LV Size (Mbytes)            56320
   Current LE                  3520
   Allocated PE                3520
   Used PV                     1
 
   LV Name                     /dev/vg01/u04
   LV Status                   available/syncd
   LV Size (Mbytes)            56320
   Current LE                  3520
   Allocated PE                3520
   Used PV                     1
 
   LV Name                     /dev/vg01/u03
   LV Status                   available/syncd
   LV Size (Mbytes)            56320
   Current LE                  3520
   Allocated PE                3520
   Used PV                     1
 
   LV Name                     /dev/vg01/uw03
   LV Status                   available/syncd
   LV Size (Mbytes)            40960
   Current LE                  2560
   Allocated PE                2560
   Used PV                     1
 
   LV Name                     /dev/vg01/uw02
   LV Status                   available/syncd
   LV Size (Mbytes)            40960
   Current LE                  2560
   Allocated PE                2560
   Used PV                     1
 
 
   --- Physical volumes ---
   PV Name                     /dev/dsk/c18t0d0
   PV Name                     /dev/dsk/c14t0d0 Alternate Link
   PV Status                   available
   Total PE                    52306
   Free PE                     9616
   Autoswitch                  On
   Proactive Polling           On
 

Torsten.
Acclaimed Contributor

Re: Split VG and move to new disks

Largest possible LUN size is

Max PE per PV 65535
*
PE Size (Mbytes) 16
=
1048560MB

For a lrager LUN you need to set up a new LUN with a larger PE size.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!