[AIX 네트워크 관리 33] NFS (2) RPC·XDR·portmap, NFS 데몬 제어, NFS 버전 4, 유예 기간, DIO·CIO

핵심 정리

  • NFS는 RPC로 구현되고 데이터는 XDR 형식으로 주고받습니다. RPC 서버는 시작할 때 portmap에 프로그램 번호·버전·포트를 등록하고, 클라이언트는 portmap에 물어 포트를 알아냅니다.
  • NFS·NIS 데몬은 SRC로 다룹니다. nfs 그룹: nfsd, biod, rpc.lockd, rpc.statd, rpc.mountd, nfsrgyd, gssd. yp 그룹: ypserv, ypbind, yppasswdd, ypupdated. keyserv, portmap은 각자 그룹. rpc.rexd·rusersd·rwalld·sprayd는 inetd가 띄웁니다.
  • chnfs -n 1000 -b 4로 nfsd·biod 최대 수를 바꾸면 데몬이 다시 시작됩니다(마운트마다 biods=n). 데몬 인수는 chssys -s nfsd -a '10'로 바꾸고 다시 시작해야 적용됩니다. 시작 startsrc -g nfs, 정지 stopsrc -g nfs, 상태 lssrc -a. /etc/exports가 없으면 nfsd와 rpc.mountd가 뜨지 않습니다(빈 파일이면 됨).
  • NFS v4(5.3 이후, RFC 3530): Kerberos V5만 지원(LIPKEY·SPKM-3 없음), UTF-8 검사는 nfso로 끌 수 있고, 디스크 없는 클라이언트·NIM·UDP는 v4에서 지원하지 않습니다. 도메인 간 ID 매핑은 LDAP과 chnfsim. 유예 기간(5300-05 이후)은 기본 꺼짐이며 chnfs로 켭니다.
  • DIO(dio 마운트 옵션, O_DIRECT)는 클라이언트 캐시를 건너뛰고, CIO(cio, O_CIO)는 읽기·쓰기를 동시에 하며 DIO를 포함합니다. CIO가 열려 있으면 보통 open·DIO·매핑은 EINVAL로 실패하고, (6.1 TL4) cior로 읽기 전용 open을 허용합니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 cior 옵션과 CIO·CIOR 상호 작용이 더해짐)
원문 Networks and communication management — 5.3판 394399쪽, 6.1판 500505쪽
파일 /etc/rc.nfs, /etc/exports, /var
관련 명령어 startsrc, stopsrc, lssrc, chnfs, chssys, nfso, chnfsim, mount, nfs4cl

NFS는 매우 다양한 기계 종류, 운영 체제, 네트워크 구조에서 구현됩니다. NFS는 RPC(Remote Procedure Call) 프로토콜로 이 독립성을 얻습니다.

RPC는 프로시저 라이브러리입니다. 이 프로시저로 한 프로세스(클라이언트 프로세스)가 다른 프로세스(서버 프로세스)에 프로시저 호출을, 마치 클라이언트 프로세스가 자기 주소 공간에서 호출을 실행한 것처럼 실행하게 할 수 있습니다. 클라이언트와 서버는 별개의 두 프로세스이므로 같은 물리 시스템에 있을 필요가 없습니다(있을 수도 있습니다).

NFS는 클라이언트가 하는 특정 종류의 호출을 서버가 처리하는 RPC 호출 묶음으로 구현됩니다. 클라이언트는 클라이언트 프로세스가 하는 파일 시스템 작업을 바탕으로 이런 호출을 합니다. 이런 뜻에서 NFS는 RPC 응용 프로그램입니다.

서버와 클라이언트 프로세스는 구조가 완전히 다를 수 있는 서로 다른 두 물리 시스템에 있을 수 있으므로, RPC는 두 시스템이 데이터를 같은 방식으로 나타내지 않을 가능성을 다뤄야 합니다. 그래서 RPC는 XDR(eXternal Data Representation) 프로토콜이 정의한 데이터 형을 씁니다.

영어 원문

Remote Procedure Call Protocol

NFS is implemented on a wide variety of machine types, operating systems, and network architectures. NFS achieves this independence using the Remote Procedure Call (RPC) protocol.

RPC is a library of procedures. The procedures allow one process (the client process) to direct another process (the server process) to run procedure calls as if the client process had run the calls in its own address space. Because the client and the server are two separate processes, they need not exist on the same physical system (although they can).

