<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Transitional//EN">
<HTML>
<HEAD>
  <!--
    *************************************************************************************
    * Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. *

      For third-party license citations, please see the bottom of this file.
    *************************************************************************************
  -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="TEMPLATEBASE" content="vx_vxhelp_2005c">
<meta name="LASTUPDATED" content="06/13/05 10:25:30">
<meta name="PRODUCTNAME" content="VERITAS Software Documentation">
<meta name="FILENAME" content="02_convertLVM.fm">
     
<title>Restoring the LVM Volume Group Configuration</title>

</HEAD>

<BODY bgcolor="#FFFFFF" link="#000066" vlink="#0000ff" marginheight="0" topmargin="0">
<basefont=1>

<a name="107742"></a>

<div align="left">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
   <td height="2" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#000000">
   </td>
 </tr>
 <tr>
   <td height="15" width="50%" border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc">
    <img src="images/vxsymbol.gif" height="20" width="31" border="0" cellspacing="0" cellpadding="0" align="left">
     
     
   </td>
   <td align="right" width="50%" bgcolor="#cccccc">

<!-- Header Breadcrumbs -->
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&lt;&nbsp;<a href="02_convertLVM_vxvm223_107570.html" title="Previous - Conversion Steps Explained">Previous</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="02_convertLVM_vxvm225_107799.html" title="Next - Examples">Next</a>
&nbsp;&gt;&nbsp;&nbsp;</font>
   </td>
 </tr>

 <tr>
  <td bgcolor="#CCCCCC" colspan="2" height="15" align="right">
  <font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Product:  
<a href="vxvm_splashpage_docCD_vxvm1_103036.vxhd" title="Volume Manager Guides title page ">Volume Manager Guides</a>
  &nbsp;&nbsp;
  </font>
  </td>
 </tr>
 <tr>
  <td bgcolor="#CCCCCC" colspan="2" height="15" align="right">
  <font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Manual:  
<a href="mig_titlepage_docCD_vxvm207_73700.vxhd" title="Volume Manager 4.1 Migration Manager title page ">Volume Manager 4.1 Migration Manager</a>
  &nbsp;&nbsp;
  </font>
  </td>
 </tr>


</table>
</div>

<div align="left">
 <table border="0" width="100%" bgcolor="#FFFFFF">
  <tr>
   <td width="100%" valign="top" bgcolor="#FFFFFF">

<!-- Start Main Topic Content -->
        <a name="startcontent"></a>
	
<h1><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="+1" color="#000000"><a name="107742"></a> Restoring the LVM Volume Group Configuration</font>
</h1>
         
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107743"></a>In some circumstances, you may need to restore the LVM configuration that existed before you converted to VxVM with <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font>. For example:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107744"></a>If something went wrong during the conversion, such as a system crash or a disk crash that caused the conversion to be unworkable.</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107745"></a>If during a conversion only some of a set of volume groups converted successfully, then you may want to restore the LVM configuration for the entire set.</font>
</li>
</ul>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107746"></a>It is possible to restore the original LVM configuration in one of two ways, but both have limitations and restrictions. The method you use depends on if any changes have been made to the VxVM configuration since the conversion occurred. Any of the following actions changes the VxVM configuration:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107747"></a>adding or removing disks</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107748"></a>adding or removing volume groups</font>
</li>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107749"></a>changing the names of VxVM objects</font>
</li>
</ul>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107750"></a>Restoration methods include:</font>
</p>

<p>
<ul type="disc"><li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107751"></a>rollback using <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font></font>
</li>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107752"></a>Use rollback only if the VxVM configuration has not changed since the conversion. This method restores the LVM configuration without the need for user data restoration. See <a href="02_convertLVM_vxvm224_107742.html#107764">Rollback to LVM Using vxvmconvert</a> for details on using this method.</font>
</blockquote>
<li><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107756"></a>restore user data using <font face="Courier New, Courier, sansserif, sans serif" size="2">vgrestore</font> and <font face="Courier New, Courier, sansserif, sans serif" size="2">frecover</font></font>
</li>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="109267"></a>This method is a full LVM restoration which is used to restore your user data from backup when the VxVM configuration has changed since the conversion was made. First of all, this method restores the original LVM configuration information (<font face="Courier New, Courier, sansserif, sans serif" size="2">vgrestore</font>), and then restores the original user data from the backup that was made before the conversion was done (<font face="Courier New, Courier, sansserif, sans serif" size="2">frecover</font>). See <a href="02_convertLVM_vxvm224_107742.html#107783">Full LVM Restoration</a> for more information on using this method.</font>
</blockquote>
<hr noshade size="2" width="100%" color="#000000">
<img src="images/note.gif" alt="Note " height="16" width="16">&nbsp;
<font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000">
<a name="109271"></a><b>Note  &nbsp;&nbsp;</b>
</font>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000">Restoring user data using the <font face="Courier New, Courier, sansserif, sans serif" size="2">vgrestore</font> and <font face="Courier New, Courier, sansserif, sans serif" size="2">frecover</font> method will result in the loss of all user data changes made since the conversion, and the loss of all new volumes created since the conversion. <br><br>In other words, this method of restoring data will take you back to exactly where you were before the conversion was done. <br><br>However, if no new volumes have been created, and if none of the existing volumes have been resized, you can use the <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font> <font face="Courier New, Courier, sansserif, sans serif" size="2">rollback</font> option to restore the original LVM configuration. If you use this method, any user data changes made since the conversion will be retained, and you will not need to carry out a user level data restore (<font face="Courier New, Courier, sansserif, sans serif" size="2">frecover</font>).<br><br>The name changes that <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font> makes as part of the conversion are managed by rollback, and do not count as VxVM configuration changes for the purposes of choosing a restoration method.<br><font face="Courier New, Courier, sansserif, sans serif" size="2"><br></font>The <font face="Courier New, Courier, sansserif, sans serif" size="2">vgrestore</font> command should not be confused with the LVM command, <font face="Courier New, Courier, sansserif, sans serif" size="2">vgcfgrestore</font>. <font face="Courier New, Courier, sansserif, sans serif" size="2">vgcfgrestore</font> is used to restore the LVM configuration information saved by <font face="Courier New, Courier, sansserif, sans serif" size="2">vgcfgbackup</font>, but it will not restore your device files and<font face="Courier New, Courier, sansserif, sans serif" size="2">/etc/fstab</font> entries. It also will not import and activate the volume group, nor will it clean up any VxVM information left around. However, <font face="Courier New, Courier, sansserif, sans serif" size="2">vgrestore</font> will do all of this for you.
</font>
<hr noshade size="2" width="100%" color="#000000">
</ul>
</p>



