linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* Re: [linux-lvm] how to remove PV from a VG?
@ 1999-10-20 11:48 Heinz Mauelshagen
  1999-10-20 13:06 ` Piete Brooks
  0 siblings, 1 reply; 7+ messages in thread
From: Heinz Mauelshagen @ 1999-10-20 11:48 UTC (permalink / raw)
  To: linux-lvm


> 
> Heinz Mauelshagen (mauelsha@ez-darmstadt.telekom.de) wrote :
> 
> > > 
> > > Hey folks,
> > > 
> > 
> > Hi Freddy.
> > 
> > > the subject says it (almost) all, I need to remove three PVs that were added to my VG by mistake (namely /dev/sdi, /dev/sdj and /dev/sdk), I guess you see where the error is. I can access data on previous PVs (yet), but don't know how to remove PVs, there is nothing linke 'pvremove'. I can assure you there is no data (perhaps except signature) on those disks.
> > > 
> > 
> > vgreduce YourVG /dev/sd[i-k]
> > 
> > - or, if the 3 partitions hold the only empty PVs of YourVG -
> > 
> > vgreduce -a YourVG
> 
> yes, helped quite enough, just the /dev/sd[ghi] devices are still in list of valid PVs and when I run pvscan my partitions get destroyed (I suppose because of rewriting LVM marker to the device). How do I really, physically remove the devices from the PV list?

Set the partition type identifier to something different than 0xfe.

regards,
Heinz

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
mge@ez-darmstadt.telekom.de                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

* Re: [linux-lvm] how to remove PV from a VG?
  1999-10-20 11:48 [linux-lvm] how to remove PV from a VG? Heinz Mauelshagen
@ 1999-10-20 13:06 ` Piete Brooks
  1999-10-20 15:57   ` Adrien Farkas
  0 siblings, 1 reply; 7+ messages in thread
From: Piete Brooks @ 1999-10-20 13:06 UTC (permalink / raw)
  To: Heinz Mauelshagen; +Cc: linux-lvm

>> How do I really, physically remove the devices from the PV list?
> Set the partition type identifier to something different than 0xfe.

What if the disks were to not have a `partition type', e.g. /dev/sdb or
/dev/md33 ?

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

* Re: [linux-lvm] how to remove PV from a VG?
  1999-10-20 13:06 ` Piete Brooks
@ 1999-10-20 15:57   ` Adrien Farkas
  0 siblings, 0 replies; 7+ messages in thread
From: Adrien Farkas @ 1999-10-20 15:57 UTC (permalink / raw)
  To: Piete Brooks; +Cc: Heinz Mauelshagen, linux-lvm

Piete Brooks (Piete.Brooks@cl.cam.ac.uk) wrote :

> >> How do I really, physically remove the devices from the PV list?
> > Set the partition type identifier to something different than 0xfe.
> 
> What if the disks were to not have a `partition type', e.g. /dev/sdb or
> /dev/md33 ?
dd if=/dev/zero of=/dev/sdb count=8 bs=1024 does the trick

thanks to all who responded (and subsequently helped).

regards,

-- 
                                             freddy

----==-- _                      Adrien "freddy" Farkas
---==---(_)__  __ ____  __       freddy@sk.oracle.com
--==---/ / _ \/ // /\ \/ /  We all know Linux is great... It
-=====/_/_//_/\___/ /_/\_\  does infinite loops in 5 seconds

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

* Re: [linux-lvm] how to remove PV from a VG?
  1999-10-20 10:31   ` Adrien Farkas
@ 1999-10-20 15:10     ` Ryan Murray
  0 siblings, 0 replies; 7+ messages in thread
From: Ryan Murray @ 1999-10-20 15:10 UTC (permalink / raw)
  To: freddy; +Cc: Heinz Mauelshagen, linux-lvm

On Wed, Oct 20, 1999 at 12:31:02PM +0200, Adrien Farkas wrote:
> Heinz Mauelshagen (mauelsha@ez-darmstadt.telekom.de) wrote :
> > > the subject says it (almost) all, I need to remove three PVs that were added to my VG by mistake (namely /dev/sdi, /dev/sdj and /dev/sdk), I guess you see where the error is. I can access data on previous PVs (yet), but don't know how to remove PVs, there is nothing linke 'pvremove'. I can assure you there is no data (perhaps except signature) on those disks.
> > > 
> > 
> > vgreduce YourVG /dev/sd[i-k]
> > 
> > - or, if the 3 partitions hold the only empty PVs of YourVG -
> > 
> > vgreduce -a YourVG
> 
> yes, helped quite enough, just the /dev/sd[ghi] devices are still in
> list of valid PVs and when I run pvscan my partitions get destroyed
> (I suppose because of rewriting LVM marker to the device).  How do I
> really, physically remove the devices from the PV list?

or, if you aren't using partitions, write over the front of the drive
with:

dd if=/dev/zero of=/dev/sdg bs=1024 count=5

I'm not sure how much is actually needed to be overwritten, I normally
just don't put a limit on it and hit ctrl-c after awhile.  (or let it
run to the end of the drive...)

-- 
Ryan Murray (rmurray@cyberhqz.com, rmurray@glenayre.com)
Software Designer, Glenayre Technologies Inc.
The opinions expressed here are my own.

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

* Re: [linux-lvm] how to remove PV from a VG?
  1999-10-19 23:12 ` Heinz Mauelshagen
