Operating System - HP-UX
1752806 Members
5783 Online
108789 Solutions
New Discussion

Cannot remove lvol (Faulty disk)

 
SOLVED
Go to solution
luissma
Advisor

Cannot remove lvol (Faulty disk)

Hi,

 

I have a failing disk that I'd like to remove/put back in my Volume Group (disk has been physically replaced) but I have a mirrored volume in a not very good state that has one of the sides in stale state and the other one in unknown condition because of the old failing disk that prevents me from doing any operation:

 

# lvdisplay -v /dev/vg01/lvol3
lvdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t0d0":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.
--- Logical volumes ---
LV Name                     /dev/vg01/lvol3
VG Name                     /dev/vg01
LV Permission               read/write
LV Status                   available/stale
Mirror copies               1
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            32
Current LE                  8
Allocated PE                16
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/dsk/c2t0d0    8         8

   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 ???                01838 current  /dev/dsk/c2t0d0    02573 stale
   00001 ???                01839 current  /dev/dsk/c2t0d0    02574 stale
   00002 ???                01840 current  /dev/dsk/c2t0d0    02575 stale
   00003 ???                01841 current  /dev/dsk/c2t0d0    02576 stale
   00004 ???                01842 current  /dev/dsk/c2t0d0    02577 stale
   00005 ???                01843 current  /dev/dsk/c2t0d0    02578 stale
   00006 ???                01844 current  /dev/dsk/c2t0d0    02579 stale
   00007 ???                01845 current  /dev/dsk/c2t0d0    02580 stale

 

I'd like to get rid of this volume to recreate it afterwards.

 

 

# lvremove -f /dev/vg01/lvol3
lvremove: Couldn't query physical volume "/dev/dsk/c1t0d0":
The specified path does not correspond to physical volume attached to
this volume group
lvremove: Couldn't delete logical volume "/dev/vg01/lvol3":
The specified logical volume is open, or
a sparing operation is in progress.

 

Trying to reduce the mirror:

 

# lvreduce -A n -k -m 0 /dev/vg01/lvol3 /dev/dsk/c1t0d0
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/vg01/lvol3".

 

# lvreduce -A n -k -m 0 /dev/vg01/lvol3 /dev/dsk/c2t0d0
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/vg01/lvol3".



Trying to reduce the Volume

 

# vgreduce -f /dev/vg01
Not all extents are free. i.e. Out of 4340 PEs, only 4332 are free.
You must free all PEs using lvreduce/lvremove before the PV can be removed.
Example: lvreduce -A n -m 0 /dev/vg01/lvol1.
         lvremove -A n /dev/vg01/lvol1
Here's the map of used PEs

         --- Logical extents ---
         LE      LV              PE     Status 1
         0000    lvol3           1838     current
         0001    lvol3           1839     current
         0002    lvol3           1840     current
         0003    lvol3           1841     current
         0004    lvol3           1842     current
         0005    lvol3           1843     current
         0006    lvol3           1844     current
         0007    lvol3           1845     current

 

 

 

Disk is CLAIMED:

 

disk      0  0/0/1/1.0.0   sdisk  CLAIMED     DEVICE       HP 18.2GST318452LC
                          /dev/dsk/c1t0d0   /dev/rdsk/c1t0d0

 

 

 

# pvdisplay /dev/dsk/c1t0d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t0d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/vg01".
pvdisplay: Cannot display physical volume "/dev/dsk/c1t0d0".

 

 

Could somebody give me a hand?

 

Thanks in advance.

1 REPLY 1
luissma
Advisor
Solution

Re: Cannot remove lvol (Faulty disk)

After several operations tried following:

 

vgcfgrestore -n /dev/vg01 /dev/rdsk/c1t0d0
vgchange -a y /dev/vg01

 

 

That has left my volume in a reasonable status and has allowed me to do some operations with it

 

# lvdisplay -v /dev/vg01/lvol3
--- Logical volumes ---
LV Name                     /dev/vg01/lvol3
VG Name                     /dev/vg01
LV Permission               read/write
LV Status                   available/stale
Mirror copies               1
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            32
Current LE                  8
Allocated PE                16
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/dsk/c1t0d0    8         8
   /dev/dsk/c2t0d0    8         8

   --- Logical extents ---
   LE    PV1                PE1   Status 1 PV2                PE2   Status 2
   00000 /dev/dsk/c1t0d0    01838 current  /dev/dsk/c2t0d0    02573 stale
   00001 /dev/dsk/c1t0d0    01839 current  /dev/dsk/c2t0d0    02574 stale
   00002 /dev/dsk/c1t0d0    01840 current  /dev/dsk/c2t0d0    02575 stale
   00003 /dev/dsk/c1t0d0    01841 current  /dev/dsk/c2t0d0    02576 stale
   00004 /dev/dsk/c1t0d0    01842 current  /dev/dsk/c2t0d0    02577 stale
   00005 /dev/dsk/c1t0d0    01843 current  /dev/dsk/c2t0d0    02578 stale
   00006 /dev/dsk/c1t0d0    01844 current  /dev/dsk/c2t0d0    02579 stale
   00007 /dev/dsk/c1t0d0    01845 current  /dev/dsk/c2t0d0    02580 stale