<h2><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="3" color="#000000"><a name="107764"></a>Rollback to LVM Using vxvmconvert</font>
</h2>
 
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107765"></a>Rollback replaces the VxVM disk groups with the original LVM volume groups. During conversion, vxvmconvert saves a &quot;snapshot&quot; of the original LVM metadata and associated configuration files, such as /etc/fstab and LVM device files. It restores only the LVM metadata and configuration files from this snapshot; user data is not changed. This method can only be used if no changes have been made to the configuration since the conversion. </font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107766"></a>For example, if a disk has been added to the disk group or if the names of any logical volumes have changed, you cannot use the rollback method.</font>
</p>

<hr noshade size="2" width="100%" color="#000000">
<img src="images/note.gif" alt="Note " height="16" width="16">&nbsp;
<font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000">
<a name="107767"></a><b>Note  &nbsp;&nbsp;</b>
</font>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000">In many cases, if you choose the rollback method and the configuration has changed, you receive an error and must use the full restore method.<br><br>If you used the workaround of creating symbolic links from the old LVM names to the new VxVM names described in &quot;step <a href="02_convertLVM_vxvm223_107570.html#107641">5. Planning for new VxVM logical volume names</a>,&quot; you must remove the symbolic links you created before beginning the rollback.<br><br>This &quot;snapshot&quot; is kept on the root file system. The presence of this snapshot should not be taken as assurance that full off-line backups will not be needed. See <a href="02_convertLVM_vxvm223_107570.html#107609">&quot;4. Backing up your LVM configuration and user data</a>&quot; for specific information on backups.
</font>
<hr noshade size="2" width="100%" color="#000000">
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107774"></a>To rollback to LVM from the VxVM conversion, run <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font> and choose option 3. See <a href="02_convertLVM_vxvm227_108205.html#108205">Example: VxVM to LVM rollback</a> for illustration.</font>
</p>

<hr noshade size="2" width="100%" color="#000000">
<img src="images/caution.gif" alt="Caution " height="16" width="16">&nbsp;<font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="107778"></a><b>Caution  &nbsp;&nbsp;</b></font>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000"> Do not use this option unless you are certain that you want to restore LVM volume groups. Once this is run, the VxVM disks that were created as a result of the original conversion from LVM to VxVM no longer exists. This option is <em>not</em> a full complement to <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font>. It simply writes the saved LVM metadata back on top of the disks. Those data can only be considered valid for the period of time when the logical volumes are off-line. If the VxVM configuration has been brought online, the metadata in the rollback snapshot should be considered obsolete. See <a href="02_convertLVM_vxvm224_107742.html#107783">Full LVM Restoration</a> for specific information. </font>
<hr noshade size="2" width="100%" color="#000000">



<h2><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="3" color="#000000"><a name="107783"></a>Full LVM Restoration</font>
</h2>
 
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107784"></a>If you need to restore the original LVM configuration, but changes have been made to the VxVM configuration, you cannot use the rollback option of <font face="Courier New, Courier, sansserif, sans serif" size="2">vxvmconvert</font>. In this case, you must restore the user data in addition to restoring the old LVM metadata and associated configuration files. You may need to use this method if the disks in use by the LVM/VxVM volumes were corrupted during or after conversion. </font>
</p>