@ 1999-10-20 10:31   ` Adrien Farkas
  1999-10-20 15:10     ` Ryan Murray
  0 siblings, 1 reply; 7+ messages in thread
From: Adrien Farkas @ 1999-10-20 10:31 UTC (permalink / raw)
  To: Heinz Mauelshagen; +Cc: linux-lvm

Heinz Mauelshagen (mauelsha@ez-darmstadt.telekom.de) wrote :

> > 
> > Hey folks,
> > 
> 
> Hi Freddy.
> 
> > the subject says it (almost) all, I need to remove three PVs that were added to my VG by mistake (namely /dev/sdi, /dev/sdj and /dev/sdk), I guess you see where the error is. I can access data on previous PVs (yet), but don't know how to remove PVs, there is nothing linke 'pvremove'. I can assure you there is no data (perhaps except signature) on those disks.
> > 
> 
> vgreduce YourVG /dev/sd[i-k]
> 
> - or, if the 3 partitions hold the only empty PVs of YourVG -
> 
> vgreduce -a YourVG

yes, helped quite enough, just the /dev/sd[ghi] devices are still in list of valid PVs and when I run pvscan my partitions get destroyed (I suppose because of rewriting LVM marker to the device). How do I really, physically remove the devices from the PV list?

Thanks in advance,
-- 
                                             freddy

----==-- _                      Adrien "freddy" Farkas
---==---(_)__  __ ____  __       freddy@sk.oracle.com
--==---/ / _ \/ // /\ \/ /  We all know Linux is great... It
-=====/_/_//_/\___/ /_/\_\  does infinite loops in 5 seconds

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

* Re: [linux-lvm] how to remove PV from a VG?
  1999-10-19 21:15 Adrien Farkas
@ 1999-10-19 23:12 ` Heinz Mauelshagen
  1999-10-20 10:31   ` Adrien Farkas
  0 siblings, 1 reply; 7+ messages in thread
From: Heinz Mauelshagen @ 1999-10-19 23:12 UTC (permalink / raw)
  To: freddy; +Cc: mge, linux-lvm

> 
> Hey folks,
> 

Hi Freddy.

> the subject says it (almost) all, I need to remove three PVs that were added to my VG by mistake (namely /dev/sdi, /dev/sdj and /dev/sdk), I guess you see where the error is. I can access data on previous PVs (yet), but don't know how to remove PVs, there is nothing linke 'pvremove'. I can assure you there is no data (perhaps except signature) on those disks.
> 

vgreduce YourVG /dev/sd[i-k]

- or, if the 3 partitions hold the only empty PVs of YourVG -

vgreduce -a YourVG


> Another question regarding devfs, some time ago a guy had a problem with devfs and 'smart' libs and Heinz pointed him to mailing list archives to look for patches. I did so, too (because I have tha same probs) but didn't find anything regarding this issue, anyone can help me with this?


I don't recall if it was me 8*)

If you refer to the code in tools/lib/pv_read_all_pv.c which tried to
optimize performance while scanning the device special files, you can
comment out lines 103-105 and 107 to fix this.

HTH.

Regards,
Heinz
--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
mge@ez-darmstadt.telekom.de                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

* [linux-lvm] how to remove PV from a VG?
@ 1999-10-19 21:15 Adrien Farkas
  1999-10-19 23:12 ` Heinz Mauelshagen
  0 siblings, 1 reply; 7+ messages in thread
From: Adrien Farkas @ 1999-10-19 21:15 UTC (permalink / raw)
  To: linux-lvm

Hey folks,

the subject says it (almost) all, I need to remove three PVs that were added to my VG by mistake (namely /dev/sdi, /dev/sdj and /dev/sdk), I guess you see where the error is. I can access data on previous PVs (yet), but don't know how to remove PVs, there is nothing linke 'pvremove'. I can assure you there is no data (perhaps except signature) on those disks.

Another question regarding devfs, some time ago a guy had a problem with devfs and 'smart' libs and Heinz pointed him to mailing list archives to look for patches. I did so, too (because I have tha same probs) but didn't find anything regarding this issue, anyone can help me with this?

THanks in advance,
-- 
                                             freddy

----==-- _                      Adrien "freddy" Farkas
---==---(_)__  __ ____  __       freddy@sk.oracle.com
--==---/ / _ \/ // /\ \/ /  We all know Linux is great... It
-=====/_/_//_/\___/ /_/\_\  does infinite loops in 5 seconds

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

end of thread, other threads:[~1999-10-20 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-20 11:48 [linux-lvm] how to remove PV from a VG? Heinz Mauelshagen
1999-10-20 13:06 ` Piete Brooks
1999-10-20 15:57   ` Adrien Farkas
  -- strict thread matches above, loose matches on Subject: below --
1999-10-19 21:15 Adrien Farkas
1999-10-19 23:12 ` Heinz Mauelshagen
1999-10-20 10:31   ` Adrien Farkas
1999-10-20 15:10     ` Ryan Murray

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