Next Previous Contents

13. Reinitializing Coda Servers after a Disaster

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. Note that this is a fairly drastic step and should be treated as a last resort. It will typically take an entire day or more to perform and the system will be unavailable during that time. You will not be able to reintigrate after a reinitialization.

This chapter explains the steps necessary to reinitialize your system and restore your data on "clean" servers. The basic steps are as follows:

  1. Obtain backup dump files for all of the volumes in the system.
  2. Reinitialize RVM on the servers.
  3. Recreate the volumes that existed before the reinitialization.
  4. Restore and mount the backup clones created in step 1.
  5. Mount the volumes created in step 3.
  6. Copy the data from the restored volumes to the newly created volumes.
  7. Unmount the new volumes and backup clones.
  8. Flush client caches.
  9. Test the system.

13.1 Obtaining Backup Dump Files

If the system is in a state that backups can be successfully run, we suggest running the script to capture the most recent state. You may, however, use the tapes from your last successfule backup and skip this step. See Chapter XXX and backup (8) for more details on creating backups. You will need to create new dumplist 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 dumplist (5) for details on the format of these files. To create the dumplists, use the following steps:

  1. Use /vice/vol/VolumeList and /vice/vol/VRList to create a list of all of the volumes on the servers you want to reinitialize.
  2. Sort the volumes by size. Use the cfs lv 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.
  3. Divide the volumes into groups that will fit onto a single backup tape (at CMU this is about 1.5 GB)
  4. Run backup on the dumplist files.

13.2 Reinitializing RVM on the Servers

Use rvmutl and rdsinit 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 XXX for the details of initializing RVM.

13.3 Recreate the Backed Up Volumes

Use createvol (8) and createvol_rep (8) to create all of the volumes that you backed up in section XXX.

13.4 Restore the Backup Clones

First, restore the read only coda of the coda_root volume. This should have been backup up in section XXX. In section XXX, you should have created your coda_root.tmp volume. This will automatically be mounted when coda_root is restored. Next create a directory /coda/tmp/restore and use the volutil restore to restore each of the backup clones to /coda/tmp/restore. See the volutil (8) man page for more details on restoring the volumes.

13.5 Mount the Recreated Volumes

Create a directory /coda/tmp/inited and mount all of the volumes created in XXX in this directory.

13.6 Populate the New Volumes

Run the script restorevolumes (8) to restore all of the volumes that were backed up in section XXX.

13.7 Unmount the Volumes

Use cfs rmmount to unmount all of the volumes in /coda/tmp/restored and /coda/tmp/inited. Then remove these directories. See the man page cfs (8) for more details on unmounting volumes.

13.8 Flush Client Caches

You need to flush the client caches as they will not have the correct volume information anymore. Use the cfs flushcache command to do this.

13.9 Test the system

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.

Next Previous Contents