How to Mirror LV and umirror after to change PVs...

Greetings

Im running HP UX B 11.11 and Im not sure on how to do this request to "mirror current 5 LVs on vgSPAN to the new LUNs assigned to the VG and unmirror the LVs and finally return the 12 LUNs to SAN storage" The existing LVs were extended to accommodate a user request to extend 2 FS on this VG

This is my vgdisplay -v | more output:

--- Volume groups ---
VG Name                     /dev/vgSPAN
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      5      
Open LV                     5      
Max PV                      16     
Cur PV                      12     
Act PV                      12     
Max PE per PV               16000        
VGDA                        24  
PE Size (Mbytes)            32              
Total PE                    19956   
Alloc PE                    14066   
Free PE                     5890    
Total PVG                   1        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vgSPAN/lvol1
   LV Status                   available/syncd           
   LV Size (Mbytes)            4224            
   Current LE                  132       
   Allocated PE                132         
   Used PV                     6       

   LV Name                     /dev/vgSPAN/lvol2
   LV Status                   available/syncd           
   LV Size (Mbytes)            4224            
   Current LE                  132       
   Allocated PE                132         
   Used PV                     6       

   LV Name                     /dev/vgSPAN/lvol3
   LV Status                   available/syncd           
   LV Size (Mbytes)            71680           
   Current LE                  2240      
   Allocated PE                2240        
   Used PV                     12      

   LV Name                     /dev/vgSPAN/lvol4
   LV Status                   available/syncd           
   LV Size (Mbytes)            368640          
   Current LE                  11520     
   Allocated PE                11520       
   Used PV                     12      

   LV Name                     /dev/vgSPAN/lvol5
   LV Status                   available/syncd           
   LV Size (Mbytes)            1344            
   Current LE                  42        
   Allocated PE                42          
   Used PV                     6       


   --- Physical volumes ---
   PV Name                     /dev/dsk/c33t8d2
   PV Name                     /dev/dsk/c35t8d2 Alternate Link
   PV Status                   available                
   Total PE                    959     
   Free PE                     0       
   Autoswitch                  On        

   PV Name                     /dev/dsk/c35t8d3
   PV Name                     /dev/dsk/c33t8d3 Alternate Link
   PV Status                   available                
   Total PE                    959     
   Free PE                     0       
   Autoswitch                  On        

   PV Name                     /dev/dsk/c33t8d4
   PV Name                     /dev/dsk/c35t8d4 Alternate Link
   PV Status                   available                
   Total PE                    959     
   Free PE                     0       
   Autoswitch                  On        

   PV Name                     /dev/dsk/c35t8d5
   PV Name                     /dev/dsk/c33t8d5 Alternate Link
   PV Status                   available                
   Total PE                    959     
   Free PE                     0       
   Autoswitch                  On        

   PV Name                     /dev/dsk/c33t8d6
   PV Name                     /dev/dsk/c35t8d6 Alternate Link
   PV Status                   available                
   Total PE                    959     
   Free PE                     0       
   Autoswitch                  On        

   PV Name                     /dev/dsk/c35t8d7
   PV Name                     /dev/dsk/c33t8d7 Alternate Link
   PV Status                   available                
   Total PE                    959     
   Free PE                     0       
   Autoswitch                  On        

   PV Name                     /dev/dsk/c44t9d4
   PV Name                     /dev/dsk/c45t9d4 Alternate Link
   PV Status                   available                
   Total PE                    2367    
   Free PE                     981     
   Autoswitch                  On        

   PV Name                     /dev/dsk/c44t9d5
   PV Name                     /dev/dsk/c45t9d5 Alternate Link
   PV Status                   available                
   Total PE                    2367    
   Free PE                     981     
   Autoswitch                  On        

   PV Name                     /dev/dsk/c44t9d6
   PV Name                     /dev/dsk/c45t9d6 Alternate Link
   PV Status                   available                
   Total PE                    2367    
   Free PE                     982     
   Autoswitch                  On        

   PV Name                     /dev/dsk/c44t9d7
   PV Name                     /dev/dsk/c45t9d7 Alternate Link
   PV Status                   available                
   Total PE                    2367    
   Free PE                     982     
   Autoswitch                  On        

   PV Name                     /dev/dsk/c44t10d0
   PV Name                     /dev/dsk/c45t10d0        Alternate Link
   PV Status                   available                
   Total PE                    2367    
   Free PE                     982     
   Autoswitch                  On        

   PV Name                     /dev/dsk/c44t10d1
   PV Name                     /dev/dsk/c45t10d1        Alternate Link
   PV Status                   available                
   Total PE                    2367    
   Free PE                     982     
   Autoswitch                  On        


   --- Physical volume groups ---
   PVG Name                    PVG0                       
   PV Name                     /dev/dsk/c33t8d2           
   PV Name                     /dev/dsk/c35t8d3           
   PV Name                     /dev/dsk/c33t8d4           
   PV Name                     /dev/dsk/c35t8d5           
   PV Name                     /dev/dsk/c33t8d6           
   PV Name                     /dev/dsk/c35t8d7           
   PV Name                     /dev/dsk/c44t9d4           
   PV Name                     /dev/dsk/c44t9d5           
   PV Name                     /dev/dsk/c44t9d6           
   PV Name                     /dev/dsk/c44t9d7           
   PV Name                     /dev/dsk/c44t10d0          
   PV Name                     /dev/dsk/c44t10d1 

