From: behlendo Date: Wed, 26 Jun 2002 22:09:28 +0000 (+0000) Subject: Another slightly less rough cut at XML based configuration. There X-Git-Tag: 0.4.2~35 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=08eb06196ee224d44cbfb6b755065efb71b1404d;p=fs%2Flustre-release.git Another slightly less rough cut at XML based configuration. There is still a large reliance on the existing scripts for loopback support, portals config, and module loading. I'll try and resolve some of these things after some consultation about what the best way to do that is. - Several minor changes were made to the DTD, we're still not validating against it but it should be consistent with the example. - Simple code added for ldlm, mds, obd, ost, osc, and mdc configuration. - Other misc support and fixes. A local filesystem should be mountable with the net-local.xml config: ~/tests/llxmlsetup.sh net-local.xml --- diff --git a/lustre/tests/llxmlsetup.sh b/lustre/tests/llxmlsetup.sh new file mode 100755 index 0000000..4076445 --- /dev/null +++ b/lustre/tests/llxmlsetup.sh @@ -0,0 +1,35 @@ +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" + diff --git a/lustre/tests/net-local.xml b/lustre/tests/net-local.xml new file mode 100644 index 0000000..9d08af5 --- /dev/null +++ b/lustre/tests/net-local.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + extN + /dev/loop0 + + + + + + extN + /dev/loop1 + no + + + + + + + + + + localhost + 1234 + + + + + + localhost + 1234 + + + + + /mnt/lustre + dev + + + diff --git a/lustre/utils/lustre.dtd b/lustre/utils/lustre.dtd index ba4af32..d76dc27 100644 --- a/lustre/utils/lustre.dtd +++ b/lustre/utils/lustre.dtd @@ -11,12 +11,15 @@ - + + + + @@ -30,6 +33,9 @@ + + + @@ -38,18 +44,19 @@ - + - + + + diff --git a/lustre/utils/parser.h b/lustre/utils/parser.h index 036a651..65dedaa 100644 --- a/lustre/utils/parser.h +++ b/lustre/utils/parser.h @@ -17,6 +17,12 @@ typedef struct argcmd { 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 */