ablog

不器用で落着きのない技術者のメモ

NFS のバージョンを確認する方法

準備

% vi /etc/exports
/tmp	localhost(rw)
% service portmap start
% service nfs start
% service nfslock start
% mkdir -p /home/yoheia/tmp
% mount -t nfs localhost:/tmp /home/yoheia/tmp

NFS のバージョンを確認する

% nfsstat -m
/home/yoheia/tmp from localhost:/tmp
 Flags: rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=localhost

「vers=3」ってなってますね。

% ps -ef|grep nfs
root      5930    11  0 09:52 ?        00:00:00 [nfsd4]
root      5931     1  0 09:52 ?        00:00:00 [nfsd]
root      5932     1  0 09:52 ?        00:00:00 [nfsd]
root      5933     1  0 09:52 ?        00:00:00 [nfsd]
root      5934     1  0 09:52 ?        00:00:00 [nfsd]
root      5935     1  0 09:52 ?        00:00:00 [nfsd]
root      5936     1  0 09:52 ?        00:00:00 [nfsd]
root      5937     1  0 09:52 ?        00:00:00 [nfsd]
root      5938     1  0 09:52 ?        00:00:00 [nfsd]
root      5982    11  0 09:52 ?        00:00:00 [nfsiod]
root      6534  4376  0 10:08 pts/0    00:00:00 grep nfs

ps でも出てますね。

% rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp   1017  status
    100024    1   tcp   1020  status
    100011    1   udp   1016  rquotad
    100011    2   udp   1016  rquotad
    100011    1   tcp   1021  rquotad
    100011    2   tcp   1021  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100021    1   udp  37426  nlockmgr
    100021    3   udp  37426  nlockmgr
    100021    4   udp  37426  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   tcp  58100  nlockmgr
    100021    3   tcp  58100  nlockmgr
    100021    4   tcp  58100  nlockmgr
    100005    1   udp    605  mountd
    100005    1   tcp    608  mountd
    100005    2   udp    605  mountd
    100005    2   tcp    608  mountd
    100005    3   udp    605  mountd
    100005    3   tcp    608  mountd

こんなんも出るんですね。