Operating System - HP-UX
1748129 Members
3520 Online
108758 Solutions
New Discussion

Re: Distribution of Logical Volume

 
SOLVED
Go to solution
dev44
Regular Advisor

Distribution of Logical Volume

Hi Folks,

 

I have VG00 with a number of LVs on it.   My question is when I do a lvdisplay -v , some but not all of the LVs, have a mismatch like the following:

 

     --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/dsk/c2t1d0s2       161       162       
   /dev/dsk/c2t0d0s2       319       478    

 

Most of the LVs have the same number throughout:

 

   --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/dsk/c2t1d0s2       10        10        
   /dev/dsk/c2t0d0s2       10        10    

 

 

There are no stale extents on the mismatched ones.  So I am wondering why some would be off like this?

 

Thanks for any help,

 

 

whatever
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: Distribution of Logical Volume

For those LV's with a mismatch in the LE vs. PE numbers, please attach the complete "lvdisplay -v" output.

 

My suspicion is that you have mirrored the LV but have some of the mirrored extents on the same disk as the primary extents.  This is unusual, but it can happen.

 

I can tell definitively after seeing the complete 'lvdisplay -v' output for the affect LVs though.

dev44
Regular Advisor

Re: Distribution of Logical Volume

Tried to find a smaller LV that has the same issues:

 

[root@devap2 /var/adm/syslog]# 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)            1024            
Current LE                  32        
Allocated PE                64          
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   on           
Allocation                  non-strict                
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name                 LE on PV  PE on PV  
   /dev/dsk/c2t1d0s2       16        16        
   /dev/dsk/c2t0d0s2       32        48        

   --- Logical extents ---
   LE    PV1                     PE1   Status 1 PV2                     PE2   Status 2
   00000 /dev/dsk/c2t1d0s2       00162 current  /dev/dsk/c2t0d0s2       00219 current  
   00001 /dev/dsk/c2t1d0s2       02669 current  /dev/dsk/c2t0d0s2       03072 current  
   00002 /dev/dsk/c2t1d0s2       02670 current  /dev/dsk/c2t0d0s2       03073 current  
   00003 /dev/dsk/c2t1d0s2       02671 current  /dev/dsk/c2t0d0s2       03074 current  
   00004 /dev/dsk/c2t1d0s2       02672 current  /dev/dsk/c2t0d0s2       03075 current  
   00005 /dev/dsk/c2t1d0s2       02673 current  /dev/dsk/c2t0d0s2       03076 current  
   00006 /dev/dsk/c2t1d0s2       02674 current  /dev/dsk/c2t0d0s2       03077 current  
   00007 /dev/dsk/c2t1d0s2       02675 current  /dev/dsk/c2t0d0s2       03078 current  
   00008 /dev/dsk/c2t1d0s2       02676 current  /dev/dsk/c2t0d0s2       03079 current  
   00009 /dev/dsk/c2t1d0s2       02677 current  /dev/dsk/c2t0d0s2       03080 current  
   00010 /dev/dsk/c2t1d0s2       02678 current  /dev/dsk/c2t0d0s2       03081 current  
   00011 /dev/dsk/c2t1d0s2       02679 current  /dev/dsk/c2t0d0s2       03082 current  
   00012 /dev/dsk/c2t1d0s2       02680 current  /dev/dsk/c2t0d0s2       03083 current  
   00013 /dev/dsk/c2t1d0s2       02681 current  /dev/dsk/c2t0d0s2       03084 current  
   00014 /dev/dsk/c2t1d0s2       02682 current  /dev/dsk/c2t0d0s2       03085 current  
   00015 /dev/dsk/c2t1d0s2       02683 current  /dev/dsk/c2t0d0s2       03086 current  
   00016 /dev/dsk/c2t0d0s2       03548 current  /dev/dsk/c2t0d0s2       03549 current  
   00017 /dev/dsk/c2t0d0s2       03550 current  /dev/dsk/c2t0d0s2       03551 current  
   00018 /dev/dsk/c2t0d0s2       03552 current  /dev/dsk/c2t0d0s2       03553 current  
   00019 /dev/dsk/c2t0d0s2       03554 current  /dev/dsk/c2t0d0s2       03555 current  
   00020 /dev/dsk/c2t0d0s2       03556 current  /dev/dsk/c2t0d0s2       03557 current  
   00021 /dev/dsk/c2t0d0s2       03558 current  /dev/dsk/c2t0d0s2       03559 current  
   00022 /dev/dsk/c2t0d0s2       03560 current  /dev/dsk/c2t0d0s2       03561 current  
   00023 /dev/dsk/c2t0d0s2       03562 current  /dev/dsk/c2t0d0s2       03563 current  
   00024 /dev/dsk/c2t0d0s2       03564 current  /dev/dsk/c2t0d0s2       03565 current  
   00025 /dev/dsk/c2t0d0s2       03566 current  /dev/dsk/c2t0d0s2       03567 current  
   00026 /dev/dsk/c2t0d0s2       03568 current  /dev/dsk/c2t0d0s2       03569 current  
   00027 /dev/dsk/c2t0d0s2       03570 current  /dev/dsk/c2t0d0s2       03571 current  
   00028 /dev/dsk/c2t0d0s2       03572 current  /dev/dsk/c2t0d0s2       03573 current  
   00029 /dev/dsk/c2t0d0s2       03574 current  /dev/dsk/c2t0d0s2       03575 current  
   00030 /dev/dsk/c2t0d0s2       03576 current  /dev/dsk/c2t0d0s2       03577 current  
   00031 /dev/dsk/c2t0d0s2       03578 current  /dev/dsk/c2t0d0s2       03579 current  

