linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] removing bad PVs
@ 2006-01-25 15:33 Matthew Plante
  2006-02-09 20:06 ` Matthew Plante
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Plante @ 2006-01-25 15:33 UTC (permalink / raw)
  To: linux-lvm


I had created an LVM with 3 iscsi drives.  One of the target machines died,
which had 2 of the targets in it.  So my lvm now says it has 2 bad devices,
makes sense:

vgscan -P
  Partial mode. Incomplete volume groups will be activated read-only.
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
  Found volume group "iol_vg" using metadata type lvm2

pvscan -P
  Partial mode. Incomplete volume groups will be activated read-only.
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
  PV /dev/sda         VG iol_vg   lvm2 [6.24 GB / 0    free]
  PV unknown device   VG iol_vg   lvm2 [4.16 GB / 0    free]
  PV unknown device   VG iol_vg   lvm2 [1.19 GB / 0    free]
  Total: 3 [11.60 GB] / in use: 3 [11.60 GB] / in no VG: 0 [0   ]

So ofcourse I'd like to remove these bad PVs.  From what I've found, you
need to do this with the vgreduce command:

vgreduce --removemissing -v iol_vg
    Finding volume group "iol_vg"
    Wiping cache of LVM-capable devices
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find all physical volumes for volume group iol_vg.
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find all physical volumes for volume group iol_vg.
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Archiving volume group "iol_vg" metadata.
    iol_vg/iol_lv has missing extents: removing (including dependencies)
    Deactivating (if active) logical volume iol_lv
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
    Removing LV iol_lv from VG iol_vg
    iol_vg/iol_lv has missing extents: removing (including dependencies)
    Deactivating (if active) logical volume iol_lv
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
    Removing LV iol_lv from VG iol_vg

However, it doesn't seem to actually remove them!

vgscan -P
  Partial mode. Incomplete volume groups will be activated read-only.
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
  Found volume group "iol_vg" using metadata type lvm2

Any idea what's going on here?  I'm out of ideas.

Thanks,

-- Matt

+--
|Matthew Plante
| University of New Hampshire
| InterOperability Lab
| Research & Development
| SMTP: maplante@iol.unh.edu
| Phone: +1-603-862-0203
+-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [linux-lvm] removing bad PVs
  2006-01-25 15:33 [linux-lvm] removing bad PVs Matthew Plante
@ 2006-02-09 20:06 ` Matthew Plante
  2006-02-09 23:25   ` Marcin Struzak
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Plante @ 2006-02-09 20:06 UTC (permalink / raw)
  To: LVM general discussion and development

actually, nevermind, I figured it out :-)

-- Matt

+--
|Matthew Plante
| University of New Hampshire
| InterOperability Lab
| Research & Development
| SMTP: maplante@iol.unh.edu
| Phone: +1-603-862-0203
+-


-----Original Message-----
From: linux-lvm-bounces@redhat.com
[mailto:linux-lvm-bounces@redhat.com]On Behalf Of Matthew Plante
Sent: Wednesday, January 25, 2006 10:33 AM
To: linux-lvm@redhat.com
Subject: [linux-lvm] removing bad PVs



I had created an LVM with 3 iscsi drives.  One of the target machines died,
which had 2 of the targets in it.  So my lvm now says it has 2 bad devices,
makes sense:

vgscan -P
  Partial mode. Incomplete volume groups will be activated read-only.
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
  Found volume group "iol_vg" using metadata type lvm2

pvscan -P
  Partial mode. Incomplete volume groups will be activated read-only.
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
  PV /dev/sda         VG iol_vg   lvm2 [6.24 GB / 0    free]
  PV unknown device   VG iol_vg   lvm2 [4.16 GB / 0    free]
  PV unknown device   VG iol_vg   lvm2 [1.19 GB / 0    free]
  Total: 3 [11.60 GB] / in use: 3 [11.60 GB] / in no VG: 0 [0   ]

So ofcourse I'd like to remove these bad PVs.  From what I've found, you
need to do this with the vgreduce command:

vgreduce --removemissing -v iol_vg
    Finding volume group "iol_vg"
    Wiping cache of LVM-capable devices
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find all physical volumes for volume group iol_vg.
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find all physical volumes for volume group iol_vg.
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Archiving volume group "iol_vg" metadata.
    iol_vg/iol_lv has missing extents: removing (including dependencies)
    Deactivating (if active) logical volume iol_lv
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
    Removing LV iol_lv from VG iol_vg
    iol_vg/iol_lv has missing extents: removing (including dependencies)
    Deactivating (if active) logical volume iol_lv
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
    Found volume group "iol_vg"
    Removing LV iol_lv from VG iol_vg

However, it doesn't seem to actually remove them!

vgscan -P
  Partial mode. Incomplete volume groups will be activated read-only.
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid 'u1KC7q-D8Bi-qGKp-DJgW-kQ8f-NtB6-GLNuzX'.
  Couldn't find device with uuid 'YPyDqn-HD9z-2TDc-ZNXP-d4z9-BLtV-BdM0eh'.
  Found volume group "iol_vg" using metadata type lvm2

Any idea what's going on here?  I'm out of ideas.

Thanks,

-- Matt

+--
|Matthew Plante
| University of New Hampshire
| InterOperability Lab
| Research & Development
| SMTP: maplante@iol.unh.edu
| Phone: +1-603-862-0203
+-

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] removing bad PVs
  2006-02-09 20:06 ` Matthew Plante
