All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-lvm] Problem deleteing PV's
@ 2001-05-24 14:13 Kevin M Corry
  2001-05-24 17:40 ` Justin Booth
  0 siblings, 1 reply; 11+ messages in thread
From: Kevin M Corry @ 2001-05-24 14:13 UTC (permalink / raw)
  To: linux-lvm; +Cc: jbooth

Justin,

Do you have any active volumes using any space on /dev/sdb or /dev/sdc?
(You said below that you are trying to get rid of those entries to start
over)? When you tried recreating the partition table for those disks,
did you create everything with the same size/location? If so, then the
LVM metadata will still be in the same place that pvscan and vgscan
expect to find it. So, if you don't have any data on those disks to
worry about, you should be able to just clear out the metadata sectors.

dd if=/dev/zero of=/dev/sdb1 bs=1k count=10
dd if=/dev/zero of=/dev/sdc1 bs=1k count=10
dd if=/dev/zero of=/dev/sdb bs=1k count=10
dd if=/dev/zero of=/dev/sdc bs=1k count=10

There are actually 240+ sectors of metadata at the beginning of each
PV, but these commands should wipe away the information about the PVs
and VGs. After this you should repartition the disks again, run
pvcreate on the appropriate partitions, and run pvscan and vgscan.

I hope I've understood your problem correctly. If you do in fact have
data on those disks, and vgscan/pvscan isn't finding the volumes, then
obviously don't run the above commands. :)

Kevin

> vgscan seems to only update /etc/lvmtab and /etc/lvmtagb.d
> a pvchange -x n /dev/sdxx
> results in a
> pvchange -- unable to find volume group "/dev/xxxx" (VG not active?)
> pvchange -- 0 physical volumes changed / 0 physical volumes already o.k.
>
> on all PV's
>
> > Have you tried a vgscan to see if there are VG's that you don't need?
What
> > about pvchange -x n /dev/sdxx?
> >
> >
> > > Hello,
> > >
> > >  I have a problem deleteing 4 PV's that I managed to create None of
the
> > > PV's are in a VG, and I can't figure out how to get rid of them
> > >
> > > when I do a pvscan It returns something like this:
> > >
> > > pvscan -- reading all physical volumes (this may take a while)
> > > pvscan -- inactive PV "/dev/sdb" is in no VG [12.16] MB
> > > pvscan -- inactive PV "/dev/sdb1" is in no VG [8.54] GB
> > > pvscan -- inactive PV "/dev/sdc" is in no VG [12.16] MB
> > > pvscan -- inactive PV "/dev/sdc1" is in no VG [8.54] GB
> > > pvscan -- total: 4 [17.11 GB] / in use 0 [0] / in no VG:  4 [17.11
GB]
> > >
> > >
> > > How do I get rid of these entries to start over again?
> > > I've tried deleteing the partition table and recreating them but a
> > > subsequent vgscan always brings them back into pvscan
> > >
> > >
> > >  Thanks much,
> > >       Justin Booth

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [linux-lvm] Problem deleteing PV's
@ 2001-05-24 18:35 Kevin M Corry
  2001-05-24 18:56 ` Justin Booth
  0 siblings, 1 reply; 11+ messages in thread
From: Kevin M Corry @ 2001-05-24 18:35 UTC (permalink / raw)
  To: linux-lvm

Well, the first thing I would try is increasing to "count=1000" or 10000. I
just did that on my machine with my test group. The VG TestGroup contained
a single PV /dev/hdb1. I did "dd if=/dev/zero of=/dev/hdb1 bs=1k
count=10000",
then reran pvscan, and that PV was gone from the listing. Then I ran
vgscan,
and TestGroup was gone. Then it was just a matter of removing the directory
in /dev for that group. If increasing the count in dd doesn't work, I'm not
sure what else to suggest.

-Kevin


> Tried doing the "dd if of bs count" stuff and now I'm recieving a
> pvscan -- ERROR "pv_reaad(): PV identifier invalid" reading physical
volumes
>
> any ideas ???
>
> Thanks,
>    Justin Both
>
> ----- Original Message -----
>
> Justin,
>
> Do you have any active volumes using any space on /dev/sdb or /dev/sdc?
> (You said below that you are trying to get rid of those entries to start
> over)? When you tried recreating the partition table for those disks,
> did you create everything with the same size/location? If so, then the
> LVM metadata will still be in the same place that pvscan and vgscan
> expect to find it. So, if you don't have any data on those disks to
> worry about, you should be able to just clear out the metadata sectors.
>
> dd if=/dev/zero of=/dev/sdb1 bs=1k count=10
> dd if=/dev/zero of=/dev/sdc1 bs=1k count=10
> dd if=/dev/zero of=/dev/sdb bs=1k count=10
> dd if=/dev/zero of=/dev/sdc bs=1k count=10
>
> There are actually 240+ sectors of metadata at the beginning of each
> PV, but these commands should wipe away the information about the PVs
> and VGs. After this you should repartition the disks again, run
> pvcreate on the appropriate partitions, and run pvscan and vgscan.
>
> I hope I've understood your problem correctly. If you do in fact have
> data on those disks, and vgscan/pvscan isn't finding the volumes, then
> obviously don't run the above commands. :)
>
> Kevin
>

^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <200105231825.tgoooa.cef.37tiu8v@emu>]
* [linux-lvm] Problem deleteing PV's
@ 2001-05-24  0:35 Justin Booth
  2001-05-24  0:53 ` Austin Gonyou
  0 siblings, 1 reply; 11+ messages in thread
From: Justin Booth @ 2001-05-24  0:35 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

Hello,

 I have a problem deleteing 4 PV's that I managed to create None of the PV's are in a VG, and I can't figure out how to get rid of them

when I do a pvscan It returns something like this:

pvscan -- reading all physical volumes (this may take a while)
pvscan -- inactive PV "/dev/sdb" is in no VG [12.16] MB
pvscan -- inactive PV "/dev/sdb1" is in no VG [8.54] GB
pvscan -- inactive PV "/dev/sdc" is in no VG [12.16] MB
pvscan -- inactive PV "/dev/sdc1" is in no VG [8.54] GB
pvscan -- total: 4 [17.11 GB] / in use 0 [0] / in no VG:  4 [17.11 GB]


How do I get rid of these entries to start over again?
I've tried deleteing the partition table and recreating them but a subsequent vgscan always brings them back into pvscan


 Thanks much,
      Justin Booth

[-- Attachment #2: Type: text/html, Size: 2043 bytes --]

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

end of thread, other threads:[~2001-05-25  7:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-24 14:13 [linux-lvm] Problem deleteing PV's Kevin M Corry
2001-05-24 17:40 ` Justin Booth
2001-05-24 17:47   ` Subosu Guruju
2001-05-25  7:43   ` Patrick Caulfield
  -- strict thread matches above, loose matches on Subject: below --
2001-05-24 18:35 Kevin M Corry
2001-05-24 18:56 ` Justin Booth
2001-05-24 19:19   ` Justin Booth
     [not found] <200105231825.tgoooa.cef.37tiu8v@emu>
2001-05-24 14:18 ` Steve Cranage
2001-05-24  0:35 Justin Booth
2001-05-24  0:53 ` Austin Gonyou
2001-05-24  1:19   ` Justin Booth

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.