(Antiquity graphic)
Introduction
News
Search
Documentation License
Download
Contributors
Contact Us

Antiquity
Secure Log For Wide-Area Distributed Storage

Tutorials - Moxie (Generic Database)
  • Running Moxie with a generic database
    • Note:
      • All the configuration files used will have the appending '_db'
        • i.e. We will be using pub_db.cfg NOT pub.cfg
    • Summary of commands:
      • Clear temp, kill all existing java processes & create the mount point directory:
        • rm -rf /tmp/log* /tmp/moxie /tmp/test-* /tmp/*.log
        • killall -9 java
        • mkdir -p /tmp/moxie/dst
      • Navigate to the /ro/directory:
        • cd ~/antiquity/src/moxie/ro/
      • Generate a key pair if it doesn't already exist (make sure you are in the ~/moxie/ro/ directory):
        • ../../../bin/genkey.sh keypair1 1024
      • Start the publisher_db:
        • ../../../bin/run-java bamboo.lss.DustDevil pub_db.cfg >& /tmp/pub_db.log&
      • Start moxierofs_db:
        • ../../../bin/run-java bamboo.lss.DustDevil moxierofs_db.cfg >& /tmp/moxierofs_db.log&
        • Do a READ-ONLY file system operation to the mount point
          • i.e. ls -l /tmp/moxie/dst; cat /tmp/moxie/dst/*
      • If you would like to read what was archived, use read_db:
        • ../../../bin/run-java bamboo.lss.DustDevil read_db.cfg >& /tmp/read_db.log&
      • To unmount the local file system just mounted use:
        • umount /tmp/moxie/dst/
    • Detailed explanation:
      • Moxie is a file system that we will use to run on top of some type of storage system
      • Running moxie gives us the ability to perform file system operations at mount point to the mounted file system in some local directory, as well as be able to read the archived file system:
        • Navigate to the ~/antiquity/src/moxie/ro/ directory
          • cd ~/antiquity/src/moxie/ro/
        • Publisher DB:
          • Function:
            • Publisher will write all the blocks of the FsRoot file system into a log, which is stored by a database. We will be using a generic database in this example.
              • Note:
                • The location of the database files is /tmp/log_db/
          • Open the pub_db.cfg file in a text editor:
            • i.e. vi pub_db.cfg
            • Navigate down the file until you see "FsRoot"
              • Change the value of FsRoot to be the path where the antiquity folder is located in
                • i.e. FsRoot /Users/user_name/antiquity
                  • Note:
                    • For the value of FsRoot you can not use the ~ character, so the antiquity's path will need to be written out in full
            • Follow the instructions at the top of the pub_db.cfg file (same as below, but not as explicit):
              • Navigate to ~/moxie/ro directory (if you aren't already in it):
                • cd ~/antiquity/src/moxie/ro
              • Remove the log directory of the db:
                • rm -rf /tmp/log_db
              • Generate a key pair if it doesn't already exist (make sure you are in the ~/moxie/ro/ directory):
                • ../../../bin/genkey.sh keypair1 1024
              • Run the publisher db
                • ../../../bin/run-java bamboo.lss.DustDevil pub_db.cfg >& /tmp/pub_db.log&
        • MoxieRoFs DB:
          • Function:
            • Provides a Read Only File System (RoFs) to use on the archived files
            • Note:
              • moxierofs_db.cfg DOES use FUSE to locally mount a file system. You can view mounted file system in Finder
          • Create a local directory that will serve as the mount point
            • mkdir -p /tmp/moxie/dst
          • Open the moxierofs_db.cfg in a text editor:
            • i.e. vi moxierofs_db.cfg
            • Follow the instructions at the top (same as below, but not as explicit):
              • Run the publisher
                • Note:
                  • The publisher is already running (from the previous step) so we can skip this one
              • Navigate to the /moxie/ro/ directory
                • Note:
                  • Again, we are already in this directory, skip this step
              • Assure the key pair exists
                • Note:
                  • Again, we've already done this in the previous step when running the publisher, skip this step
              • Mounting the actual file system on to our local directory:
                • ../../../bin/run-java bamboo.lss.DustDevil moxierofs_db.cfg >& /tmp/moxierofs_db.log&
                • Note:
                  • If you happen to not see the mounted file system in the Finder it is probably due to the fact that mount point used was previously created and used. Remove the directory /tmp/moxie, re-create the mount point directory and run the previous command again.
                    • rm -rf /tmp/moxie
                    • mkdir -p /tmp/moxie/dst/
                • Recall:
                  • The directory of the database files is /tmp/log_db/.
                  • Though a file system is presented to you after running moxierofs_db.cfg, everything that was archived is in the form of database files located in /tmp/log_db/
              • Now we can perform READ-ONLY file system operations at mount point
                • i.e. ls -l /tmp/moxie/dst or cat /tmp/moxie/dst/*
                • To unmount the local file system just mounted use:
                  • umount /tmp/moxie/dst/
          • Read DB
            • Function:
              • Reads the archived directory, written by the publisher in a step-wise fashion based on hash's of the public key used
            • Open read_db.cfg in a text editor:
              • i.e. vi read_db.cfg
              • Run the publisher
                • Note:
                  • The publisher is already running (from the previous step) so we can skip this one
              • Navigate to the /moxie/ro/ directory
                • Note:
                  • Again, we are already in this directory, skip this step
              • Run the command to read the archived file system:
                • ../../../bin/run-java bamboo.lss.DustDevil read_db.cfg >& /tmp/read_db.log&


    Last modified 2007/08/17.