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@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
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/