next up previous contents
Up: Shore Software Installation Manual Previous: Compiling and Installing

 

Testing Your Installation

This section lists steps to test your installation. Included are instructions for running the Shore server, compiling and running some example programs, and mounting the Shore file system. There are also instructions for compiling a simple value-added-server built with the Shore Storage Manager. Only brief explanations are provided. Pointers to relevant documents are given.

 

Running the Shore Server

If you haven't already done so (while installing the software), do

    set SHROOT=directory-in-which-shore-is-installed
(if you use a Bourne-style shell, omit the word "set").

Copy the configuration files to your home directory and modify a line in the .shoreconfig file to point to installation location. (In the sed command below, treat PUT-YOUR-INSTALLED-DIR-HERE literally. You can yank this entire command with your mouse.)

    sed -e "s,PUT-YOUR-INSTALLED-DIR-HERE,$SHROOT," \
         $SHROOT/lib/options > ~/.shoreconfig
    cp $SHROOT/lib/shore.rc ~
    # in case you want to edit them later,
    chmod u+w ~/.shoreconfig ~/shore.rc

YOU MUST update your configuration files. The set of options has changed between releases.

Make a directory in which to run the Shore server. This directory will have subdirectories log and volumes. You must run the server while in this directory since the ~/.shoreconfig and /shore.rc files refer to ./log and ./volumes. The directory should be in a file system with at least 100 MB of free space (this is because the log and volume sizes in the distributed configuration files are this large).

    # create a directory for running the Shore server
    mkdir shoreserver   
    cd shoreserver
    mkdir log volumes

The format of volumes has changed since the Beta release. Volumes created under the Beta release CANNOT be used with this server.

Now you can run the Shore server. The ~/shore.rc script initializes the Shore directory name space.

    $SHROOT/bin/shore -svas_tcllib $SHROOT/lib/vas.tcllib
You can safely ignore the warning
Warning: no database administrator -- running under userid ...

Expect the server to print a few lines like these:

Looking for run command file "~/shore.rc"...
format --./volumes/miniroot-- 5000 true 
mkfs ./volumes/miniroot 5000 10 
Done serving devices and making filesystems.
 
root = 0 
setroot  10 
/ is now 0.0.0.0:10.20007  
See if  /  exists in the Shore namespace. 
/  does exist 
Done putting together the namespace.
 
Done reading ~/shore.rc.
Welcome to the Shore Value-Added-Server 
Version ($Id: installation.src,v 1.6 1996/07/26 20:15:40 nhall Exp $)
(0)%

The server has a command interpreter. Try these commands:

    # list directories, registered objects, pools in root directory 
    ls
    help

To shut down the server try any one of these:

    # at the server prompt
    q[uit]
    bye
    exit
    ctrl-D

    # or open another window and run this program 
    $SHROOT/bin/sshutdown

The document, Running a Shore Server, gives more information on configuring and running the Shore Server.

 

Compiling and Running an Application

For the following examples, you must have a server running. If you don't, start one as described above. Then build and run one or more of the examples in another window, as described in the following paragraphs.

The first test uses one of the examples shipped in the documentation release. See pscan/README for details. For other examples, see the README in each of the examples directories. First copy the entire examples/pscan directory into another directory.

    mkdir pscan
    cp $SHROOT/examples/pscan/* pscan
    cd pscan

Make sure your environment defines SHORE to point to the directory where you installed Shore (it should contain subdirectories lib, bin, etc.). Then build the test programs build, pscan, and destroy and try running them.

    make
    build 10 testpool
    pscan testpool
    destroy testpool

The output should look something like this:

	% build 10 testpool
	Created 10 parts
	% pscan testpool
	0, Part0
	1, Part1
	2, Part2
	3, Part3
	4, Part4
	5, Part5
	6, Part6
	7, Part7
	8, Part8
	9, Part9
	Found 10 parts
	% destroy testpool
	Destroyed 10parts

The document Getting Started with Shore gives information about writing Shore applications, using $SHROOT/examples/stree as an example.

 

NFS-Mounting the Shore File System

The Shore Server creates and manages a name space of objects, the Shore file system, that looks like a Unix file system. The Shore file system can be mounted as an NFS remote file system, allowing you to use standard commands such as ls to navigate it.

To mount the Shore file system you must have super-user (root) privileges on your machine.

    # create a mount point (an empty Unix directory)
    mkdir /shoremnt

    #if you are running any OS except Linux, use this
    $SHROOT/bin/mnt localhost /shoremnt $SHROOT/bin

    #if you are running Linux use this
    $SHROOT/bin/mnt.linux localhost /shoremnt $SHROOT/bin

To check the mount (you don't have to be super-user):

    $SHROOT/bin/smount
    # or use your system's mount command
    /usr/etc/mount

    # at the prompt from the shore server, type
    ls /
    # at a shell prompt, type 
    ls /shoremnt
    # results should indicate the same directory
    # contents, although the syntax differs

The document Running a Shore Server. gives more information on NFS-Mounting the Shore file system.

 

Compiling and Running a Value-Added Server

If you plan on writing your own value-added server (VAS) using Shore Storage Manager (SSM) you should perform the following tests on the SSM installation. This test uses the ``hello world'' example shipped in the documentation release. See examples/vas/hello/README for details about the program. For other VAS examples, see the examples/vas/README.

The first thing to do is copy the program to a new directory.

    mkdir hello
    cp $SHROOT/examples/vas/hello/* hello
    cd hello
    cp Makefile.template Makefile
    chmod u+w Makefile

Before compiling the program, edit Makefile and change the value of the macro INSTALL_DIR to the value of $SHROOT. If you are running on Solaris, you must also define LDFLAGS = -lnsl -lsocket, which is located a few lines below the definition of INSTALL_DIR.

    vi Makefile
    make

Before running the hello program, edit exampleconfig and change the value of the sm_diskrw option to $SHROOT/bin/diskrw. You will also need to make a directory for holding the log. The log directory used is set by the sm_logdir option in exampleconfig. Running hello will leave log files in ./log.hello and a storage device file called ./device.hello. These can be removed when you are done.

    chmod u+w exampleconfig 
    vi exampleconfig
    mkdir log.hello
    hello
    rm -r log.hello device.hello

The document Writing Value-Added Servers with the Shore Storage Manager gives information about writing value-added servers using $SHROOT/examples/vas/grid as an example.


next up previous contents
Up: Shore Software Installation Manual Previous: Compiling and Installing



Marvin Solomon
Tue Jul 1 15:30:39 CDT 1997