<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>Coda File System User and System Administrators Manual: Reinitializing Coda Servers after a Disaster </TITLE> <LINK HREF="manual-14.html" REL=next> <LINK HREF="manual-12.html" REL=previous> <LINK HREF="manual.html#toc13" REL=contents> </HEAD> <BODY> <A HREF="manual-14.html">Next</A> <A HREF="manual-12.html">Previous</A> <A HREF="manual.html#toc13">Contents</A> <HR> <H2><A NAME="ReinitCoda"></A> <A NAME="s13">13. Reinitializing Coda Servers after a Disaster </A></H2> <P>As Coda is still an experimental system, the state of a Coda File System may sometimes get to the point where you will want to reinitialize all of the servers. <EM>Note that this is a fairly drastic step and should be treated as a last resort</EM>. It will typically take an entire day or more to perform and the system will be unavailable during that time. <EM>You will <B>not</B> be able to reintigrate after a reinitialization</EM>. <P>This chapter explains the steps necessary to reinitialize your system and restore your data on "clean" servers. The basic steps are as follows: <OL> <LI>Obtain backup dump files for all of the volumes in the system.</LI> <LI> Reinitialize RVM on the servers.</LI> <LI> Recreate the volumes that existed before the reinitialization.</LI> <LI>Restore and mount the backup clones created in step 1.</LI> <LI>Mount the volumes created in step 3.</LI> <LI>Copy the data from the restored volumes to the newly created volumes.</LI> <LI>Unmount the new volumes and backup clones.</LI> <LI>Flush client caches.</LI> <LI>Test the system.</LI> </OL> <P> <H2><A NAME="ss13.1">13.1 Obtaining Backup Dump Files</A> </H2> <P> <A NAME="ReinitDump"></A> If the system is in a state that backups can be successfully run, we suggest running the <B>backup.sh</B> script to capture the most recent state. You may, however, use the tapes from your last successfule backup and skip this step. See Chapter <A HREF="manual-12.html#Backup">XXX</A> and <B>backup (8)</B> for more details on creating backups. You will need to create new <EM>dumplist</EM> files for the backups. If you include the volumes that you do not normally back up in the newly created dumplists, you will be able to restore those volumes rather than re-create their contents. See <B>dumplist (5)</B> for details on the format of these files. To create the dumplists, use the following steps: <P> <OL> <LI>Use <EM>/vice/vol/VolumeList</EM> and <EM>/vice/vol/VRList</EM> to create a list of all of the volumes on the servers you want to reinitialize.</LI> <LI>Sort the volumes by size. Use the <B>cfs lv</B> command to get an estimate on the size that each volume will take. Remember that if a volume is replicated, each replica will need space on the tape.</LI> <LI>Divide the volumes into groups that will fit onto a single backup tape (at CMU this is about 1.5 GB)</LI> <LI>Run <B>backup</B> on the dumplist files.</LI> </OL> <P> <H2><A NAME="ss13.2">13.2 Reinitializing RVM on the Servers</A> </H2> <P>Use <B>rvmutl</B> and <B>rdsinit</B> to initialize RVM. Unless you are reinitializing in order to change the size of the RVM heap, be sure to use the same sizes that you used previously. See section <A HREF="manual-7.html#RVMInitialization">XXX</A> for the details of initializing RVM. <P> <H2><A NAME="ss13.3">13.3 Recreate the Backed Up Volumes</A> </H2> <P> <A NAME="ReinitCreateVols"></A> Use <B>createvol (8)</B> and <B>createvol_rep (8)</B> to create all of the volumes that you backed up in section <A HREF="#ReinitDump">XXX</A>. <P> <H2><A NAME="ss13.4">13.4 Restore the Backup Clones</A> </H2> <P>First, restore the read only coda of the <EM>coda_root</EM> volume. This should have been backup up in section <A HREF="#ReinitDump">XXX</A>. In section <A HREF="#ReinitCreateVols">XXX</A>, you should have created your <EM>coda_root.tmp</EM> volume. This will automatically be mounted when <EM>coda_root</EM> is restored. Next create a directory <EM>/coda/tmp/restore</EM> and use the <B>volutil restore</B> to restore each of the backup clones to <EM>/coda/tmp/restore</EM>. See the <B>volutil (8)</B> man page for more details on restoring the volumes. <P> <H2><A NAME="ss13.5">13.5 Mount the Recreated Volumes</A> </H2> <P>Create a directory <EM>/coda/tmp/inited</EM> and mount all of the volumes created in <A HREF="#ReinitCreateVols">XXX</A> in this directory. <P> <H2><A NAME="ss13.6">13.6 Populate the New Volumes</A> </H2> <P>Run the script <B>restorevolumes (8)</B> to restore all of the volumes that were backed up in section <A HREF="#ReinitDump">XXX</A>. <P> <H2><A NAME="ss13.7">13.7 Unmount the Volumes</A> </H2> <P>Use <B>cfs rmmount</B> to unmount all of the volumes in <EM>/coda/tmp/restored</EM> and <EM>/coda/tmp/inited</EM>. Then remove these directories. See the man page <B>cfs (8)</B> for more details on unmounting volumes. <P> <H2><A NAME="ss13.8">13.8 Flush Client Caches</A> </H2> <P>You need to flush the client caches as they will not have the correct volume information anymore. Use the <B>cfs flushcache</B> command to do this. <P> <H2><A NAME="ss13.9">13.9 Test the system</A> </H2> <P>After youve flushed the client caches the system is ready to run. Do some testing to make sure Coda is functioning correctly and allow the users back into the system. <HR> <A HREF="manual-14.html">Next</A> <A HREF="manual-12.html">Previous</A> <A HREF="manual.html#toc13">Contents</A> </BODY> </HTML>