Professional Documents
Culture Documents
NFS Commands
NFS Commands
=====================
[root@HOSTA bin]# chkconfig --list nfs
nfs
0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@HOSTA bin]# chkconfig nfs on
[root@HOSTA bin]# chkconfig --list nfs
nfs
0:off 1:off 2:on
3:on
4:on
5:on
6:off
[root@HOSTA bin]# who
root
tty1
2014-09-11 00:20 (:0)
root
pts/0
2014-09-11 01:46 (:0.0)
[root@HOSTA bin]# who -r
run-level 5 2014-09-11 00:18
[root@HOSTA bin]# cd /
[root@HOSTA /]# pwd
/
[root@HOSTA /]# mkdir HA
[root@HOSTA /]# cd HA/
[root@HOSTA HA]# mkdir qmgrs
[root@HOSTA HA]# mkdir log
[root@HOSTA HA]# ls
log qmgrs
[root@HOSTA HA]# cd ..
[root@HOSTA /]# pwd
/
[root@HOSTA /]# chown -R mqm:mqm /HA
[root@HOSTA /]# chmod -R ug+rwx /HA
[root@HOSTA /]# /etc/init.d/nfs status
rpc.svcgssd is stopped
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
[root@HOSTA /]# /etc/init.d/nfs start
Starting NFS services:
[ OK ]
Starting NFS quotas:
[ OK ]
Starting NFS mountd:
[ OK ]
Starting NFS daemon:
[ OK ]
Starting RPC idmapd:
[ OK ]
[root@HOSTA /]# /etc/init.d/nfs status
rpc.svcgssd is stopped
rpc.mountd (pid 3715) is running...
nfsd (pid 3730 3729 3728 3727 3726 3725 3724 3723) is running...
rpc.rquotad (pid 3711) is running...
[root@HOSTA /]# showmount -e
Export list for HOSTA:
/HA *
[root@HOSTA /]# cd /
[root@HOSTA /]# pwd
/
[root@HOSTA /]#
=======
NOW IN HOST B
=====================
@HOSTB /]# mkdir HA
AGAIN ON HOST A
======================
[root@HOSTA /]# crtmqm -ld /HA/log -md /HA/qmgrs -q HQM
WebSphere MQ queue manager created.
Directory '/HA/qmgrs/HQM' created.
Creating or replacing default objects for HQM.
Default objects statistics : 65 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
[root@HOSTA /]# dspmq
QMNAME(QM1)
STATUS(Ended unexpecte
dly)
QMNAME(QM3)
STATUS(Ended unexpecte
dly)
QMNAME(QM)
STATUS(Running)
QMNAME(HQM)
STATUS(Ended immediate
ly)
[root@HOSTA /]#
[root@HOSTA /]# dspmqinf -o command HQM
addmqinf -s QueueManager -v Name=HQM -v Directory=HQM -v Prefix=/var/mqm -v Data
Path=/HA/qmgrs/HQM
[root@HOSTA /]#
AGAIN ON HOST B
===================
[root@HOSTB HA]# addmqinf -s QueueManager -v Name=HQM -v Directory=HQM -v Prefix
=/var/mqm -v DataPath=/HA/qmgrs/HQM
WebSphere MQ configuration information added.
[root@HOSTB HA]#
============================
COMMANDS TO STOP AND START MULTI INSTANCES
==============================
[root@HOSTA /]# dspmq
QMNAME(QM1)
STATUS(Ended unexpecte
dly)
QMNAME(QM3)
STATUS(Ended unexpecte
dly)
QMNAME(QM)
STATUS(Running)
QMNAME(HQM)
STATUS(Running)
[root@HOSTA /]# endmqm -is HQM
WebSphere MQ queue manager 'HQM' ending.
WebSphere MQ queue manager 'HQM' ended, permitting switchover to a standby
instance.
[root@HOSTA /]# dspmq
QMNAME(QM1)
STATUS(Ended unexpecte
dly)
QMNAME(QM3)
STATUS(Ended unexpecte
dly)
QMNAME(QM)
STATUS(Running)
QMNAME(HQM)
STATUS(Running elsewhe
re)
[root@HOSTA /]# strmqm -x HQM
WebSphere MQ queue manager 'HQM' starting.
A standby instance of queue manager 'HQM' has been started. The active instance
is running elsewhere.
[root@HOSTA /]# dspmq
QMNAME(QM1)
STATUS(Ended unexpecte
dly)
QMNAME(QM3)
STATUS(Ended unexpecte
dly)
QMNAME(QM)
STATUS(Running)
QMNAME(HQM)
STATUS(Running as stan
dby)
[root@HOSTA /]#
QMNAME(QM)
STATUS(Ended unexpecte
dly)
QMNAME(HQM)
STATUS(Running elsewhe
re)
[root@HOSTB HA]# strmqm -x HQM
WebSphere MQ queue manager 'HQM' starting.
A standby instance of queue manager 'HQM' has been started. The active instance
is running elsewhere.
[root@HOSTB HA]# dspmq
QMNAME(QM2)
STATUS(Ended unexpecte
dly)
QMNAME(QM4)
STATUS(Ended unexpecte
dly)
QMNAME(QM)
STATUS(Ended unexpecte
dly)
QMNAME(HQM)
STATUS(Running)
[root@HOSTB HA]#