--- /dev/null
+SRCDIR="`dirname $0`/"
+. $SRCDIR/common.sh
+
+# Setup the portals and lustre RPC bits. For now
+# that means we need to set 4 additional variables
+# here for ptlctl to use during its config. There
+# should be some XML aware solution soon. Also
+# the code to load only the nessisary modules
+# should go in to obdctl.
+
+NETWORK=tcp
+LOCALHOST=localhost
+SERVER=localhost
+PORT=1234
+
+setup_portals || exit $?
+setup_lustre || exit $?
+
+# Loopback devices are still only supported in the
+# scripts so we're borrowing that functionality.
+new_fs ext3 /tmp/mds 25000
+new_fs ext3 /tmp/ost 10000
+
+# Configure the node based on the XML provided.
+$OBDCTL --xml $1 || exit $?
+
+export DEBUG_WAIT=no
+
+# The mountpoint information in the XML is currently
+# neglected so this needs to be done here.
+
+echo
+echo "To mount the filesystem:"
+echo "mount -t lustre_lite -o ost=`$OBDCTL name2dev OSCDEV`,mds=`$OBDCTL name2dev MDCDEV` none /mnt/lustre"
+
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE lustre SYSTEM "lustre.dtd">
+
+<lustre>
+ <node id="local" uuid="local-UUID">
+ <profile_id num="1" id="local-profile" uuid="local-profile-UUID"></profile_id>
+ </node>
+
+ <profile id="local-profile" uuid="local-profile-UUID">
+ <service_id num="1" id="ldlm-srv" uuid="ldlm-srv-UUID"></service_id>
+ <service_id num="2" id="mds-srv" uuid="mds-srv-UUID"></service_id>
+ <service_id num="3" id="obd-srv" uuid="obd-srv-UUID"></service_id>
+ <service_id num="4" id="ost-srv" uuid="ost-srv-UUID"></service_id>
+ <service_id num="5" id="osc-srv" uuid="osc-srv-UUID"></service_id>
+ <service_id num="6" id="mdc-srv" uuid="mdc-srv-UUID"></service_id>
+ <mountpoint_id num="1" id="lustre-mnt" uuid="lustre-mnt-UUID"></mountpoint_id>
+ </profile>
+
+ <ldlm id="ldlm-srv" uuid="ldlm-srv-UUID"></ldlm>
+
+ <mds id="mds-srv" uuid="mds-srv-UUID">
+ <fstype>extN</fstype>
+ <device>/dev/loop0</device>
+ <server_id num="1" id="local" uuid="local-UUID"></server_id>
+ <failover_id num="1" id="local" uuid="local-UUID"></failover_id>
+ </mds>
+
+ <obd id="obd-srv" uuid="obd-srv-UUID" type="obdfilter">
+ <fstype>extN</fstype>
+ <device>/dev/loop1</device>
+ <autoformat>no</autoformat>
+ </obd>
+
+ <ost id="ost-srv" uuid="ost-srv-UUID">
+ <server_id num="1" id="local" uuid="local-UUID"></server_id>
+ <failover_id num="1" id="local" uuid="local-UUID"></failover_id>
+ </ost>
+
+ <osc id="osc-srv" uuid="osc-srv-UUID">
+ <network type="tcp">
+ <server>localhost</server>
+ <port>1234</port>
+ </network>
+ </osc>
+
+ <mdc id="mdc-srv" uuid="mdc-srv-UUID">
+ <network type="tcp">
+ <server>localhost</server>
+ <port>1234</port>
+ </network>
+ </mdc>
+
+ <mountpoint id="lustre-mnt" uuid="lustre-mnt-UUID">
+ <path>/mnt/lustre</path>
+ <fileset>dev</fileset>
+ <mds_id num="1" id="mds-srv" uuid="mds-srv-UUID"></mds_id>
+ </mountpoint>
+</lustre>
<!ELEMENT profile (mountpoint_id, service_id)>\r
<!ATTLIST profile id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
\r
-<!ELEMENT mountpoint (mntpt, fileset, mds_id, lov_id)>\r
+<!ELEMENT mountpoint (path, fileset, mds_id, lov_id)>\r
<!ATTLIST mountpoint id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
\r
<!ELEMENT node (profile_id)>\r
<!ATTLIST node id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
\r
+<!ELEMENT ldlm ()*>\r
+<!ATTLIST ldlm id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
+\r
<!ELEMENT mds (fstype | device | server_id | failover_id)*>\r
<!ATTLIST mds id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
\r
<!ELEMENT osc (network)*>\r
<!ATTLIST osc id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
\r
+<!ELEMENT mdc (network)*>\r
+<!ATTLIST mdc id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
+\r
<!ELEMENT lov (osc_id | obd_id | mdc_id)*>\r
<!ATTLIST lov id #CDATA #REQUIRED uuid #CDATA #REQUIRED>\r
\r
\r
<!-- basic elements -->\r
<!ELEMENT network (%basic.content;)*>\r
-<!ATTLIST network type (ip | elan | myrinet) 'ip'\r
- address #CDATA 'localhost'>\r
+<!ATTLIST network type (tcp | elan | myrinet) 'tcp'>\r
\r
<!ELEMENT fstype (%basic.content;)*>\r
<!ELEMENT device (%basic.content;)*>\r
<!ELEMENT server (%basic.content;)*>\r
<!ELEMENT autoformat (%basic.content;)*>\r
-<!ELEMENT mntpt (%basic.content;)*>\r
+<!ELEMENT path (%basic.content;)*>\r
<!ELEMENT fileset (%basic.content;)*>\r
\r
<!ELEMENT profile_id (%basic.content;)*>\r
<!ATTLIST profile_id (%id.content;)* #CDATA #IMPLIED>\r
+<!ELEMENT ldlm_id (%basic.content;)*>\r
+<!ATTLIST ldlm_id (%id.content;)* #CDATA #IMPLIED>\r
<!ELEMENT mds_id (%basic.content;)*>\r
<!ATTLIST mds_id (%id.content;)* #CDATA #IMPLIED>\r
<!ELEMENT obd_id (%basic.content;)*>\r
char *ac_help;
} argcmd_t;
+typedef struct network {
+ char *type;
+ char *server;
+ int port;
+} network_t;
+
int Parser_quit(int argc, char **argv);
void Parser_init(char *, command_t *); /* Set prompt and load command list */
int Parser_commands(void); /* Start the command parser */