@ 2006-02-09 23:25   ` Marcin Struzak
  2006-02-13 14:36     ` Matthew Plante
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Struzak @ 2006-02-09 23:25 UTC (permalink / raw)
  To: maplante, LVM general discussion and development

Matthew Plante wrote:
> actually, nevermind, I figured it out :-)

Could you share with the list what you did?
Thanks!

--Marcin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [linux-lvm] removing bad PVs
  2006-02-09 23:25   ` Marcin Struzak
@ 2006-02-13 14:36     ` Matthew Plante
  2006-02-13 22:35       ` Zac Slade
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Plante @ 2006-02-13 14:36 UTC (permalink / raw)
  To: LVM general discussion and development

The solution I ended up with was actually to add a new disk and make new PVs
with the same uuid, which wasn't exactly the solution I was going for, but
it ended up working out.  I wasn't able to get the --removemissing option in
vgreduce to work for the scenario I mentioned before.
The test scenario I was going for was an unexpected removal of a disk, where
I could remove the disk from the vg, and bring the vg back up in a
semi-working state, minus one disk/some data.

-- Matt

+--
|Matthew Plante
| University of New Hampshire
| InterOperability Lab
| Research & Development
| SMTP: maplante@iol.unh.edu
| Phone: +1-603-862-0203
+-


-----Original Message-----
From: linux-lvm-bounces@redhat.com
[mailto:linux-lvm-bounces@redhat.com]On Behalf Of Marcin Struzak
Sent: Thursday, February 09, 2006 6:26 PM
To: maplante@iol.unh.edu; LVM general discussion and development
Subject: Re: [linux-lvm] removing bad PVs


Matthew Plante wrote:
> actually, nevermind, I figured it out :-)

Could you share with the list what you did?
Thanks!

--Marcin

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] removing bad PVs
  2006-02-13 14:36     ` Matthew Plante
@ 2006-02-13 22:35       ` Zac Slade
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Slade @ 2006-02-13 22:35 UTC (permalink / raw)
  To: maplante, LVM general discussion and development

On Monday 13 February 2006 08:36, Matthew Plante wrote:
> The solution I ended up with was actually to add a new disk and make new
> PVs with the same uuid, which wasn't exactly the solution I was going for,
> but it ended up working out.  I wasn't able to get the --removemissing
> option in vgreduce to work for the scenario I mentioned before.
> The test scenario I was going for was an unexpected removal of a disk,
> where I could remove the disk from the vg, and bring the vg back up in a
> semi-working state, minus one disk/some data.
I know this is sort of late in the game as you have found a solution that 
works, but did you ever try using vgreduce -A n vgname pvname? Or the same, 
but with a force option?  I know you said --removemissing didn't work, but 
that may have been due to not setting -A n.

-- 
Zac Slade

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-13 22:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-25 15:33 [linux-lvm] removing bad PVs Matthew Plante
2006-02-09 20:06 ` Matthew Plante
2006-02-09 23:25   ` Marcin Struzak
2006-02-13 14:36     ` Matthew Plante
2006-02-13 22:35       ` Zac Slade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).