whatever
dev44
Regular Advisor

Re: Distribution of Logical Volume

I also noticed the following:

 

from vgdisplay -v vg00:

--skip--

 --- Physical volumes ---
   PV Name                     /dev/dsk/c2t1d0s2
   PV Status                   available                
   Total PE                    4346    
   Free PE                     0       
   Autoswitch                  On        
   Proactive Polling           On               

   PV Name                     /dev/dsk/c2t0d0s2
   PV Status                   available                
   Total PE                    4346    
   Free PE                     702     
   Autoswitch                  On        
   Proactive Polling           On           

 

Then from diskinfo -v:

 

[root@devap2 /var/adm/syslog]# diskinfo -v /dev/rdsk/c2t1d0s2
SCSI describe of /dev/rdsk/c2t1d0s2:
             vendor: HP 146 G
         product id: ST3146707LC     
               type: direct access
               size: 142452736 Kbytes
   bytes per sector: 512
          rev level: HPC1
    blocks per disk: 284905472
        ISO version: 0
       ECMA version: 0
       ANSI version: 3
    removable media: no
    response format: 2
   (Additional inquiry bytes: (32)4b (33)53 (34)34 (35)38 (36)42 (37)4d (38)5a (39)20 (40)20 (41)20 (42)20 (43)20 (44)20 (45)20 (46)20 (47)20 (48)20 (49)20 (50)20 (51)f (52)0 (53)0 (54)60 (55)a (56)dc (57)b (58)59 (59)3 (60)1 (61)3 (62)22 (63)0 (64)0 (65)0 (66)0 (67)0 (68)0 (69)0 (70)0 (71)0 (72)0 (73)0 (74)0 (75)0 (76)0 (77)0 (78)0 (79)0 (80)0 (81)0 (82)0 (83)0 (84)0 (85)0 (86)0 (87)0 (88)0 (89)0 (90)0 (91)0 (92)43 (93)6f (94)70 (95)79 (96)72 (97)69 (98)67 (99)68 (100)74 (101)20 (102)28 (103)63 (104)29 (105)20 (106)32 (107)30 (108)30 (109)35 (110)20 (111)53 (112)65 (113)61 (114)67 (115)61 (116)74 (117)65 (118)20 (119)41 (120)6c (121)6c (122)20 (123)0 (124)0 (125)0 (126)0 (127)0 (128)0 (129)0 (130)0 (131)0 (132)0 (133)0 (134)0 (135)0 (136)0 (137)0 (138)0 )
