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.
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/beta.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 the Alpha and Beta 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 30MB of free space.
# create a directory for running the Shore server mkdir shoreserver cd shoreserver mkdir log volumes
The format of volumes has changed between the Alpha and Beta releases. Volumes created under the Alpha release CANNOT be used with a Beta 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.tcllibYou 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 (Beta-$Id: installation.src,v 1.18 1995/09/18 15:32:27 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.
For the following examples, you must have a server running. If you don't, start one as described above.
This 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.
mkdir pscan cp $SHROOT/examples/pscan/* pscan cd pscan cp Makefile.template Makefile chmod u+w Makefile
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.
make build 10 testpool pscan testpool destroy testpool
The document Getting Started with Shore gives information about writing Shore applications, using $SHROOT/examples/stree as an example.
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.
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
Writing Value-Added Servers with the Shore Storage Manager
gives information about writing value-added servers
using $SHROOT/examples/vas/grid as an example.