|
||||||||||||||||||||
|
|
3. Playing AroundBring up a three node cluster with ssi-start. Log in to all three consoles as root. The initial password is root, but you'll be forced to change it the first time you log in. The following demos should familiarize you with what an SSI cluster can do. 3.1. Process Movement, Inheriting Open Files and DevicesStart dbdemo on node 1.
The dbdemo program "processes" records from the file given as an argument. In this case, it's alphabet, which contains the ICAO alphabet used by aviators. For each record, dbdemo writes the data to its terminal device and spins in a busy loop for a second to simulate an intensive calculation. The dbdemo program is also listening on its terminal device for certain command keys. Table 1. Command Keys for dbdemo
Move dbdemo to different nodes. Note that it continues to send output to the console where it was started, and that it continues to respond to keypresses from that console. This demonstrates that although the process is running on another node, it can remotely read and write the device it had open. Also note that when a process moves, it preserves its file offsets. After moving, dbdemo continues processing records from alphabet as if nothing had happened. To confirm that the process moved to a new node, get its PID and use where_pid. You can do this on any node.
If you like, you can download the source for dbdemo. It's also available as a tarball in the /root/dbdemo directory. 3.2. Clusterwide PIDs, Distributed Process Relationships and Access, Clusterwide Job Control and Single RootFrom node 1's console, start up vi on node 2. The onnode command uses the SSI kernel's rexec system call to remotely execute vi.
Confirm that it's on node 2 with where_pid. You need to get its PID first.
Type some text and save your work. On node 3, cat the file to see the contents. This demonstrates the single root file system.
From node 3, kill the vi session running on node 2. You should see control of node 1's console given back to the shell.
3.3. Clusterwide FIFOsMake a FIFO on the shared root.
echo something into the FIFO on node 1.
cat the FIFO on node 2.
This demostrates that FIFOs are clusterwide and remotely accessible. 3.4. Clusterwide Device Naming and AccessOn node 3, write "Hello World" to the console of node 1.
This shows that devices can be remotely accessed from anywhere in the cluster. Eventually, the node-specific subdirectories of /devfs will be merged together into a single device tree that can be mounted on /dev without confusing non-cluster aware applications. | |||||||||||||||||||
|
||||||||||||||||||||