From: <m-k...@us...> - 2013-09-24 08:35:09
|
Revision: 8665 http://gfarm.svn.sourceforge.net/gfarm/?rev=8665&view=rev Author: m-kasahr Date: 2013-09-24 08:35:02 +0000 (Tue, 24 Sep 2013) Log Message: ----------- 'gfservice' ('gfservice-agent' exactly) executes 'mount.gfarm2fs' and 'umount.gfarm2fs' commands to mount/unmount a Gfarm2 filesystem. Modified Paths: -------------- gfarm_v2/trunk/doc/docbook/en/ref/man5/gfservice.conf.5.docbook gfarm_v2/trunk/doc/docbook/ja/ref/man5/gfservice.conf.5.docbook gfarm_v2/trunk/util/gfservice/gfservice-agent.in gfarm_v2/trunk/util/gfservice/gfservice.in Modified: gfarm_v2/trunk/doc/docbook/en/ref/man5/gfservice.conf.5.docbook =================================================================== --- gfarm_v2/trunk/doc/docbook/en/ref/man5/gfservice.conf.5.docbook 2013-09-24 08:31:46 UTC (rev 8664) +++ gfarm_v2/trunk/doc/docbook/en/ref/man5/gfservice.conf.5.docbook 2013-09-24 08:35:02 UTC (rev 8665) @@ -379,18 +379,34 @@ </varlistentry> <varlistentry> -<term><varname>client<replaceable>n</replaceable>_GFARM2FS</varname></term> +<term><varname>client<replaceable>n</replaceable>_MOUNT_GFARM2FS</varname></term> <listitem> <para> -Specify a path to <command moreinfo="none">gfarm2fs</command> command and its options. -The variable is used when <command moreinfo="none">gfservice</command> executes -<command moreinfo="none">gfarm2fs</command> command to mount a file system. -The default value is "%%BINDIR%%/gfarm2fs". +Specify a path to <command moreinfo="none">mount.gfarm2fs</command> command +and its options. +The variable is used when <command moreinfo="none">gfservice</command> +executes <command moreinfo="none">mount.gfarm2fs</command> command to +mount a file system. +The default value is "%%BINDIR%%/mount.gfarm2fs". </para> </listitem> </varlistentry> <varlistentry> +<term><varname>client<replaceable>n</replaceable>_UMOUNT_GFARM2FS</varname></term> +<listitem> +<para> +Specify a path to <command moreinfo="none">umount.gfarm2fs</command> command +and its options. +The variable is used when <command moreinfo="none">gfservice</command> +executes <command moreinfo="none">umount.gfarm2fs</command> command to +unmount a file system. +The default value is "%%BINDIR%%/umount.gfarm2fs". +</para> +</listitem> +</varlistentry> + +<varlistentry> <term><varname>client<replaceable>n</replaceable>_SSH</varname></term> <listitem> <para> Modified: gfarm_v2/trunk/doc/docbook/ja/ref/man5/gfservice.conf.5.docbook =================================================================== --- gfarm_v2/trunk/doc/docbook/ja/ref/man5/gfservice.conf.5.docbook 2013-09-24 08:31:46 UTC (rev 8664) +++ gfarm_v2/trunk/doc/docbook/ja/ref/man5/gfservice.conf.5.docbook 2013-09-24 08:35:02 UTC (rev 8665) @@ -380,18 +380,34 @@ </varlistentry> <varlistentry> -<term><varname>client<replaceable>n</replaceable>_GFARM2FS</varname></term> +<term><varname>client<replaceable>n</replaceable>_MOUNT_GFARM2FS</varname></term> <listitem> <para> -<command moreinfo="none">gfarm2fs</command> コマンドのパスおよびオプションを指定します。 -<command moreinfo="none">gfservice</command> がクライアントホスト上で gfarm2fs コマンド -を実行してファイルシステムをマウントする際、この変数が利用されます。 -デフォルトは「%%BINDIR%%/gfarm2fs」です。 +<command moreinfo="none">mount.gfarm2fs</command> コマンドのパスおよび +オプションを指定します。 +<command moreinfo="none">gfservice</command> がクライアントホスト上で +<command>mount.gfarm2fs</command> コマンドを実行してファイルシステムを +マウントする際、この変数が利用されます。 +デフォルトは「%%BINDIR%%/mount.gfarm2fs」です。 </para> </listitem> </varlistentry> <varlistentry> +<term><varname>client<replaceable>n</replaceable>_UMOUNT_GFARM2FS</varname></term> +<listitem> +<para> +<command moreinfo="none">umount.gfarm2fs</command> コマンドのパスおよび +オプションを指定します。 +<command moreinfo="none">gfservice</command> がクライアントホスト上で +<command>umount.gfarm2fs</command> コマンドを実行してファイルシステムを +アンマウントする際、この変数が利用されます。 +デフォルトは「%%BINDIR%%/umount.gfarm2fs」です。 +</para> +</listitem> +</varlistentry> + +<varlistentry> <term><varname>client<replaceable>n</replaceable>_SSH</varname></term> <listitem> <para> Modified: gfarm_v2/trunk/util/gfservice/gfservice-agent.in =================================================================== --- gfarm_v2/trunk/util/gfservice/gfservice-agent.in 2013-09-24 08:31:46 UTC (rev 8664) +++ gfarm_v2/trunk/util/gfservice/gfservice-agent.in 2013-09-24 08:35:02 UTC (rev 8665) @@ -782,14 +782,17 @@ { log_debug "subcmd_mount" - GFARM2FS=`get_param gfarm2fs` + MOUNT_GFARM2FS=`get_param mount-gfarm2fs` + [ "X$MOUNT_GFARM2FS" = X ] && MOUNT_GFARM2FS="mount.gfarm2fs" DIRECTORY=`get_param directory` || { log_error "missing mandatory argument 'directory'" } log_debug "subcmd_mount: directory=$DIRECTORY" OPTIONS=`get_param options || echo ''` log_debug "subcmd_mount: options=$OPTIONS" - GFARM_CONFIG_FILE=$GFARM_CONF $GFARM2FS $DIRECTORY $OPTIONS + log_debug "subcmd_mount:" \ + "execute $MOUNT_GFARM2FS $GFARM_CONF $DIRECTORY $OPTIONS" + $MOUNT_GFARM2FS $GFARM_CONF $DIRECTORY $OPTIONS [ $? -ne 0 ] && log_error "failed to mount Gfarm2 filesystem" log_debug "end subcmd_mount" @@ -803,11 +806,14 @@ { log_debug "subcmd_unmount" + UMOUNT_GFARM2FS=`get_param umount-gfarm2fs` + [ "X$UMOUNT_GFARM2FS" = X ] && UMOUNT_GFARM2FS="umount.gfarm2fs" DIRECTORY=`get_param directory` || { log_error "missing mandatory argument 'directory'" } log_debug "subcmd_unmount: directory=$DIRECTORY" - fusermount -u $DIRECTORY + log_debug "subcmd_mount: execute $UMOUNT_GFARM2FS $DIRECTORY" + $UMOUNT_GFARM2FS $DIRECTORY [ $? -ne 0 ] && log_error "failed to unmount Gfarm2 filesystem" log_debug "end subcmd_unmount" Modified: gfarm_v2/trunk/util/gfservice/gfservice.in =================================================================== --- gfarm_v2/trunk/util/gfservice/gfservice.in 2013-09-24 08:31:46 UTC (rev 8664) +++ gfarm_v2/trunk/util/gfservice/gfservice.in 2013-09-24 08:35:02 UTC (rev 8665) @@ -13,7 +13,8 @@ DEFAULT_CONF="$HOME/.gfservice" DEFAULT_SUDO=sudo DEFAULT_SSH=ssh -DEFAULT_GFARM2FS="@bindir@/gfarm2fs" +DEFAULT_MOUNT_GFARM2FS="@bindir@/mount.gfarm2fs" +DEFAULT_UMOUNT_GFARM2FS="@bindir@/umount.gfarm2fs" DEFAULT_GFARM_CONF="@sysconfdir@/gfarm2.conf" # Myself, used for execute 'gfservice' as a child. @@ -202,33 +203,52 @@ } # -# Get 'gfarm2fs' command corresponding with a host ID. +# Get 'mount.gfarm2fs' command corresponding with a host ID. # -get_gfarm2fs() +get_mount_gfarm2fs() { - log_debug "get_gfarm2fs: HOSTID=$1" + log_debug "get_mount_gfarm2fs: HOSTID=$1" - GFARM2FS=`eval echo \\$$1_GFARM2FS` - GFARM2FS_BIN_PATH=`eval echo \\$$1_GFARM2FS_BIN_PATH` + MOUNT_GFARM2FS=`eval echo \\$$1_MOUNT_GFARM2FS` - if [ "X$GFARM2FS" != X ]; then - echo $GFARM2FS - log_debug "get_gfarm2fs: GFARM2FS=$GFARM2FS" - elif [ "X$GFARM2FS_BIN_PATH" != X ]; then - echo $GFARM2FS_BIN_PATH/gfarm2fs - log_warn "Use '${HOSTID}_GFARM2FS' instead of" \ - "'${HOSTID}_GFARM2FS_BIN_PATH'" - log_debug "get_gfarm2fs: GFARM2FS=$GFARM2FS_BIN_PATH/gfarm2fs" + if [ "X$MOUNT_GFARM2FS" != X ]; then + echo $MOUNT_GFARM2FS + log_debug "get_mount_gfarm2fs:" \ + "MOUNT_GFARM2FS=$MOUNT_GFARM2FS" else - echo $DEFAULT_GFARM2FS - log_debug "get_gfarm2fs: GFARM2FS=$DEFAULT_GFARM2FS" + echo $DEFAULT_MOUNT_GFARM2FS + log_debug "get_mount_gfarm2fs:" \ + "MOUNT_GFARM2FS=$DEFAULT_MOUNT_GFARM2FS" fi - log_debug "end get_gfarm2fs" + log_debug "end get_mount_gfarm2fs" return 0 } # +# Get 'umount.gfarm2fs' command corresponding with a host ID. +# +get_umount_gfarm2fs() +{ + log_debug "get_umount_gfarm2fs: HOSTID=$1" + + UMOUNT_GFARM2FS=`eval echo \\$$1_UMOUNT_GFARM2FS` + + if [ "X$UMOUNT_GFARM2FS" != X ]; then + echo $UMOUNT_GFARM2FS + log_debug "get_umount_gfarm2fs:" \ + "UMOUNT_GFARM2FS=$MOUNT_GFARM2FS" + else + echo $DEFAULT_UMOUNT_GFARM2FS + log_debug "get_umount_gfarm2fs:" \ + "UMOUNT_GFARM2FS=$DEFAULT_UMOUNT_GFARM2FS" + fi + + log_debug "end get_umount_gfarm2fs" + return 0 +} + +# # Get options to 'config-gfarm' corresponding with a host ID. # get_config_gfarm_options() @@ -1797,7 +1817,7 @@ check_hostid any $HOSTID DIR="$1" shift - GFARM2FS=`get_gfarm2fs $HOSTID` + MOUNT_GFARM2FS=`get_mount_gfarm2fs $HOSTID` OPTIONS= for I in "$@"; do if [ "X$OPTIONS" = X ]; then @@ -1807,7 +1827,7 @@ fi done exec_remote_host_agent $HOSTID - mount "directory=$DIR" \ - "gfarm2fs=$GFARM2FS" "options=$OPTIONS" + "mount-gfarm2fs=$MOUNT_GFARM2FS" "options=$OPTIONS" [ $? -ne 0 ] && log_error "gfservice-agent mount failed" log_debug "end subcmd_mount" @@ -1822,7 +1842,9 @@ check_argc $# 1 check_hostid any $HOSTID - exec_remote_host_agent $HOSTID - unmount "directory=$1" + UMOUNT_GFARM2FS=`get_umount_gfarm2fs $HOSTID` + exec_remote_host_agent $HOSTID - unmount "directory=$1" \ + "umount-gfarm2fs=$UMOUNT_GFARM2FS" [ $? -ne 0 ] && log_error "gfservice-agent unmount failed" log_debug "end subcmd_unmount" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |