<div dir="ltr">HiŁ¬<div><br></div><div>thank for your reply.</div><div><br></div><div style>I read about "lvm.conf" and "man pvcreate" and practice like your instruction.</div><div style>but it's hard to meet my expection.</div>
<div style><br></div><div style>I do as follows:</div><div style>1, setting lvm.conf to dirs</div><div style>2, pvcreate --pvmetadatacopies 0</div><div style>3, vgcreate on pv </div><div style>Aborting vg_write: No metadata areas to write to!<br>
</div><div style><br></div><div style>I indeed want to  store metadata in common disk such as /dev/sdb, </div><div style>eventually to store all vg's metadata to one singe disk which specially used to store metadata without data.<br>
</div><div style><br></div><div style>thanks</div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/11 Alasdair G Kergon <span dir="ltr"><<a href="mailto:agk@redhat.com" target="_blank">agk@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Dec 11, 2013 at 03:06:13PM +0800, George Brian wrote:<br>
> Instead of storing metadata on PV metadata areas, now I want to store it to<br>
> other disks which don't belong to any volume group, just common disk.<br>
<br>
This can indeed be done but because it is not a configuration that receives<br>
much testing you should check the things you want to do work for you in<br>
your particular circumstances.<br>
<br>
LVM needs to use one 512-byte sector on the device to label it as a PV<br>
and store its UUID.  By default the 2nd sector is used as this is normally<br>
free.  Read about --labelsector in 'man pvcreate' and use --pvmetadatacopies 0.<br>
<br>
Then read about the 'dirs' setting in the 'metadata' section in 'man lvm.conf':<br>
<br>
        dirs  — List of directories holding live copies of LVM2 metadata<br>
        as text files.  These directories must not be  on  logical  vol©\<br>
        umes.   It  is possible to use LVM2 with a couple of directories<br>
        here, preferably on different  (non-logical-volume)  filesystems<br>
        and  with  no  other  on-disk  metadata,  pvmetadatacopies  = 0.<br>
        Alternatively these directories can be in addition  to  the  on-<br>
        disk metadata areas.  This feature was created during the devel©\<br>
        opment of the LVM2 metadata  before  the  new  on-disk  metadata<br>
        areas  were  designed and no longer gets tested.  It is not sup©\<br>
        ported under low-memory conditions, and it is important never to<br>
        edit these metadata files unless you fully understand how things<br>
        work: to make changes you should always use the tools as normal,<br>
        or else vgcfgbackup, edit backup, vgcfgrestore.<br>
<span class="HOEnZb"><font color="#888888"><br>
Alasdair<br>
<br>
</font></span></blockquote></div><br></div>