NFS is implemented as a set of RPC calls in which the server services certain types of calls made by the client. The client makes such calls based on the file system operations that are done by the client process. NFS, in this sense, is an RPC application.

Because the server and client processes can reside on two different physical systems which may have completely different architectures, RPC must address the possibility that the two systems might not represent data in the same way. For this reason, RPC uses data types defined by the eXternal Data Representation (XDR) protocol.

XDR(eXternal Data Representation) 프로토콜

XDR 프로토콜은 여러 데이터 형의 표준 표현에 관한 규격입니다.

표준 데이터 형 표현을 쓰면, 데이터의 출처가 구조가 완전히 다른 기계라도 프로그램은 데이터를 올바르게 해석하고 있다고 확신할 수 있습니다.

실제로 대부분의 프로그램은 내부적으로 XDR을 쓰지 않습니다. 대신 프로그램이 실행되는 컴퓨터의 구조에 고유한 데이터 형 표현을 씁니다. 다른 프로그램과 통신해야 할 때 데이터를 보내기 전에 XDR 형식으로 바꿉니다. 반대로 데이터를 받으면 XDR 형식에서 자기 고유의 데이터 형 표현으로 바꿉니다.

영어 원문

eXternal Data Representation Protocol

The eXternal Data Representation (XDR) protocol is the specification for a standard representation of various data types.

By using a standard data type representation, a program can be confident that it is interpreting data correctly, even if the source of the data is a machine with a completely different architecture.

In practice, most programs do not use XDR internally. Rather, they use the data type representation specific to the architecture of the computer on which the program is running. When the program needs to communicate with another program, it converts its data into XDR format before sending the data. Conversely, when it receives data, it converts the data from XDR format into its own specific data type representation.

portmap 데몬

portmap 데몬은 클라이언트가 프로그램 번호와 버전 번호 쌍을 서버의 포트 번호에 대응시키도록 돕습니다.

각 RPC 응용 프로그램에는 프로그램 번호와 버전 번호가 연결되어 있습니다. 이 번호로 시스템의 서버 응용 프로그램과 통신합니다. 서버에 요청할 때 클라이언트는 서버가 어느 포트 번호에서 요청을 받는지 알아야 합니다. 이 포트 번호는 서비스가 쓰는 UDP나 TCP와 연결되어 있습니다. 클라이언트는 프로그램 번호, 버전 번호, 서비스가 있는 시스템 이름이나 호스트 이름을 압니다. 클라이언트에는 프로그램 번호와 버전 번호 쌍을 서버 응용 프로그램의 포트 번호에 대응시킬 방법이 필요합니다. 이것을 portmap 데몬이 돕습니다.

portmap 데몬은 NFS 응용 프로그램과 같은 시스템에서 실행됩니다. 서버가 실행을 시작하면 portmap 데몬에 등록합니다. 이 등록의 일부로 서버는 자기 프로그램 번호, 버전 번호, UDP나 TCP 포트 번호를 줍니다. portmap 데몬은 서버 응용 프로그램 표를 유지합니다. 클라이언트가 서버에 요청하려 할 때 먼저 portmap 데몬에 연락해 서버가 어느 포트를 쓰는지 알아냅니다. portmap 데몬은 클라이언트가 요청하는 서버의 포트로 클라이언트에 응답합니다. 포트 번호를 받으면 클라이언트는 이후의 모든 요청을 서버 응용 프로그램에 직접 할 수 있습니다.

영어 원문

portmap daemon

The portmap daemon helps clients map program number and version number pairs to the port number of a server.

Each RPC application has associated with it a program number and a version number. These numbers are used to communicate with a server application on a system. When making a request from a server, the client needs to know what port number the server is accepting requests on. This port number is associated with the User Datagram Protocol (UDP) or Transmission Control Protocol (TCP) that is being used by the service. The client knows the program number, the version number, and the system name or host name where the service resides. The client needs a way to map the program number and version number pair to the port number of the server application. This is done with the help of the portmap daemon.

The portmap daemon runs on the same system as the NFS application. When the server starts running, it registers with the portmap daemon. As a function of this registration, the server supplies its program number, version number, and UDP or TCP port number. The portmap daemon keeps a table of server applications. When the client tries to make a request of the server, it first contacts the portmap daemon to find out which port the server is using. The portmap daemon responds to the client with the port of the server that the client is requesting. Upon receipt of the port number, the client is able to make all of its future requests directly to the server application.

