[Solved] Need help with HP-UX 11.31 LVM!

Hi all,

I've created some logical volumes on a non-production server. I was supposed to make the new LV's similar to another LV already on the server. Supposed to be the similar to lvol5

I did everything right except one thing as somebody mentioned. I would like to figure out what I did wrong but I can't see it.

I was supposed to create 3 LV's on root: /scratch1 /scratch2 and /scratch3.

I just started working with LVM after taking HP classes at work so I'm really new at this.

This is my FS right now...

(root):/home2/root# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    4194304  236304 3927344    6% /
/dev/vg00/lvol1    4194304  553728 3612216   13% /stand
/dev/vg00/lvol7    16777216 2766560 13915160   17% /var
/dev/vg00/lvol6    16777216 3001912 13668496   18% /usr
/dev/vg00/lvol5    8388608 2458336 5883984   29% /tmp
/dev/vg00/lvol4    16777216 9029032 7687680   54% /opt
/dev/vg00/lvol8     532480    5744  522632    1% /scratch1
/dev/vg00/lvol9    1556480   21128 1523368    1% /scratch2
/dev/vg00/lvol10   2117632   21152 2080112    1% /scratch3
nfsdsvc-b:/hanfs/home
                   4194304 2024766 2036029   50% /home

The output of the VG in question:

(root):/home2/root# vgdisplay -v vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      10     
Open LV                     10     
Max PV                      16     
Cur PV                      2      
Act PV                      2      
Max PE per PV               4356         
VGDA                        4   
PE Size (Mbytes)            32              
Total PE                    8694    
Alloc PE                    8322    
Free PE                     372     
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     
VG Version                  1.0       
VG Max Size                 2178g      
VG Max Extents              69696         

   --- Logical volumes ---
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd           
   LV Size (Mbytes)            4096            
   Current LE                  128       
   Allocated PE                256         
   Used PV                     2       

   LV Name                     /dev/vg00/lvol2
   LV Status                   available/syncd           
   LV Size (Mbytes)            65536           
   Current LE                  2048      
   Allocated PE                4096        
   Used PV                     2       

   LV Name                     /dev/vg00/lvol3
   LV Status                   available/syncd           
   LV Size (Mbytes)            4096            
   Current LE                  128       
   Allocated PE                256         
   Used PV                     2       

   LV Name                     /dev/vg00/lvol4
   LV Status                   available/syncd           
   LV Size (Mbytes)            16384           
   Current LE                  512       
   Allocated PE                1024        
   Used PV                     2       

   LV Name                     /dev/vg00/lvol5
   LV Status                   available/syncd           
   LV Size (Mbytes)            8192            
   Current LE                  256       
   Allocated PE                512         
   Used PV                     2       

   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd           
   LV Size (Mbytes)            16384           
   Current LE                  512       
   Allocated PE                1024        
   Used PV                     2       

   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd           
   LV Size (Mbytes)            16384           
   Current LE                  512       
   Allocated PE                1024        
   Used PV                     2       

   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd           
   LV Size (Mbytes)            544             
   Current LE                  17        
   Allocated PE                17          
   Used PV                     1       

   LV Name                     /dev/vg00/lvol9
   LV Status                   available/syncd           
   LV Size (Mbytes)            1536            
   Current LE                  48        
   Allocated PE                48          
   Used PV                     1       

   LV Name                     /dev/vg00/lvol10
   LV Status                   available/syncd           
   LV Size (Mbytes)            2080            
   Current LE                  65        
   Allocated PE                65          
   Used PV                     1       


   --- Physical volumes ---
   PV Name                     /dev/disk/disk9_p2
   PV Status                   available                
   Total PE                    4347    
   Free PE                     121     
   Autoswitch                  On        
   Proactive Polling           On               

   PV Name                     /dev/disk/disk5_p2
   PV Status                   available                
   Total PE                    4347    
   Free PE                     251     
   Autoswitch                  On        
   Proactive Polling           On           

The only thing I see is that the LE's and PE's are not the same.

Can anyone point me the right way?

Thanks

With which commands did you use to create your lv ?

It looks you only specified one disk of the 2 physical volume that is why you get
Used PV 1
instead of
Used PV 2

