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.