NFS 응용 프로그램과 제어

NFS, NIS, NIS+ 데몬은 SRC(System Resource Controller)가 제어합니다.

곧 NFS, NIS, NIS+ 데몬을 시작하고, 멈추고, 상태를 확인하려면 startsrc, stopsrc, lssrc 같은 SRC 명령을 써야 합니다.

일부 NFS 데몬은 SRC가 제어하지 않습니다. 곧 rpc.rexd, rpc.rusersd, rpc.rwalld, rpc.rsprayd는 SRC가 제어하지 않습니다. 이 데몬들은 inetd 데몬이 시작하고 멈춥니다.

다음 표는 SRC가 제어하는 데몬과 그 subsystem 이름입니다.

표 92. 데몬과 subsystem

파일 경로 subsystem 이름 그룹 이름
/usr/sbin/nfsd nfsd nfs
/usr/sbin/biod biod nfs
/usr/sbin/rpc.lockd rpc.lockd nfs
/usr/sbin/rpc.statd rpc.statd nfs
/usr/sbin/rpc.mountd rpc.mountd nfs
/usr/sbin/nfsrgyd nfsrgyd nfs
/usr/sbin/gssd gssd nfs
/usr/lib/netsvc/yp/ypserv ypserv yp
/usr/lib/netsvc/yp/ypbind ypbind yp
/usr/lib/netsvc/rpc.yppasswdd yppasswdd yp
/usr/lib/netsvc/rpc.ypupdated ypupdated yp
/usr/sbin/keyserv keyserv keyserv
/usr/sbin/portmap portmap portmap

NIS+ 데몬은 Network Information Services (NIS and NIS+) Guide에 설명되어 있습니다. 이 데몬들은 각각 subsystem 이름이나 해당 그룹 이름으로 SRC 명령에 지정할 수 있습니다. 이 데몬들은 SRC의 긴 목록 기능도 SRC 추적 명령도 지원하지 않습니다.

SRC 사용에 관한 자세한 정보는 Operating system and device management의 System Resource Controller Overview를 봅니다.

영어 원문

NFS applications and control

The NFS, NIS, and NIS+ daemons are controlled by the System Resource Controller (SRC).

This means you must use SRC commands such as startsrc, stopsrc, and lssrc to start, stop, and check the status of the NFS, NIS, and NIS+ daemons.

Some NFS daemons are not controlled by the SRC; specifically, rpc.rexd, rpc.rusersd, rpc.rwalld, and rpc.rsprayd are not controlled by the SRC. These daemons are started and stopped by the inetd daemon.

The following table lists the SRC-controlled daemons and their subsystem names.

Table 92. Daemons and their subsystems

File path Subsystem name Group name
/usr/sbin/nfsd nfsd nfs
/usr/sbin/biod biod nfs
/usr/sbin/rpc.lockd rpc.lockd nfs
/usr/sbin/rpc.statd rpc.statd nfs
/usr/sbin/rpc.mountd rpc.mountd nfs
/usr/sbin/nfsrgyd nfsrgyd nfs
/usr/sbin/gssd gssd nfs
/usr/lib/netsvc/yp/ypserv ypserv yp
/usr/lib/netsvc/yp/ypbind ypbind yp
/usr/lib/netsvc/rpc.yppasswdd yppasswdd yp
/usr/lib/netsvc/rpc.ypupdated ypupdated yp
/usr/sbin/keyserv keyserv keyserv
/usr/sbin/portmap portmap portmap

NIS+ daemons are described in Network Information Services (NIS and NIS+) Guide. Each of these daemons can be specified to the SRC commands by using their subsystem name or the appropriate group name. These daemons support neither the long-listing facility of SRC nor the SRC trace commands.

For more information on using the SRC, see System Resource Controller Overview in Operating system and device management.

biod와 nfsd 데몬 수 바꾸기

chnfs 명령으로 시스템에서 실행할 biod나 nfsd 데몬의 최대 수를 바꿀 수 있습니다.

예를 들어 nfsd 데몬 최대 수를 1000으로, biod 데몬 최대 수를 4로 설정하려면 다음 명령을 실행합니다.

text
chnfs -n 1000 -b 4

참고: 이 명령은 지금 실행 중인 데몬을 멈추고, SRC 구성 정보를 갱신한 뒤, 데몬을 다시 시작합니다. 그 결과 NFS 서비스를 잠시 쓸 수 없습니다. biod 데몬의 최대 수는 biods=n 마운트 옵션으로 마운트마다 지정할 수도 있습니다.

