Operating System - Linux
1753479 Members
5137 Online
108794 Solutions
New Discussion юеВ

Re: LVM Traces of old disk

 
admin1979
Super Advisor

LVM Traces of old disk

Hello,

We have a SLES 10 version. Recently one of the disks out of RAID 0 got failed. (sdb1) . Which had 2 disks /dev/sdb1 & /dev/sdc1
We have replaced the faulty disk of bigger size. Which is now /dev/sdd1.
But the problem is whenever we run pvdisplay or vgdisplay , we get

# pvdisplay

/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error

--- Physical volume ---
PV Name /dev/sdd1
VG Name data
PV Size 68.36 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 17500
Free PE 7260
Allocated PE 10240
PV UUID qRZIwB-zs6I-klfc-BpL6-MTQ4-tu4J-8ME0iy


So the problem is , the /dev/sdb1 read failed error occurs.

I have already tried,

pvremove /dev/sdb1 but it says ,

# pvremove /dev/sdb1

/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
No physical volume label read from /dev/sdb1
/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
Labels on physical volume "/dev/sdb1" successfully wiped

So how to remove the traces of the failed/removed disk /dev/sdb1 ??
14 REPLIES 14
Matt Palmer_2
Respected Contributor

Re: LVM Traces of old disk

Hi,

if you really want to remove the entry have you also tried pvremove -f /dev/sdb1 ??

regards

Matt
admin1979
Super Advisor

Re: LVM Traces of old disk

No use !!

# pvremove -f /dev/sdb1
/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
No physical volume label read from /dev/sdb1
/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
Labels on physical volume "/dev/sdb1" successfully wiped

# pvdisplay
/dev/sdb: read failed after 0 of 2048 at 0: Input/output error
/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
--- Physical volume ---
PV Name /dev/sdd1
VG Name data
PV Size 68.36 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 17500
Free PE 7260
Allocated PE 10240
PV UUID qRZIwB-zs6I-klfc-BpL6-MTQ4-tu4J-8ME0iy

Matt Palmer_2
Respected Contributor

Re: LVM Traces of old disk

did u try vgreduce before pvremove?

regards

Matt
admin1979
Super Advisor

Re: LVM Traces of old disk

No i have not tried vgreduce yet.
Matt Palmer_2
Respected Contributor

Re: LVM Traces of old disk

Hi,

see this post:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1284100

for how to use vgreduce on failed disks

hope that helps

regards

Matt
admin1979
Super Advisor

Re: LVM Traces of old disk

Are you suggesting,

vgreduce --test --removemissing ??

admin1979
Super Advisor

Re: LVM Traces of old disk

That post is wrt HP.

the suggestion in that post is to run

vgreduce -l vg pv

but i did not find the -l parameter in man vgreduce.

Btw I tried below command. But no help.

# vgreduce --removemissing data
/dev/sdb: read failed after 0 of 2048 at 0: Input/output error
/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
Volume group "data" is already consistent
admin1979
Super Advisor

Re: LVM Traces of old disk

I tried this as well now,

# vgreduce data /dev/sdb1
/dev/sdb: read failed after 0 of 2048 at 0: Input/output error
/dev/sdb1: read failed after 0 of 2048 at 0: Input/output error
Physical Volume "/dev/sdb1" not found in Volume Group "data"
Matt Palmer_2
Respected Contributor

Re: LVM Traces of old disk

Hi,

the approach you now take really depends on the order you may have executed LVM commands up to this point.

I would try several things:
make sure you have a full backup
make sure you have a backup of vgcfg and lvmtab

run the few commands at the bottom of this post, which explains better than I can the sort of issues you can have if you get it wrong :-)

http://bisqwit.iki.fi/story/howto/undopvremove/

Go down to where it says 'problem averted'
key points are:

pvs (see if your failed disk is listed here) - please let me know
vgreduce

pvremove

run pvs again and see if your failed disk is no longer listed.

This has worked for me in the past

regards

Matt