2 # SPDX-License-Identifier: GPL-2.0
5 # This file is part of Lustre, http://www.lustre.org/
7 # lustre/tests/llmount.sh
9 # Create a simple lustre filesystem and client for
15 Usage: ${0##*/} [options]
16 Helper for creating, formatting, and mounting a simple lustre filesystem.
17 -S, --server-only Do not setup up a client
18 -n, --no-format Do not reformat the test filesystem
19 -s, --skip-setup Do not setup the test filesystem
20 -l, --load-modules Load the lustre modules
24 See lustre/tests/cfg/local.sh to see more variables.
25 FSTYPE ldiskfs,zfs Type of backing filesystem
26 MDSCOUNT number Number of MDS
27 OSSCOUNT number Number of OSS
28 MOUNTOPT string Options passed to client mount command
31 Create a simple lustre filesystem.
33 ./llmount.sh --server-only
35 Create a ZFS backed lustre filesystem with a client.
37 FSTYPE=zfs ./llmount.sh
45 # Replace long option with corresponding short option
49 --server-only) set -- "$@" '-S';;
50 --no-format) set -- "$@" '-n';;
51 --skip-setup) set -- "$@" '-s';;
52 --load-modules) set -- "$@" '-l';;
53 --help) set -- "$@" '-h';;
54 *) set -- "$@" "$arg";;
58 while getopts "Snslh" opt
61 S) setup_client=false;;
69 LUSTRE=${LUSTRE:-$(dirname "$0")/..}
70 . "$LUSTRE/tests/test-framework.sh"
73 [ -n "$LOAD" ] && load_modules && exit 0
74 [ -z "$NOFORMAT" ] && formatall
76 if $setup_client; then
77 [ -z "$NOSETUP" ] && setupall
79 [ -z "$NOSETUP" ] && setupall server_only