Operating System - HP-UX
1752757 Members
4806 Online
108789 Solutions
New Discussion

Re: Lvreduce doesn't work

 
hahmedma
Advisor

Lvreduce doesn't work

Dear,

 

  i had a bad PV and i need to replcae it...but at first i need to reduce it's L.V on it.but when i try to reduce it ..it fails....

 

the following are the data:

 

the defected H.D are c6t2d0 the mirroring H.D is c7t2d0....it contain a list of LV....one of them is the Lvol23...it's LVdisplay as follow:

 


lvdisplay -v /dev/vg00/lvol23:

 

- Logical volumes ---
LV Name                     /dev/vg00/lvol23
VG Name                     /dev/vg00
LV Permission               read/write   
LV Status                   available/stale           
Mirror copies               1            
Consistency Recovery        MWC                 
Schedule                    parallel     
LV Size (Mbytes)            8000            
Current LE                  125       
Allocated PE                250         
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   on           
Allocation                  PVG-strict                
IO Timeout (Seconds)        default             

   --- Distribution of logical volume ---
   PV Name            LE on PV  PE on PV  
   /dev/dsk/c7t2d0    125       125       

   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 ???                00006 current  /dev/dsk/c7t2d0    00006 stale    
   00001 ???                00007 current  /dev/dsk/c7t2d0    00007 stale    
   00002 ???                00008 current  /dev/dsk/c7t2d0    00008 stale    
   00003 ???                00009 current  /dev/dsk/c7t2d0    00009 stale    
   00004 ???                00010 current  /dev/dsk/c7t2d0    00010 stale    
   00005 ???                00011 current  /dev/dsk/c7t2d0    00011 stale    
   00006 ???                00012 current  /dev/dsk/c7t2d0    00012 stale    
   00007 ???                00013 current  /dev/dsk/c7t2d0    00013 stale    
   00008 ???                00014 current  /dev/dsk/c7t2d0    00014 stale    
   00009 ???                00015 current  /dev/dsk/c7t2d0    00015 stale    
   00010 ???                00016 current  /dev/dsk/c7t2d0    00016 stale    
   00011 ???                00017 current  /dev/dsk/c7t2d0    00017 stale    
   00012 ???                00018 current  /dev/dsk/c7t2d0    00018 stale    
   00013 ???                00019 current  /dev/dsk/c7t2d0    00019 stale    
   00014 ???                00020 current  /dev/dsk/c7t2d0    00020 stale    
   00015 ???                00021 current  /dev/dsk/c7t2d0    00021 stale    
   00016 ???                00022 current  /dev/dsk/c7t2d0    00022 stale    
   00017 ???                00023 current  /dev/dsk/c7t2d0    00023 stale    
   00018 ???                00024 current  /dev/dsk/c7t2d0    00024 stale    
   00019 ???                00025 current  /dev/dsk/c7t2d0    00025 stale    
   00020 ???                00026 current  /dev/dsk/c7t2d0    00026 stale    
   00021 ???                00027 current  /dev/dsk/c7t2d0    00027 stale    
   00022 ???                00028 current  /dev/dsk/c7t2d0    00028 stale    
   00023 ???                00029 current  /dev/dsk/c7t2d0    00029 stale    
   00024 ???                00030 current  /dev/dsk/c7t2d0    00030 stale    
   00025 ???                00031 current  /dev/dsk/c7t2d0    00031 stale    
   00026 ???                00032 current  /dev/dsk/c7t2d0    00032 stale    
Standard input

 

and when i use th Key is represented as ?????-->to be 2 and the c7t2d0----->to be 5

 

i used the several syntx of the reduce it fail as follow:

 

lvreduce -m 0 -A n –k /dev/vgname/lvname key

 

i used the key as 2 but it fail and the warning messaage is:

 

lvreduce: Warning: couldn't query physical volume "/dev/dsk/c6t2d0":
The specified path does not correspond to physical volume attached to
this volume group
lvreduce: Warning: couldn't query all of the physical volumes.
lvreduce: Physical volume "/dev/dsk/c6t2d0" does not belong
to volume group "/dev/vg00".
Logical volume "/dev/vg00/lvol23" is not reduced.

Also i used the following syntix:

 

rmsmob,sys,root # lvreduce -m 0  /dev/vg00/lvol23

 

Physical extents on remaining physical volumes are stale or
Remaining physical volumes are not responding.
lvreduce: The LVM device driver failed to reduce mirrors on
the logical volume "/dev/vg00/lvol23".



rmsmob,sys,root # lvreduce -m 0  /dev/vg00/lvol23 /dev/dsk/c6t2d0
lvreduce: Warning: couldn't query physical volume "/dev/dsk/c6t2d0":
The specified path does not correspond to physical volume attached to
this volume group
lvreduce: Warning: couldn't query all of the physical volumes.
lvreduce: Physical volume "/dev/dsk/c6t2d0" does not belong
to volume group "/dev/vg00".
Logical volume "/dev/vg00/lvol23" is not reduced.
rmsmob,sys,root #

 

 

this the output of the vgdisplay for the lvol23

 

LV Name                     /dev/vg00/lvol23
   LV Status                   available/stale           
   LV Size (Mbytes)            8000            
   Current LE                  125       
   Allocated PE                250         
   Used PV                     1       

also i tried to create the lvmtab by mv the old one and create it by vgsan -v but also it failed and the new created file is empty and doesn't contain any PV.

 

