linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] FW: removing bad PVs
@ 2006-01-30 14:32 Matthew Plante
  0 siblings, 0 replies; only message in thread
From: Matthew Plante @ 2006-01-30 14:32 UTC (permalink / raw)
  To: linux-lvm

Hello,

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

I'm not sure how to proceed from here.  How can I successfully remove the
bad PVs from the VG and then replace them?

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] only message in thread

only message in thread, other threads:[~2006-01-30 14:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-30 14:32 [linux-lvm] FW: removing bad PVs Matthew Plante

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).