<hr noshade size="2" width="100%" color="#000000">
<img src="images/note.gif" alt="Note " height="16" width="16">&nbsp;
<font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000">
<a name="107785"></a><b>Note  &nbsp;&nbsp;</b>
</font>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000">The snapshot of LVM internal data is kept on the root filesystem.
</font>
<hr noshade size="2" width="100%" color="#000000">
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107786"></a>To use this method, you must have backed up data located on all the volume groups' logical volumes before conversion to VxVM.</font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107787"></a>Restoration of LVM volume groups is a two-step process consisting of a restoration of LVM internal data (metadata and configuration files), and restoration of user or application data.</font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107788"></a>The process is limited to restoring the state of the logical volumes as they existed prior to conversion to VxVM disks. If the data has changed on the volumes during the time they were VxVM volumes, those changes are lost once you restore the LVM configuration and saved user data.</font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107789"></a>To do a full restoration of the original LVM configuration, do the following:</font>
</p>

<ol>
<li value="1">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107790"></a>Use <font face="Courier New, Courier, sansserif, sans serif" size="2">vgrestore</font> to restore LVM internal data.
</font>
<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="107791"></a>&nbsp;&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>vgrestore&nbsp;</b></font><em>vol_grp_name</em>
</font>
<li value="2">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="107792"></a>Use the recovery method to restore user or application data. In preparation for conversion, the recovery method should have been done with the standard backups you made in preparation for conversion. The following example shows an <font face="Courier New, Courier, sansserif, sans serif" size="2">frecover</font> from the <font face="Courier New, Courier, sansserif, sans serif" size="2">fbackup</font> example in &quot;step <a href="02_convertLVM_vxvm223_107570.html#107609">4. Backing up your LVM configuration and user data</a>.&quot;
</font>
<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="107796"></a>&nbsp;&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>mount&nbsp;-F&nbsp;vxfs&nbsp;/dev/vg01/lvol3&nbsp;/foodir</b></font>
</font>
<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="107797"></a>&nbsp;&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>frecover&nbsp;-r&nbsp;-f&nbsp;/dev/rmt/c0t0d0BEST</b></font>
</font>
</ol>

<!-- End Main Topic Content -->

   </td>
  </tr>
 </table>
</div>

<div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
  <td height="18" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#FFFFFF">
  </td>
 </tr>
  <td align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&nbsp;&#94;&nbsp;<a href="02_convertLVM_vxvm224_107742.html" title="Restoring the LVM Volume Group Configuration">Return to Top</a></font>

  </td>
  <td align="right"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&lt;&nbsp;<a href="02_convertLVM_vxvm223_107570.html" title="Previous - Conversion Steps Explained">Previous</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="02_convertLVM_vxvm225_107799.html" title="Next - Examples">Next</a>
&nbsp;&gt;&nbsp;&nbsp;</font>
  </td>
 <tr>
   <td height="9" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#FFFFFF">
   </td>
 </tr>

<!-- Footer Breadcrumbs -->
<tr>
<td bgcolor="#FFFFFF" colspan="2" height="15" align="right">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Product:  
<a href="vxvm_splashpage_docCD_vxvm1_103036.vxhd" title="Volume Manager Guides title page ">Volume Manager Guides</a>&nbsp;&nbsp;</font></td>
</tr>

<tr>
<td bgcolor="#FFFFFF" colspan="2" height="15" align="right">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Manual:  
<a href="mig_titlepage_docCD_vxvm207_73700.vxhd" title="Volume Manager 4.1 Migration Manager title page ">Volume Manager 4.1 Migration Manager</a>&nbsp;&nbsp;</font></td>
</tr>


 <tr>
  <td colspan="2" align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" color="#000000" align="right" size="-2">
<em>VERITAS Software Corporation
</em></font><br>

<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">www.veritas.com</font><br>
  </td>
 </tr>
</table>
</div>

</BODY>
  <!--
    *************************************************************************************
    * Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. *

    VERITAS, VERITAS SOFTWARE, the VERITAS Logo, and VERITAS Software Documentation 
    are trademarks or registered trademarks of VERITAS Software Corporation 
    or its affiliates in the U.S. and other countries. Other names may be 
    trademarks of their respective owners. 

    Apache Jakarta Lucene:
    Apache Software License
    Version 1.1

    Copyright (c) 2000 The Apache Software Foundation. All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, 
    are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this 
    list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this 
    list of conditions and the following disclaimer in the documentation and/or other 
    materials provided with the distribution.

    3. The end-user documentation included with the redistribution, if any, must include 
    the following acknowledgment: "This product includes software developed by the Apache 
    Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may 
    appear in the software itself, if and wherever such third-party acknowledgments 
    normally appear.

    4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or 
    promote products derived from this software without prior written permission. For 
    written permission, please contact apache@apache.org.

    5. Products derived from this software may not be called "Apache", nor may "Apache" 
    appear in their name, without prior written permission of the Apache Software Foundation.

    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, 
    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION 
    OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    This software consists of voluntary contributions made by many individuals on behalf 
    of the Apache Software Foundation. For more information on the Apache Software Foundation, 
    please see <http://www.apache.org/>. Portions of this software are based upon public domain 
    software originally written at the National Center for Supercomputing Applications, University 
    of Illinois, Urbana-Champaign.
    
    This product includes WebWindow Software developed by Horst Heistermann.
    *************************************************************************************
  -->
</HTML>
