[linux-lvm] How to place LVM2 metadata to other disks which don't belong to any volume group?
George Brian
biangw at gmail.com
Fri Dec 13 07:15:22 UTC 2013
Hi£¬
thank for your reply.
I read about "lvm.conf" and "man pvcreate" and practice like your
instruction.
but it's hard to meet my expection.
I do as follows:
1, setting lvm.conf to dirs
2, pvcreate --pvmetadatacopies 0
3, vgcreate on pv
Aborting vg_write: No metadata areas to write to!
I indeed want to store metadata in common disk such as /dev/sdb,
eventually to store all vg's metadata to one singe disk which specially
used to store metadata without data.
thanks
2013/12/11 Alasdair G Kergon <agk at redhat.com>
> On Wed, Dec 11, 2013 at 03:06:13PM +0800, George Brian wrote:
> > Instead of storing metadata on PV metadata areas, now I want to store it
> to
> > other disks which don't belong to any volume group, just common disk.
>
> This can indeed be done but because it is not a configuration that receives
> much testing you should check the things you want to do work for you in
> your particular circumstances.
>
> LVM needs to use one 512-byte sector on the device to label it as a PV
> and store its UUID. By default the 2nd sector is used as this is normally
> free. Read about --labelsector in 'man pvcreate' and use
> --pvmetadatacopies 0.
>
> Then read about the 'dirs' setting in the 'metadata' section in 'man
> lvm.conf':
>
> dirs ¡ª List of directories holding live copies of LVM2 metadata
> as text files. These directories must not be on logical vol©\
> umes. It is possible to use LVM2 with a couple of directories
> here, preferably on different (non-logical-volume) filesystems
> and with no other on-disk metadata, pvmetadatacopies = 0.
> Alternatively these directories can be in addition to the on-
> disk metadata areas. This feature was created during the devel©\
> opment of the LVM2 metadata before the new on-disk metadata
> areas were designed and no longer gets tested. It is not sup©\
> ported under low-memory conditions, and it is important never to
> edit these metadata files unless you fully understand how things
> work: to make changes you should always use the tools as normal,
> or else vgcfgbackup, edit backup, vgcfgrestore.
>
> Alasdair
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20131213/d931ad74/attachment.htm>
More information about the linux-lvm
mailing list