참고: nfsd 데몬 수가 클라이언트를 서비스하기에 모자라면 클라이언트에 비멱등(nonidempotent) 작업 오류가 돌아옵니다. 예를 들어 클라이언트가 디렉터리를 지우면, 서버의 디렉터리는 지워졌는데도 ENOENT 오류가 돌아옵니다.

영어 원문

Changing the number of biod and nfsd daemons

The chnfs command can be used to change the maximum number of biod or nfsd daemons that will run on a system.

For example, to set the number of maximum nfsd daemons to 1000 and the maximum number of biod daemons to 4, run the following command:

text
chnfs -n 1000 -b 4

Note: This command will stop the currently running daemons, update the SRC configuration information, and then restart the daemons. As a result, NFS service will be temporarily unavailable. The maximum number of biod daemons may also be specified on a per mount basis using the biods=n mount option.

Note: If the number of nfsd daemons is not sufficient to serve the client, a nonidempotent operation error is returned to the client. For example, if the client removes a directory, an ENOENT error is returned even though the directory on the server is removed.

SRC가 제어하는 데몬의 명령행 인수 바꾸기

여러 NFS, NIS, NIS+ 데몬에는 데몬을 시작할 때 지정할 수 있는 명령행 인수가 있습니다. 이 데몬들은 명령행에서 직접 시작하지 않으므로, 데몬이 올바르게 시작하도록 SRC 데이터베이스를 갱신해야 합니다.

그러려면 chssys 명령을 씁니다. chssys 명령의 형식은 다음과 같습니다.

text
chssys -s Daemon -a ’ NewParameter ’

예:

text
chssys -s nfsd -a ’10’

이렇게 하면 nfsd subsystem이 바뀌어 데몬을 시작할 때 명령행이 nfsd 10이 됩니다. chssys 명령으로 바꾼 내용은 subsystem을 멈추고 다시 시작할 때까지 적용되지 않습니다.

영어 원문

Changing command line arguments for daemons controlled by SRC

Many NFS, NIS, and NIS+ daemons have command-line arguments that can be specified when the daemon is started. Because these daemons are not started directly from the command line, you must update the SRC database so that the daemons can be started correctly.

To do this, use the chssys command. The chssys command has the format:

text
chssys -s Daemon -a ’ NewParameter ’

For example:

text
chssys -s nfsd -a ’10’

changes the nfsd subsystem so that when the daemon is started, the command line looks like nfsd 10. The changes made by the chssys command do not take effect until the subsystem has been stopped and restarted.

NFS 데몬 시작

NFS 서버에 있는 파일의 파일 크기 한도는 nfsd를 시작할 때의 프로세스 환경이 정합니다.

특정 값을 쓰려면 /etc/rc.nfs 파일을 편집합니다. nfsd 데몬의 startsrc 명령 앞에 원하는 한도로 ulimit 명령을 씁니다.

NFS 데몬은 하나씩 시작하거나 한꺼번에 시작할 수 있습니다. NFS 데몬을 하나씩 시작하려면 다음을 실행합니다.

text
startsrc -s Daemon

여기서 Daemon은 SRC가 제어하는 데몬 가운데 하나입니다. 예를 들어 nfsd 데몬을 시작하려면 다음을 실행합니다.

text
startsrc -s nfsd

모든 NFS 데몬을 시작하려면 다음을 실행합니다.

text
startsrc -g nfs

참고: /etc/exports 파일이 없으면 nfsd와 rpc.mountd 데몬이 시작되지 않습니다. touch /etc/exports 명령으로 빈 /etc/exports 파일을 만들 수 있습니다. 그러면 내보내는 파일 시스템은 없지만 nfsd와 rpc.mountd 데몬이 시작됩니다.

영어 원문

Starting the NFS daemons

The file size limit for files located on an NFS server is defined by the process environment when nfsd is started.

To use a specific value, edit the /etc/rc.nfs file. Use the ulimit command with the desired limit before the startsrc command for the nfsd daemon.

The NFS daemons can be started individually or all at once. To start NFS daemons individually, run:

text
startsrc -s Daemon

where Daemon is any one of the SRC-controlled daemons. For example, to start the nfsd daemons, run:

text
startsrc -s nfsd

