From: brian Date: Thu, 15 Jun 2006 19:40:43 +0000 (+0000) Subject: Quick hack to be able to define the options in the /etc/fstab for the lustre X-Git-Tag: v1_7_100~1^90~8^2~121 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=455520d7e32057d98f7685e84eabbe866985fc51;p=fs%2Flustre-release.git Quick hack to be able to define the options in the /etc/fstab for the lustre filesystem added. Probably some logic could be added in get_mntopts to detect the failover option and only add noauto if it was not added by the command line argument. --- diff --git a/lustre/scripts/lustre_config.sh b/lustre/scripts/lustre_config.sh index bfaf21b..71a29c5 100755 --- a/lustre/scripts/lustre_config.sh +++ b/lustre/scripts/lustre_config.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: + # # lustre_config.sh - format and set up multiple lustre servers from a csv file # @@ -16,7 +19,7 @@ usage() { cat >&2 < +Usage: `basename $0` [-t HAtype] [-n] [-f] [-m ] [ -d opts ] [-h] [-v] This script is used to format and set up multiple lustre servers from a csv file. @@ -32,6 +35,10 @@ Usage: `basename $0` [-t HAtype] [-n] [-f] [-m] [-h] [-v] hostnames in the cluster -f force-format the Lustre targets using --reformat option -m modify /etc/fstab to add the new Lustre targets + -d opts list of options that will be put into the mount options field + of /etc/fstab (if you specify this option and you are using a + failover configuration you should include "noauto" in here in + addition to any other options you specify) -v verbose mode csv file a spreadsheet that contains configuration parameters (separated by commas) for each target in a Lustre cl- @@ -211,6 +218,9 @@ while getopts "t:nfmhv" OPTION; do m) MODIFY_FSTAB=true ;; + f) + FSTAB_OPTIONS="$OPTARG" + ;; h) sample ;; @@ -1147,7 +1157,11 @@ get_mntopts() { local mnt_opts= local ret_str - [ -n "${failovers}" ] && mnt_opts=defaults,noauto || mnt_opts=defaults + if [ -n "FSTAB_OPTIONS" ]; then + mnt_opts="$FSTAB_OPTIONS" + else + [ -n "${failovers}" ] && mnt_opts=defaults,noauto || mnt_opts=defaults + fi # Execute remote command to check whether the device # is a block device or not