[Gllug] Removing LVM (RHEL4)

Daniel P. Berrange dan at berrange.com
Wed Oct 19 12:59:31 UTC 2005


On Wed, Oct 19, 2005 at 01:50:57PM +0100, Rich Walker wrote:
> Bruce Richardson <itsbruce at uklinux.net> writes:
> 
> >
> > LVM really does not add much complexity and actually makes maintenance
> > considerably easier if you use it properly.
> 
> Well, until it gets confused.
> 
> I have /dev/md1 built up like this:
> 
> md0 : active raid1 hda1[0]
>       19583168 blocks [2/1] [U_]
>       
> md1 : active raid5 hdf2[0] hdk2[2] hdi2[3] hdg2[4] hde2[1]
>       638904576 blocks level 5, 32k chunk, algorithm 2 [5/5] [UUUUU]
[snip]
> Unfortunately, at some time the system has decided /dev/hdg2 is a
> separate PV.
> 
> So on boot, it's a race between md and lvm as to who grabs hdg2
> first. 

With LVM-2 at least, you can edit /etc/lvm/lvm.conf and add
explicit exclusions for certain block devices. The default is
to allow scanning of all devices, with something like

  # This section allows you to configure which block devices should
  # be used by the LVM system.
  devices {

    # Where do you want your volume groups to appear ?
    dir = "/dev"

    # An array of directories that contain the device nodes you wish
    # to use with LVM2.
    scan = [ "/dev" ]

    # By default we accept every block device:
    filter = [ "a/.*/" ]
  }

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$|" ];

Regards,
Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20051019/930ab327/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list