To start all of the NFS daemons, run:

text
startsrc -g nfs

Note: If the /etc/exports file does not exist, the nfsd and the rpc.mountd daemons will not be started. You can create an empty /etc/exports file by running the touch /etc/exports command. This will allow the nfsd and the rpc.mountd daemons to start, although no file systems will be exported.

NFS 데몬 정지

NFS 데몬은 하나씩 멈추거나 한꺼번에 멈출 수 있습니다.

NFS 데몬을 하나씩 멈추려면 다음을 실행합니다.

text
stopsrc -s Daemon

여기서 Daemon은 SRC가 제어하는 데몬 가운데 하나입니다. 예를 들어 rpc.lockd 데몬을 멈추려면 다음을 실행합니다.

text
stopsrc -s rpc.lockd

모든 NFS 데몬을 한꺼번에 멈추려면 다음을 실행합니다.

text
stopsrc -g nfs
영어 원문

Stopping the NFS daemons

The NFS daemons can be stopped individually or all at once.

To stop NFS daemons individually, run:

text
stopsrc -s Daemon

where Daemon is anyone of the SRC-controlled daemons. For example, to stop the rpc.lockd daemon, run:

text
stopsrc -s rpc.lockd

To stop all NFS daemons at once, run:

text
stopsrc -g nfs

NFS 데몬의 현재 상태 보기

NFS 데몬의 현재 상태는 하나씩 보거나 한꺼번에 볼 수 있습니다.

NFS 데몬의 현재 상태를 하나씩 보려면 다음을 실행합니다.

text
lssrc -s Daemon

여기서 Daemon은 SRC가 제어하는 데몬 가운데 하나입니다. 예를 들어 rpc.lockd 데몬의 현재 상태를 보려면 다음을 실행합니다.

text
lssrc -s rpc.lockd

모든 NFS 데몬의 현재 상태를 한꺼번에 보려면 다음을 실행합니다.

text
lssrc -a
영어 원문

Getting the current status of the NFS daemons

You can get the current status of the NFS daemons individually or all at once.

To get the current status of the NFS daemons individually, run:

text
lssrc -s Daemon

where Daemon is any one of the SRC-controlled daemons. For example, to get the current status of the

rpc.lockd daemon, run

text
lssrc -s rpc.lockd

To get the current status of all NFS daemons at once, run:

text
lssrc -a

NFS 버전 4 지원

AIX 5.3부터 NFS 버전 4 프로토콜 기능을 지원합니다.

프로토콜의 필수 기능은 RFC 3530에 설명된 대로 지원하며 다음 예외가 있습니다.

  • RPCSEC-GSS RPC 인증에서 LIPKEY와 SPKM-3 보안 메커니즘은 지원하지 않습니다. Kerberos V5 메커니즘만 지원합니다.
  • UTF-8 요구 사항은 완전히 지원하지 않습니다. 특히 파일 이름과, 심볼릭 링크 내용과 디렉터리 항목 이름 같은 파일 시스템 문자열의 전송이 UTF-8 형식임을 보장하지 않습니다. 소유자와 소유 그룹 같은 NFS 속성 문자열의 전송은 언제나 UTF-8 형식입니다. NFS 서버와 클라이언트는 RFC 3530에 정의된 대로 들어오는 문자열 데이터에 UTF-8 검증을 합니다. 이 검사는 nfso 명령으로 관리자가 끌 수 있습니다. UTF-8이 아닌 구성과 데이터가 있는 환경에서 NFS 버전 4를 쓰려면 UTF-8 검사를 꺼야 할 수 있습니다.
  • 디스크 없는 클라이언트, NIM, UDP는 NFS 버전 4에서 지원하지 않습니다.

NFS 버전 4의 다음 선택 기능을 지원합니다.

  • NFS 버전 4 ACL을 NFS 클라이언트와 서버 모두가 지원합니다. NFS 클라이언트는 acledit, aclget, aclput 유틸리티로 NFS 버전 4 ACL 관리를 지원합니다. NFS 서버는 NFS 버전 4 ACL 모델을 지원하는 밑의 파일 시스템에 NFS 버전 4 ACL을 저장하고 가져올 수 있습니다. 자세한 정보는 NFS ACL 지원을 봅니다.
  • 한 NFS 버전 4 도메인의 주체와 파일 소유 속성을 다른 도메인으로 매핑하는 지원을 제공합니다. 이 지원은 주로 AIX NFS 서버에서 쓰려는 것입니다. LDAP을 배치해야 합니다. NFS 매핑은 chnfsim 유틸리티로 관리합니다.