These are the new disks assigned to server:

/dev/rdsk/c44t10d2           e1  0a  d2  CL1B  06:0f  OPEN-V           00045468

/dev/rdsk/c45t10d2           d3  0a  d2  CL2B  06:0f  OPEN-V           00045468

/dev/rdsk/c44t10d3           e1  0a  d3  CL1B  06:10  OPEN-V           00045468

/dev/rdsk/c45t10d3           d3  0a  d3  CL2B  06:10  OPEN-V           00045468

/dev/rdsk/c44t10d4           e1  0a  d4  CL1B  06:11  OPEN-V           00045468

/dev/rdsk/c45t10d4           d3  0a  d4  CL2B  06:11  OPEN-V           00045468

/dev/rdsk/c44t10d5           e1  0a  d5  CL1B  06:12  OPEN-V           00045468

/dev/rdsk/c45t10d5           d3  0a  d5  CL2B  06:12  OPEN-V           00045468

File systems:

spthpn22:/root# bdf /data/prod01 /dblog01
Filesystem          kbytes    used   avail %used Mounted on
/dev/vgSPAN/lvol4  377487360 206431272 169719776   55% /data/prod01
/dev/vgSPAN/lvol3  73400320    4968 72822024    0% /dblog01
spthpn22:/root# date
Tue Jun  8 14:38:55 EST 2010

LV stat:

spthpn22:/root# lvdisplay -v /dev/vgSPAN/lvol4 | more
--- Logical volumes ---
LV Name                     /dev/vgSPAN/lvol4
VG Name                     /dev/vgSPAN
LV Permission               read/write   
LV Status                   available/syncd           
Mirror copies               0            
Consistency Recovery        MWC                 
Schedule                    parallel     
LV Size (Mbytes)            368640          
Current LE                  11520     
Allocated PE                11520       
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   NONE         
Allocation                  PVG-strict/distributed
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV  
   /dev/dsk/c33t8d2   694       694       
   /dev/dsk/c35t8d3   694       694       
   /dev/dsk/c33t8d4   694       694       
   /dev/dsk/c35t8d5   694       694       
   /dev/dsk/c33t8d6   694       694       
   /dev/dsk/c35t8d7   694       694       
   /dev/dsk/c44t9d4   1226      1226      
   /dev/dsk/c44t9d5   1226      1226      
   /dev/dsk/c44t9d6   1226      1226      
   /dev/dsk/c44t9d7   1226      1226      
   /dev/dsk/c44t10d0  1226      1226      
   /dev/dsk/c44t10d1  1226      1226    
spthpn22:/root# lvdisplay -v /dev/vgSPAN/lvol3 | more
--- Logical volumes ---
LV Name                     /dev/vgSPAN/lvol3
VG Name                     /dev/vgSPAN
LV Permission               read/write   
LV Status                   available/syncd           
Mirror copies               0            
Consistency Recovery        MWC                 
Schedule                    parallel     
LV Size (Mbytes)            71680           
Current LE                  2240      
Allocated PE                2240        
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   NONE         
Allocation                  PVG-strict/distributed
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV  
   /dev/dsk/c33t8d2   214       214       
   /dev/dsk/c35t8d3   214       214       
   /dev/dsk/c33t8d4   214       214       
   /dev/dsk/c35t8d5   214       214       
   /dev/dsk/c33t8d6   214       214       
   /dev/dsk/c35t8d7   214       214       
   /dev/dsk/c44t9d4   160       160       
   /dev/dsk/c44t9d5   160       160       
   /dev/dsk/c44t9d6   159       159       
   /dev/dsk/c44t9d7   159       159       
   /dev/dsk/c44t10d0  159       159       
   /dev/dsk/c44t10d1  159       159   

Thank you in advance..

What puzzles me is at first look is that you are using at least 6 PVs (even 12...) in each LV I suppose for performance ( using PVG ...).
Even if system doesnt say so you are in almost stripped mode (distributed)...

I dont see how, with 5 new PVs you can achieve the same (it will be unbalanced...)

---------- Post updated at 13:24 ---------- Previous update was at 13:23 ----------

Will move thread to more suitable forum (HP-UX)

Perfect and agreed, I don't think it makes good sense either!

-DB

Hi all

I totally forgot i posted this entry! The entry is not entirely correct. I was doing fine until i reached the part where i had to unmirror the old disks to return to SAN team

I was really nervous when i was doing lvreduce, and i missed the space in this syntax:

lvreduce -m 0 /dev/vgSPAN/lvol1 /dev/dsk/c33t8d6 /dev/dsk/c35t8d7 /dev/dsk/c44t10d2 /dev/dsk/c44t10d3 /dev/dsk/c44t10d4 /dev/dsk/c44t10d

So i had to do a bit of reverse engineering here. I had to lvextend -m again then lvreduce it and finally vgreduce from VGSPAN to clear the old disks from usage.

Phew* I got that sorted out..thank you anyways