[root@devap2 /var/adm/syslog]#
[root@devap2 /var/adm/syslog]#
[root@devap2 /var/adm/syslog]# diskinfo -v /dev/rdsk/c2t0d0  
SCSI describe of /dev/rdsk/c2t0d0:
             vendor: HP 146 G
         product id: ST3146707LC     
               type: direct access
               size: 143374744 Kbytes
   bytes per sector: 512
          rev level: HPC1
    blocks per disk: 286749488
        ISO version: 0
       ECMA version: 0
       ANSI version: 3
    removable media: no
    response format: 2
   (Additional inquiry bytes: (32)4b (33)53 (34)34 (35)41 (36)32 (37)47 (38)42 (39)20 (40)20 (41)20 (42)20 (43)20 (44)20 (45)20 (46)20 (47)20 (48)20 (49)20 (50)20 (51)f (52)0 (53)0 (54)60 (55)a (56)dc (57)b (58)59 (59)3 (60)1 (61)3 (62)22 (63)0 (64)0 (65)0 (66)0 (67)0 (68)0 (69)0 (70)0 (71)0 (72)0 (73)0 (74)0 (75)0 (76)0 (77)0 (78)0 (79)0 (80)0 (81)0 (82)0 (83)0 (84)0 (85)0 (86)0 (87)0 (88)0 (89)0 (90)0 (91)0 (92)43 (93)6f (94)70 (95)79 (96)72 (97)69 (98)67 (99)68 (100)74 (101)20 (102)28 (103)63 (104)29 (105)20 (106)32 (107)30 (108)30 (109)35 (110)20 (111)53 (112)65 (113)61 (114)67 (115)61 (116)74 (117)65 (118)20 (119)41 (120)6c (121)6c (122)20 (123)0 (124)0 (125)0 (126)0 (127)0 (128)0 (129)0 (130)0 (131)0 (132)0 (133)0 (134)0 (135)0 (136)0 (137)0 (138)0 )

whatever
Patrick Wallek
Honored Contributor
Solution

Re: Distribution of Logical Volume

Yep, what I suspected is true.  You have both primary and mirror extents on the same disk.  

 

If you look at your ouput you see:

 

   00016 /dev/dsk/c2t0d0s2       03548 current  /dev/dsk/c2t0d0s2       03549 current  
   00017 /dev/dsk/c2t0d0s2       03550 current  /dev/dsk/c2t0d0s2       03551 current  
   00018 /dev/dsk/c2t0d0s2       03552 current  /dev/dsk/c2t0d0s2       03553 current  
   00019 /dev/dsk/c2t0d0s2       03554 current  /dev/dsk/c2t0d0s2       03555 current  
   00020 /dev/dsk/c2t0d0s2       03556 current  /dev/dsk/c2t0d0s2       03557 current  
   00021 /dev/dsk/c2t0d0s2       03558 current  /dev/dsk/c2t0d0s2       03559 current  
   00022 /dev/dsk/c2t0d0s2       03560 current  /dev/dsk/c2t0d0s2       03561 current  
   00023 /dev/dsk/c2t0d0s2       03562 current  /dev/dsk/c2t0d0s2       03563 current  
   00024 /dev/dsk/c2t0d0s2       03564 current  /dev/dsk/c2t0d0s2       03565 current  
   00025 /dev/dsk/c2t0d0s2       03566 current  /dev/dsk/c2t0d0s2       03567 current  
   00026 /dev/dsk/c2t0d0s2       03568 current  /dev/dsk/c2t0d0s2       03569 current  
   00027 /dev/dsk/c2t0d0s2       03570 current  /dev/dsk/c2t0d0s2       03571 current  
   00028 /dev/dsk/c2t0d0s2       03572 current  /dev/dsk/c2t0d0s2       03573 current  
   00029 /dev/dsk/c2t0d0s2       03574 current  /dev/dsk/c2t0d0s2       03575 current  
   00030 /dev/dsk/c2t0d0s2       03576 current  /dev/dsk/c2t0d0s2       03577 current  
   00031 /dev/dsk/c2t0d0s2       03578 current  /dev/dsk/c2t0d0s2       03579 current  

 

Notice that both disks are the same.  

 

You likely need to unmirror (lvreduce -m 0) and remirror (lvextend -m 1) the effect LVs.  

 

Once done, use 'lvdisplay -v' again to make sure the extents are evenly distributed between the appropriate disks.

dev44
Regular Advisor

Re: Distribution of Logical Volume

Geezzzz...didn't even notice that!  Dyslexia at its finest ;)

Thanks so much for the help

whatever
Matti_Kurkela
Honored Contributor

Re: Distribution of Logical Volume

Also note that your lvdisplay says:

 

> Allocation                  non-strict

 

The non-strict allocation policy is what allows primary and mirror extents to go on the same disk. In general, I think you should not use the non-strict policy without a good reason, as it makes you vulnerable for mistakes like that.

 

With the default policy (strict), the LVM simply won't allow that to happen when creating or extending mirrored disks.

You can only switch to a stricter policy when the LV is not mirrored, so if you are going to do what Patrick suggested, use "lvchange -s y" after unmirroring the LV to switch it back to strict allocation policy.

 

 

MK
Patrick Wallek
Honored Contributor

Re: Distribution of Logical Volume

Good catch Matti!  I missed that and I agree 100%!