NFS 버전 2·3과 NFS 버전 4로 동시에 접근할 때 생각할 점이 있습니다. NFS 버전 4가 허용한 상태 때문에 NFS 버전 3 접근이 오류를 받을 수 있습니다. 또 데이터를 NFS 버전 4 접근용으로 내보내면 NFS 버전 3 성능에 영향이 있을 수 있습니다.

영어 원문

NFS version 4 support

Beginning with AIX 5.3, support for NFS version 4 protocol features is included.

The mandatory features of the protocol are supported as described in RFC 3530 with the following exceptions:

  • The LIPKEY and SPKM-3 security mechanisms are not supported with RPCSEC-GSS RPC authentication. Only the Kerberos V5 mechanism is supported.

  • The UTF-8 requirements are not fully supported. Specifically, the transmission of file names and file system strings such as symbolic link contents and directory entry names are not guaranteed to be in UTF-8 format. Transmission of NFS attribute strings, such as owner and owner group, are always in UTF-8 format. The NFS server and client do perform UTF-8 validation on incoming string data as defined RFC 3530. This checking can be administratively disabled using the nfso command. Disabling UTF-8 checking may be necessary to use NFS version 4 in environments with non UTF-8 configurations and data.

  • Diskless client, NIM, and UDP are not supported over NFS version 4.

The following optional features of NFS version 4 are supported:

  • NFS version 4 ACLs are supported by both the NFS client and server. The NFS client supports management of NFS version 4 ACLs using the acledit, aclget, and aclput utilities. The NFS server is capable of storing and retrieving NFS version 4 ACLs in underlying file systems that support the NFS version 4 ACL model. For more information, see NFS Access Control Lists support.

  • Support is provided to map principals and file ownership attributes from one NFS version 4 domain into another. This support is primarily intended for use at AIX NFS servers. It requires deployment of LDAP. The NFS mappings are managed using the chnfsim utility.

There are several considerations when using concurrent access with NFS versions 2 and 3, and NFS version 4. NFS version 3 access may receive errors due to the NFS version 4 granted state. Also, NFS version 3 performance may be impacted when data is exported for NFS version 4 access.

NFS 서버 유예 기간

NFS 버전 4(NFSv4) 프로토콜은 시스템 관리자가 NFSv4 서버에서 특정 작업을 특별히 처리하는 유예 기간(grace period)을 켤 수 있는 기능을 제공합니다.

이 유예 기간 안에서 관리자는 서버 lease 기간 전체 동안 잠금, 읽기 작업, 쓰기 작업을 관리할 수 있습니다. 클라이언트는 reclaim 종류의 잠금 요청으로 잠금과 그에 연결된 상태를 되찾을 수 있습니다.

참고: 유예 기간에 클라이언트가 되찾는 모든 상태가 이전 인스턴스에서 서버가 갖고 있던 상태라고 보장할 수는 없습니다. 유예 기간 중에 되찾는 상태는 NFSv4 RFC에 정의된 대로 올바른 상태임이 보장됩니다.

AIX 5L Version 5.3 with the 5300-05 Technology Level부터 관리자는 NFSv4 서버에서 유예 기간을 쓸 수 있습니다. 유예 기간은 기본으로 꺼져 있습니다. 서버에서 유예 기간을 켜려면 SMIT 메뉴나 chnfs 명령행 인터페이스를 씁니다.

유예 기간이 켜져 있으면 NFSv4 서버는 상태 정보를 /var 파일 시스템의 디스크에 기록합니다. 기록한 상태는 서버가 다시 시작할 때 자동으로 되찾습니다.

영어 원문

NFS server grace period

The NFS version 4 (NFSv4) protocol provides functionality that lets system administrators enable a grace period on the NFSv4 server for special handling of specific operations.

Within this grace period, administrators can manage locking, read operations, and write operations for the entire duration of the server lease. Locks and their associated states can be recovered by clients through reclaim-type locking requests.

Note: Not all states reclaimed by clients in the grace period can be guaranteed to be the state held by the server in the previous instance. The state that is reclaimed during the grace period is guaranteed to be the correct one as defined by the NFSv4 RFC.

