# Author:	Steve Purkis <steve.purkis@multimap.com>
#		(derived work)
# Originals by:	Peter T. Breuer <ptb@it.uc3m.es>
#		Matthew Sackman <matthew@wellquite.org>
# License:	GNU GPL v2.1

---+++ Scenario 1 - Normal operation

Slave:
   * starts enbd-server
      * exports a local device over the network (ie: _/dev/hda5_)

Master:
   * starts enbd-client
      * imports a remote NetworkBlockDevice (ie: _/dev/nda_)
   * makes a S/W RAID-1 device (ie: _/dev/md0_)
      * includes a local device (ie: _/dev/hda8_), and the NBD (ie: _/dev/nda_)
      * no _persistent-superblock_, so we can use FR-1
      * mounts the RAID-1 device (ie: _/usr/local/perforce_)
   * starts p4d

---+++ Scenario 2 - Slave fails

Slave (if still alive):
   * stops enbd-server

Master:
   * removes the NBD from the RAID device (set faulty)
   * stops enbd-client
   * continue as normal

---+++ Scenario 3 - Slave revived

Slave:
   * starts enbd-server

Master:
   * starts enbd-client
   * adds the NBD back into the RAID device (hot add)
       * this syncs the NBD with the local device
   * continue as normal

---+++ Scenario 4 - Master fails

Slave:
   * stops enbd-server
   * mounts the local device (ie: _/usr/local/perforce_)
   * takes over the Failover IP
   * starts p4d

Master (if still alive):
   * gives up Failover IP
   * stops p4d
   * stops the RAID device
      * removes both local device & NBD from the RAID device (set faulty)
   * stops enbd-client

---+++ Scenario 5 - Master revived

Slave:
   * gives up Failover IP
   * stops p4d
   * unmounts the local device
   * starts enbd-server, exports the NBD

Master (if still alive):
   * starts enbd-client, imports the NBD
   * makes the S/W RAID-1 device (ie: _/dev/md0_)
      * removes the local device (set faulty)
      * mounts the RAID-1 device
   * takes over the Failover IP
   * starts p4d
   * adds the local device back into the RAID device (hot add)
      * this syncs the local device with the NBD
