1833776 Members
2464 Online
110063 Solutions
New Discussion

can't remove a disk

 
SOLVED
Go to solution
Konrad Hegner
Frequent Advisor

can't remove a disk

Good morning

I don't why, but it's happen now.
I can't remove a mirrored HDD. ... If you make a look to 'lvdisplay -v /dev/vg00/lvol1' is the output like this:

--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
...
Mirror copies 1

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t2d0 126 126

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t2d0 00000 current ??? 00000 stale
00001 /dev/dsk/c2t2d0 00001 current ??? 00001 stale
...

If you have a look to 'vgdisplay -v vg00 | grep Name' is the output like this:

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c1t2d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
VG Name /dev/vg00
LV Name /dev/vg00/lvol1
LV Name /dev/vg00/lvol2
LV Name /dev/vg00/lvol3
...
LV Name /dev/vg00/lvol9
LV Name /dev/vg00/lvol10
PV Name /dev/dsk/c2t2d0
hostname,sys,root #

And last but not least: 'strings /etc/lvmtab':
Output:
/dev/vg00
/dev/dsk/c2t2d0
/dev/dsk/c1t2d0

I will remove the mirroring and the disk, what can I do.
The error messages are the following:

command:
lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c1t2d0
output:
lvreduce: Warning: couldn't query physical volume "/dev/dsk/c1t2d0":
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/c1t2d0" does not belong
to volume group "/dev/vg00".
Logical volume "/dev/vg00/lvol1" is not reduced.

or
command:
vgreduce vg00 /dev/dsk/c1t2d0
output:
vgreduce: Couldn't query physical volume "/dev/dsk/c1t2d0":
The specified path does not correspond to physical volume attached to
this volume group

If you do the ioscan, the disk is available.
Know anybody a solution for activate the mirroring again or for 'delete' the c1t2d0?
Thanks
2 REPLIES 2
KapilRaj
Honored Contributor

Re: can't remove a disk

OK. It gives error as it the disk has lost all info abt LVM.

After all why do u have to reduce the mirror ?. Why not replace the disk with a new one and vgcfgrestore onto it .

Once done a "vgsync" will remirror the stuff !

Regds,

Kaps
Nothing is impossible
V.Tamilvanan
Honored Contributor
Solution

Re: can't remove a disk

Hi,

You need to use -k option with lvreduce to remove a disk from the lv which is failed.
Then u can use vgreduce as usual to remove from VG.

#lvreduce -m 0 -k /dev/vg00/lvol1 /dev/dsk/c1t2d0


Check whether the disk is available and usable by using
#diskinfo /dev/rdsk/c1t2d0

If you get the proper size of the disk . Then you try with
#vgsync

Still failing u put a new disk and do.

#vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t2d0
#vgsync

It should solve your problem.


HTH