All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] PVs that are reused / reformatted as filesystems
@ 2004-12-20  4:10 Sam Vilain
  2004-12-21 18:16 ` Alasdair G Kergon
  2004-12-21 18:18 ` Alasdair G Kergon
  0 siblings, 2 replies; 4+ messages in thread
From: Sam Vilain @ 2004-12-20  4:10 UTC (permalink / raw)
  To: linux-lvm

Hi there,

I have a system on which a partition that was once a PV was recycled as
a filesystem.  Now, it has a valid ext3 filesystem on it, but also the
PV signature appears to be there.  So I can't start things up without
liberal use of -P, and I can't seem to get anything except read-only
operation.

IMHO The utilities should probably never try to treat any in-use kernel
object as candidate for any kind of scanning or new use.  ie, the
userland equivalent of checking dev->kobj.kref.refcount == 0

Could someone please give me a fish (tell me how to un-jam my LVM) and
maybe even teach the LVM drivers/utilities to fish as well?

Here's the command output;

samv:~# lvmdiskscan -v
   /dev/hda1 [       13.98 GB] LVM physical volume
   /dev/hda2 [       65.13 GB] LVM physical volume
   /dev/hda3 [       13.97 GB] LVM physical volume
   /dev/hda4 [        1.00 KB]
   /dev/hda5 [     1004.03 MB]
   /dev/hda6 [       17.72 GB] LVM physical volume
   0 disks
   2 partitions
   0 LVM physical volume whole disks
   4 LVM physical volumes
samv:~# mount | grep hda
/dev/hda3 on / type ext2 (rw,errors=remount-ro)
samv:~# vgchange -ay
   Failed to read VG data from PV (/dev/hda3)
   Failed to read VG data from PV (/dev/hda3)
   Unable to find volume group "Mirror"
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find all physical volumes for volume group samv.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find all physical volumes for volume group samv.
   Unable to find volume group "samv"
samv:~# vgscan -P
   Partial mode. Incomplete volume groups will be activated read-only.
   Reading all physical volumes.  This may take a while...
   Failed to read VG data from PV (/dev/hda3)
   Failed to read VG data from PV (/dev/hda3)
   Volume group "Mirror" not found
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Found volume group "samv" using metadata type lvm2
samv:~# vgchange -ay -P
   Partial mode. Incomplete volume groups will be activated read-only.
   Failed to read VG data from PV (/dev/hda3)
   Failed to read VG data from PV (/dev/hda3)
   Unable to find volume group "Mirror"
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   Couldn't find device with uuid 'PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE'.
   5 logical volume(s) in volume group "samv" now active
samv:~# mount /export/media
mount: block device /dev/mapper/samv-media is write-protected, mounting 
read-only
samv:~#

-- 
Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13
(include my PGP key ID in personal replies to avoid spam filtering)

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

* Re: [linux-lvm] PVs that are reused / reformatted as filesystems
  2004-12-20  4:10 [linux-lvm] PVs that are reused / reformatted as filesystems Sam Vilain
@ 2004-12-21 18:16 ` Alasdair G Kergon
  2004-12-22  1:57   ` Sam Vilain
  2004-12-21 18:18 ` Alasdair G Kergon
  1 sibling, 1 reply; 4+ messages in thread
From: Alasdair G Kergon @ 2004-12-21 18:16 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, Dec 20, 2004 at 05:10:11PM +1300, Sam Vilain wrote:
> Could someone please give me a fish (tell me how to un-jam my LVM) and
> maybe even teach the LVM drivers/utilities to fish as well?
 
Use pvscan / pvs -v to work out which devices you want to see and which you don't
then change the filter in /etc/lvm/lvm.conf so you only see the right ones.

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] PVs that are reused / reformatted as filesystems
  2004-12-20  4:10 [linux-lvm] PVs that are reused / reformatted as filesystems Sam Vilain
  2004-12-21 18:16 ` Alasdair G Kergon
@ 2004-12-21 18:18 ` Alasdair G Kergon
  1 sibling, 0 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2004-12-21 18:18 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, Dec 20, 2004 at 05:10:11PM +1300, Sam Vilain wrote:
> I have a system on which a partition that was once a PV was recycled as
> a filesystem.  Now, it has a valid ext3 filesystem on it, but also the
> PV signature appears to be there.  

In future use pvremove to wipe a PV - the opposite of pvcreate.
And first use vgreduce to remove it from its volume group.

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] PVs that are reused / reformatted as filesystems
  2004-12-21 18:16 ` Alasdair G Kergon
@ 2004-12-22  1:57   ` Sam Vilain
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Vilain @ 2004-12-22  1:57 UTC (permalink / raw)
  To: LVM general discussion and development

Alasdair G Kergon wrote:
>>Could someone please give me a fish (tell me how to un-jam my LVM) and
>>maybe even teach the LVM drivers/utilities to fish as well?
> Use pvscan / pvs -v to work out which devices you want to see and which you don't
> then change the filter in /etc/lvm/lvm.conf so you only see the right ones.

Thanks Alasdair.

It looks like my problem is actually deeper than I originally thought;

# vgdisplay -v foobar
[snip]
   --- Physical volumes ---
   PV Name               /dev/hda2
   PV UUID               weM5FG-L0Li-Ir7y-0B2z-MJoq-tvAg-C2Q19E
   PV Status             allocatable
   Total PE / Free PE    16672 / 0

   PV Name               /dev/hda1
   PV UUID               85M9M7-QsLh-dVKf-xfU3-ua4h-Ks4h-QGrMhu
   PV Status             allocatable
   Total PE / Free PE    3578 / 26

   PV Name               unknown device
   PV UUID               PtbIxo-EmRo-ML7J-yhqx-gglD-ZayH-X6tuWE
   PV Status             allocatable
   Total PE / Free PE    4535 / 4535

Hmm, now how can I use vgreduce on an read-only VG to remove an unknown
PV?

# vgreduce --removemissing foobar

Gone.

-- 
Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13
(include my PGP key ID in personal replies to avoid spam filtering)

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

end of thread, other threads:[~2004-12-22  1:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-20  4:10 [linux-lvm] PVs that are reused / reformatted as filesystems Sam Vilain
2004-12-21 18:16 ` Alasdair G Kergon
2004-12-22  1:57   ` Sam Vilain
2004-12-21 18:18 ` Alasdair G Kergon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.