Beginning with AIX 5L Version 5.3 with the 5300-05 Technology Level, administrators can use the grace period on NFSv4 servers. The grace period is disabled by default. To enable the grace period on the server, use the SMIT menu or the chnfs command line interface.

When the grace period is enabled, the NFSv4 server records state information to disk in the /var file. The recorded state is reclaimed automatically when the server restarts.

NFS DIO와 CIO 지원

AIX 5L Version 5.3 with the 5300-03 Recommended Maintenance package는 버전 3과 4 프로토콜의 NFS 클라이언트에서 직접 I/O(DIO)와 동시 I/O(CIO)를 지원합니다. DIO와 CIO는 클라이언트에만 관련됩니다.

DIO와 CIO를 쓰면 데이터베이스와 고성능 계산 응용 프로그램 같은 데이터 센터 작업 부하가, 파일 기반 저장소를 중앙에 모으고 백엔드 시스템을 관리하는 이점은 유지하면서 시스템 CPU와 메모리 자원은 덜 쓰고 더 높은 성능을 낼 수 있습니다.

I/O는 흔히 순차적이지 않고, 응용 프로그램이 NFS 클라이언트의 데이터 캐시에서 이득을 보지 못하거나 응용 프로그램이 고급 캐시를 모두 직접 하는 경우가 많습니다. 이런 응용 프로그램은 NFS가 캐시하지 않고, 읽기 예측을 하지 않고, write-behind 메커니즘을 쓰지 않을 때 이득을 봅니다. 또 데이터베이스 같은 일부 응용 프로그램은 읽기를 쓰기와 직렬화하는 POSIX 단일 사이트 의미에 의존하지 않습니다. 이런 응용 프로그램은 읽기와 쓰기를 동시에 내지만, 그런 작업의 일관성과 조율은 응용 프로그램이 책임집니다.

영어 원문

NFS DIO and CIO support

AIX 5L Version 5.3 with the 5300-03 Recommended Maintenance package supports direct I/O and concurrent I/O in the NFS client for the version 3 and 4 protocols. DIO and CIO only involve the client.

Using DIO and CIO, data center workloads such as databases and high performance computing applications can experience higher levels of performance, coupled with reduced system CPU and memory resources, while maintaining the benefits of centralizing file-based storage and its associated management of back-end systems.

I/O is often nonsequential, and often applications do not benefit from data caching at the NFS client, or the applications do all the advanced caching. These applications benefit when NFS does not cache, perform read prediction, or use write-behind mechanisms. In addition, some applications such as databases are not dependent on POSIX single-site semantics, which serialize reads against writes. These applications issue concurrent reads and writes, but these applications are responsible for the consistency and coordination of such operations.

NFS 직접 I/O(DIO)

DIO는 응용 프로그램이 NFS 클라이언트 캐시 계층(Virtual Memory Manager)을 거치지 않고, 데이터 캐시에 따른 부담 없이 NFS 서버에 직접 읽고 쓰게 합니다.

DIO에서 응용 프로그램 I/O 요청은 NFS 서버로의 직접 RPC(Remote Procedure Call)로 처리합니다. DIO는 AIX dio 마운트 옵션으로 설정할 수 있습니다. 마운트 옵션 없이도 AIX O_DIRECT open() 플래그로 파일마다 DIO를 켤 수 있습니다.

NFS 직접 I/O를 처리하려면, I/O 요청 크기와 서버와 클라이언트가 허용하는 최대 전송 크기에 따라 서버에 RPC를 여러 번 보내야 할 수 있습니다. DIO에 관한 자세한 정보는 mount 명령의 -o 옵션을 봅니다.

영어 원문

Direct I/O for NFS

DIO allows applications to perform reads and writes directly to the NFS server without going through the NFS client caching layer (Virtual Memory Manager), or incurring the associated overhead of caching data.

Under DIO, application I/O requests are serviced using direct Remote Procedure Calls (RPC) to the NFS server. You can set DIO using the AIX dio mount option. Without the mount option, you can also enable DIO per-file by using the AIX O_DIRECT open() flag.

Servicing NFS direct I/Os might require multiple RPCs to the server, depending on the I/O request size and the maximum wire transfer size permitted by the server and client. For more information about DIO, see the -o option for the mount command.

NFS 동시 I/O(CIO)

CIO에서는 동시에 낸 응용 프로그램 읽기와 쓰기가, 쓰기 동안 읽기가 막히거나 그 반대 없이 동시에 실행됩니다.

