在master01节点添加:
[root@master01 conf]# pwd
/share01/app/lsf/conf
[root@master01 conf]# ls
cshrc.lsf lsf.cluster.nju_cluster1 lsf.shared perl.lsf
ego lsf.conf lsf.shared.old profile.lsf
lsbatch lsf.entitlement lsf.task resource_connector
[root@master01 conf]# vi lsf.cluster.nju_cluster1
# $Revision$Date$
#-----------------------------------------------------------------------
# Copyright IBM Corp. 1992, 2016. All rights reserved.
#
# After editing this file, run "lsadmin reconfig" and
# "badmin mbdrestart" to apply your changes.
#
# T H I S I S A O N E P E R C L U S T E R F I L E
#
# This is a sample cluster definition file. There is a cluster
# definition file for each cluster. This file's name should be
# lsf.cluster.<cluster-name>.
# See lsf.cluster(5) and the "Administering IBM Spectrum LSF".
#
Begin ClusterAdmins
Administrators = lsfadmin
End ClusterAdmins
Begin Host
HOSTNAME model type server RESOURCES #Keywords
#apple Sparc5S SUNSOL 1 (sparc bsd) #Example
#peach DEC3100 DigitalUNIX 1 (alpha osf1)
#banana HP9K778 HPPA 1 (hp68k hpux)
#mango HP735 HPPA 1 (hpux cs)
#grape SGI4D35 SGI5 1 (irix)
#lemon PC200 LINUX 1 (linux)
#pear IBM350 IBMAIX4 1 (aix cs)
#plum PENT_100 NTX86 1 (nt)
#berry DEC3100 ! 1 (ultrix fs bsd mips dec)
#orange ! SUNSOL 1 (sparc bsd) #Example
#prune ! ! 1 (convex)
master01 ! ! 1 (mg)
node02 ! ! 1 (linux)
End Host
Begin Parameters
# LSF_HOST_ADDR_RANGE=*.*.*.*
# FLOAT_CLIENTS_ADDR_RANGE=*.*.*.*
# FLOAT_CLIENTS=10
End Parameters
# Begin ResourceMap
# RESOURCENAME LOCATION
# tmp2 [default]
# nio [all]
# console [default]
# osname [default]
# osver [default]
# cpuarch [default]
# cpuspeed [default]
# bandwidth [default]
# availcpufreqs [default]
# currcpufreqs [default]
# End ResourceMap
[root@master01 conf]# lsadmin reconfig #让配置生效
client 服务器操作:
[root@node02 conf]# lsf_daemons start
[root@node02 conf]# lsf_daemons status
Show status of the LSF subsystem
lim (pid 13094) is running...
res (pid 13096) is running...
sbatchd (pid 13098) is running...
[root@node02 conf]# bhosts
Failed in an LSF library call: Slave LIM configuration is not ready yet
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 closed - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 closed - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 closed - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 closed - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 unavail - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 unavail - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 unavail - 24 0 0 0 0 0
[root@node02 conf]# bhosts
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
master01 ok - 4 0 0 0 0 0
node02 ok - 24 0 0 0 0 0
注:
[root@master01 init.d]# which lsf_daemons #查看绝对路径
/share01/app/lsf/10.1/linux3.10-glibc2.17-x86_64/etc/lsf_daemons
[root@master01 init.d]# psh all "/share01/app/lsf/10.1/linux3.10-glibc2.17-x86_64/etc/lsf_daemons restart"