[Gllug] Removing LVM (RHEL4)
Nix
nix at esperi.org.uk
Thu Oct 20 09:08:35 UTC 2005
On Wed, 19 Oct 2005, Bruce Richardson said:
> On Wed, Oct 19, 2005 at 01:59:31PM +0100, Daniel wrote:
>> But, if you have some devices RAID'd or managed by another layer
>> in device-mapper, for safety sake, its a good idea to add excludes
>> for them. In your example, I believe something like this would
>> do the job:
>>
>> filter = [ "r|^/dev/hdg2$|" ];
>
> Good advice. It looks as if LVM is spotting the PV magic at the
> beginning of the underlying partition and then treating that individual
> partition as a standalone PV.
It does indeed do this. It does a blind scan of all physical block
devices, searching each of them for PV metadata; if they have it,
they're a PV.
This has equally pleasant consequences on Suns, whose disklabel
structure leads to e.g. /dev/sda and /dev/sda1 actually starting at the
same disk sector --- so LVM by default decides that *both* are PVs, and
hilarity results, not least because most of the kernel, more
specifically device-mapper, doesn't realise that /dev/sda and its
constituent partitions alias each other.
(The solution is as you describe; it'd be nice if we didn't have to do
things like this, but that would mean discarding the scan-devices-
for-metadata stuff that vgscan does, but that scanning is otherwise a
very good idea, as it means that LVM spots new devices without your
needing to do anything special at all.)
--
`"Gun-wielding recluse gunned down by local police" isn't the epitaph
I want. I am hoping for "Witnesses reported the sound up to two hundred
kilometers away" or "Last body part finally located".' --- James Nicoll
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list