Whamcloud - gitweb
lllocalmount: startup and mount a lustre lite FS with no networking
authorbraam <braam>
Fri, 1 Feb 2002 18:20:06 +0000 (18:20 +0000)
committerbraam <braam>
Fri, 1 Feb 2002 18:20:06 +0000 (18:20 +0000)
llmountcleanup: indeed.

lustre/tests/lllocalmount.sh [new file with mode: 0755]
lustre/tests/llmountcleanup.sh [new file with mode: 0755]

diff --git a/lustre/tests/lllocalmount.sh b/lustre/tests/lllocalmount.sh
new file mode 100755 (executable)
index 0000000..70b5400
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+R=/r
+
+mknod /dev/portals c 10 240
+
+insmod $R/usr/src/portals/linux/oslib/portals.o
+insmod $R/usr/src/portals/linux/socknal/ksocknal.o
+
+$R/usr/src/portals/linux/utils/acceptor 1234 &
+
+insmod $R/usr/src/obd/rpc/ptlrpc.o
+insmod $R/usr/src/obd/class/obdclass.o 
+insmod $R/usr/src/obd/ext2obd/obdext2.o
+insmod $R/usr/src/obd/ost/ost.o
+insmod $R/usr/src/obd/osc/osc.o
+insmod $R/usr/src/obd/mds/mds.o
+insmod $R/usr/src/obd/mdc/mdc.o
+insmod $R/usr/src/obd/llight/llight.o
+
+dd if=/dev/zero of=/tmp/ost bs=1024 count=10000
+mke2fs -b 4096 -F /tmp/ost
+losetup /dev/loop/0 /tmp/ost
+
+dd if=/dev/zero of=/tmp/mds bs=1024 count=10000
+mke2fs -b 4096 -F /tmp/mds
+losetup /dev/loop/1 /tmp/mds
+
+mknod /dev/obd c 10 241
+
+$R/usr/src/obd/utils/obdctl <<EOF
+device 0
+attach mds
+setup /dev/loop/1 ext2
+device 1
+attach obdext2
+setup /dev/loop/0
+device 2
+attach ost
+setup 1
+device 3
+attach osc
+setup 2
+quit
+EOF
+
+mkdir /mnt/obd
+# mount -t lustre_light -o device=3 none /mnt/obd
diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh
new file mode 100755 (executable)
index 0000000..264519d
--- /dev/null
@@ -0,0 +1,33 @@
+umount /mnt/obd
+
+rmmod llight
+rmmod mdc
+/usr/src/obd/utils/obdctl <<EOF
+device 3
+cleanup
+detach
+device 2
+cleanup
+detach
+device 1
+cleanup
+detach
+device 0
+cleanup
+detach
+quit
+EOF
+rmmod mds
+rmmod osc
+rmmod ost
+rmmod obdext2
+rmmod obdclass
+rmmod ptlrpc
+/usr/src/portals/linux/utils/ptlctl <<EOF
+setup tcp localhost 1234
+disconnect self
+disconnect mds
+EOF
+rmmod ksocknal
+killall acceptor
+rmmod portals