Really appreicaite your Feedback....

 

7 REPLIES 7
hahmedma
Advisor

Re: Lvreduce doesn't work

this the output of the vgscan:

 

Output of vgscan

 

 

Creating "/etc/lvmtab".

vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg00".

Couldn't stat physical volume "/dev/dsk/c0t0d0":

Invalid argument

Couldn't stat physical volume "/dev/dsk/c6t2d0":

Invalid argument

Physical Volume "/dev/dsk/c6t3d0" is not part of a Volume Group

Physical Volume "/dev/dsk/c7t3d0" contains no LVM information

 

vgscan:  has no correspoding valid raw device file under /dev/rdsk.

Verification of unique LVM disk id on each disk in the volume group

/dev/vg00 failed.

 

Following Physical Volumes belong to one Volume Group.

Unable to match these Physical Volumes to a Volume Group.

Use the vgimport command to complete the process.

/dev/dsk/c3t0d0

hahmedma
Advisor

Re: Lvreduce doesn't work

any update ..please...
donna hofmeister
Trusted Contributor

Re: Lvreduce doesn't work

you're not really telling us enough -- like OS level or what's being seen in ioscan, what the failed drive is, etc....

 

however, the basic procedure for replacing an unattached (failed) but mirrored drive is:

 

. replace the drive

. confirm it's showing up as claimed in ioscan

. vgcfgrestore onto the replaced drive

. vgchange to attach the drive to the vg

. vgsync

 

i sure hope that

. you made a copy of lvmtab before you ran vgscan

. you have a dependable/sane lvm backup file to support doing the vgcfgrestore

hahmedma
Advisor

Re: Lvreduce doesn't work

for the ioscan for H.D all are claimed even the failed H.D which is c6t2d0.

yes you tottaly right i had make copy for the lvmtab and generate a new one with vgscan 0v but it's emty file.

so you are suggest now to replace the faulty H.D even it's contain the PE...without i reduce it first ...

what i mean that when i had make the lvdispaly for the lvol23 and it issue that as follow:

lvdisplay -v /dev/vg00/lvol23:



- Logical volumes ---
LV Name /dev/vg00/lvol23
VG Name /dev/vg00
LV Permission read/write
LV Status available/stale
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 8000
Current LE 125
Allocated PE 250
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c7t2d0 125 125

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 ??? 00006 current /dev/dsk/c7t2d0 00006 stale
00001 ??? 00007 current /dev/dsk/c7t2d0 00007 stale
00002 ??? 00008 current /dev/dsk/c7t2d0 00008 stale
00003 ??? 00009 current /dev/dsk/c7t2d0 00009 stale
00004 ??? 00010 current /dev/dsk/c7t2d0 00010 stale
00005 ??? 00011 current /dev/dsk/c7t2d0 00011 stale
00006 ??? 00012 current /dev/dsk/c7t2d0 00012 stale
00007 ??? 00013 current /dev/dsk/c7t2d0 00013 stale
00008 ??? 00014 current /dev/dsk/c7t2d0 00014 stale
00009 ??? 00015 current /dev/dsk/c7t2d0 00015 stale
00010 ??? 00016 current /dev/dsk/c7t2d0 00016 stale
00011 ??? 00017 current /dev/dsk/c7t2d0 00017 stale
00012 ??? 00018 current /dev/dsk/c7t2d0 00018 stale
00013 ??? 00019 current /dev/dsk/c7t2d0 00019 stale
00014 ??? 00020 current /dev/dsk/c7t2d0 00020 stale
00015 ??? 00021 current /dev/dsk/c7t2d0 00021 stale
00016 ??? 00022 current /dev/dsk/c7t2d0 00022 stale
00017 ??? 00023 current /dev/dsk/c7t2d0 00023 stale
00018 ??? 00024 current /dev/dsk/c7t2d0 00024 stale
00019 ??? 00025 current /dev/dsk/c7t2d0 00025 stale
00020 ??? 00026 current /dev/dsk/c7t2d0 00026 stale
00021 ??? 00027 current /dev/dsk/c7t2d0 00027 stale
00022 ??? 00028 current /dev/dsk/c7t2d0 00028 stale
00023 ??? 00029 current /dev/dsk/c7t2d0 00029 stale
00024 ??? 00030 current /dev/dsk/c7t2d0 00030 stale
00025 ??? 00031 current /dev/dsk/c7t2d0 00031 stale
00026 ??? 00032 current /dev/dsk/c7t2d0 00032 stale
Standard input

so you confirm that there is no impact on the data on this lvol since it existed on the faulty desk...

so the steps will be:
1-replace the faulty H.D and confirm to be claim.
2-the vgcfgrestore as vgcfgrestore -n vg00 -l
3-then use vgchange as vgchange -a y
4-then vgscan

thanks for your support and feedback...
donna hofmeister
Trusted Contributor

Re: Lvreduce doesn't work

why do you think there are still PE on the failed drive?

 

anyhow....you should always always always have a copy of this by your side "When Good Disks Go Bad".

hahmedma
Advisor

Re: Lvreduce doesn't work

really i had a copy of this and this my refrence on the investigation...
Torsten.
Acclaimed Contributor

Re: Lvreduce doesn't work

>> 00000 ??? 00006 current /dev/dsk/c7t2d0 00006 stale

Looks like the only disk in this vg (c7t2d0) has failed.

vgdisplay -v of this vg would be good to see.

Consider to use your backup after replacing the disk.

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!