여러 쓰기도 동시에 실행됩니다. POSIX 원자성 보장은 제공하지 않습니다. CIO가 적용되면 직접 I/O가 함께 적용됩니다. CIO는 AIX cio 마운트 옵션이나 O_CIO open() 플래그로 설정합니다. CIO에 관한 자세한 정보는 mount 명령의 -o 옵션을 봅니다.

(6.1) AIX Version 6.1 with the 6100-04 Technology Level 이후에는 mount 명령, nfs4cl 명령, open() 서브루틴으로, 파일이 이미 CIOR로 열려 있을 때 읽기 전용 파일을 열 수 있게 할 수 있습니다. cior 마운트 옵션과 O_CIOR open() 플래그는 CIO와 함께만 쓸 수 있습니다.

관련 정보: mount 명령

영어 원문

Concurrent I/O for NFS

With CIO, application reads and writes that are issued concurrently run concurrently without reads blocking for the duration of writes, or the reverse.

Multiple writes also run concurrently. POSIX atomicity guarantees are not provided. When CIO is in effect, direct I/O is implied. Use the AIX cio mount option or the O_CIO open() flag to set CIO. For more information about CIO, see the -o option for the mount command.

In AIX Version 6.1 with the 6100-04 Technology Level and later, you can run the mount command, the nfs4cl command, or the open() subroutine to allow you to open read only files when those file have already been opened in CIOR. The cior mount option and the O_CIOR open () flag can only be used in conjunction with CIO.

Related information

mount command

NFS에서 DIO, CIO, 보통 open, 매핑 파일의 상호 작용

DIO와 CIO로 생길 수 있는 서로 다른 접근 모드 사이에는 다음 동작이 있습니다.

기존 DIO open이 적용되어 있을 때:

  • 보통 open이 있으면 보통 open이 더는 없을 때까지 DIO가 꺼집니다. close로 보통 open이 0이 되면, DIO open이 아직 남아 있으면 DIO가 다시 켜집니다.
  • shmat()이나 mmap()으로 파일을 매핑하면 매핑 수가 0으로 떨어질 때까지 파일의 DIO가 꺼집니다. 그런 다음 DIO open이 아직 있으면 DIO가 다시 켜집니다.
  • 파일을 CIO로 열려는 시도는 EINVAL 오류로 실패합니다.

보통 open(CIO도 DIO도 아님)이 적용되어 있을 때:

  • DIO open 시도는 성공하지만, 보통 open 수가 0으로 떨어질 때까지 DIO가 활성화되지 않습니다.
  • CIO open은 EINVAL 오류로 실패합니다.

CIO open이 적용되어 있을 때:

  • 보통 open, DIO open, 파일 매핑 시도는 모두 EINVAL 오류로 실패합니다.

(6.1) CIO와 CIOR를 함께 쓴 open이 적용되어 있을 때:

  • 보통 open, DIO open, 파일 매핑 시도는 읽기 전용 open과 CIO·CIOR open을 빼고 모두 EINVAL 오류로 실패합니다.

참고: DIO나 CIO로 바뀔 때는 모든 캐시 정보를 지우기 전에 클라이언트에 캐시된 수정 내용을 먼저 NFS 서버에 기록합니다.

영어 원문

Interaction of DIO, CIO, regular opens, and mapped files for NFS

The following behaviors exist between the different access modes that can occur with DIO and CIO.

When existing DIO opens are in effect:

  • A regular open causes DIO to be turned off until there are no longer regular opens. When a close reduces the regular opens to 0, DIO is re-enabled if there are still DIO opens outstanding.

  • Mapping a file with shmat() or mmap() will deactivate DIO on the file until the number of mappings drops to 0. Then if there are still DIO opens, DIO will be re-enabled.

  • Attempts to open the file for CIO will fail with the EINVAL error.

When there are regular opens (no CIO or DIO) in effect:

  • DIO open attempts succeed, but DIO is not activated until the count of regular opens drops to 0.

  • Opens for CIO will fail with the EINVAL error.

When CIO opens are in effect:

  • Regular, DIO, and attempts to map the file will all fail with the EINVAL error.

When CIO|CIOR opens are in effect:

  • Regular, DIO, and attempts to map the file will all fail with the EINVAL error except Read-only and CIO|CIOR opens.

Note: When there is a transition to DIO or CIO, client-cached modifications will first write back to the NFS server prior to deleting all cached information.