What give the lvdisplay -v on your lv as well as on the reference lvol5 ?

1 Like

I don't know if that matters, but I was supposed to use vg00 to create 3 LV's (250 MB, 750MB, and 1GB):

So i did:

lvcreate -L 250 vg00
lvcreate -L 750 vg00
lvcreate -L 1024 vg00

After which I created the mount points /scratch1 /scratch2 and /scratch3. I then created the file system with makefs command.

---------- Post updated at 12:01 PM ---------- Previous update was at 11:54 AM ----------

Here are the outputs...

(root):/home2/root# lvdisplay -v /dev/vg00/lvol5
--- Logical volumes ---
LV Name                     /dev/vg00/lvol5
VG Name                     /dev/vg00
LV Permission               read/write                
LV Status                   available/syncd           
Mirror copies               1            
Consistency Recovery        MWC                 
Schedule                    parallel      
LV Size (Mbytes)            8192            
Current LE                  256       
Allocated PE                512         
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   on           
Allocation                  strict                    
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/disk/disk9_p2      256       256       
   /dev/disk/disk5_p2      256       256       

   --- Logical extents ---
(root):/home2/root# lvdisplay -v /dev/vg00/lvol8
--- Logical volumes ---
LV Name                     /dev/vg00/lvol8
VG Name                     /dev/vg00
LV Permission               read/write                
LV Status                   available/syncd           
Mirror copies               0            
Consistency Recovery        MWC                 
Schedule                    parallel      
LV Size (Mbytes)            544             
Current LE                  17        
Allocated PE                17          
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   on           
Allocation                  strict                    
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/disk/disk9_p2      17        17        

   --- Logical extents ---
(root):/home2/root# lvdisplay -v /dev/vg00/lvol9
--- Logical volumes ---
LV Name                     /dev/vg00/lvol9
VG Name                     /dev/vg00
LV Permission               read/write                
LV Status                   available/syncd           
Mirror copies               0            
Consistency Recovery        MWC                 
Schedule                    parallel      
LV Size (Mbytes)            1536            
Current LE                  48        
Allocated PE                48          
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   on           
Allocation                  strict                    
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/disk/disk9_p2      48        48        

   --- Logical extents ---
(root):/home2/root# lvdisplay -v /dev/vg00/lvol10
--- Logical volumes ---
LV Name                     /dev/vg00/lvol10
VG Name                     /dev/vg00
LV Permission               read/write                
LV Status                   available/syncd           
Mirror copies               0            
Consistency Recovery        MWC                 
Schedule                    parallel      
LV Size (Mbytes)            2080            
Current LE                  65        
Allocated PE                65          
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   on           
Allocation                  strict                    
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/disk/disk9_p2      65        65        

   --- Logical extents ---

Your lvol 5 has 1 mirror copy
So if you also want have some for your lv, you need to add some with the lvextend command with the -m 1 option and specifying your lv and a relevant disk location. Then the allocated Physical Extend (PE) will be twice your Logical Extend (LE) such as it is for your lvol5

Some additionnal command you may want to read about further, or for checking the correct syntax to use:

man pvdisplay/pvcreate/pvremove
man vgdisplay/vgcreate/vgremove/vgextend/vgreduce/vgscan/vgchange/vgsync/vgcfgbackup/vgcfgrestore
man lvdisplay/lvcreate/lvremove/lvextend/lvreduce
man lvlnboot/ioscan
man mkfs/newfs/insf/mknod/fsadm/extendfs

... and i am sure i forget some others

1 Like

So it wouldn't be different because of the discrepancy in PE's and LE's?

Okay, thank you for the advice...

If you have 1 logical volume of 100 logical extend spread over 100 Physical extend of Disk1

If you make a mirror of those 100 Physical Extend that are on Disk1 , on an additionnal Disk2

You will still have 1 logical volume of 100 Logical Extend, but that will use a total of 200 Physical extends since 100 are on Disk1 and 100 mirrored on Disk2

The 100 Physical Extends of Disk2 are used for mirror/copy of the 100 PE that are on Disk1 , they are NOT additional space available for new LE .

1 Like

You can check

http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf

Guide from HP, it is very good reference for education or a quick reminder in critical situations.