본문 바로가기
컴퓨터 & IT (Computer & IT)/Beowulf Cluster (Diskless Cluster)

[Diskless Cluster] 1.3. 마스터 서버 – NFS 서버 설정

by Physics 2020. 6. 2.
728x90

1.3. 마스터 서버 – NFS 서버 설정

Diskless cluster의 경우 자체적인 하드디스크가 없다. 따라서 NFS (Networking File System)를 이용하여, 마스터 서버에서 계산노드를 위해 만들어진 루트디렉토리를 “/”로 인식하게 만들어야 한다. 즉, NFS를 이용하여, /computation _node/nfsroot 디렉토리를 계산노드들의 “/”로 마운트 시킬 것이다. 이 장에서 해야할 것은 크게 2가지이다.
    마스터 서버에 nfs서버 설치
    마스터 서버의 /etc/exports 파일 편집

1.3.1 마스터 서버 - nfs 서버 설치 [1]

$ sudo apt-get install nfs-kernel-server -y 
$ sudo apt-get install nfs-common -y
$ sudo apt-get install portmap -y

1.3.2 마스터 서버의 /etc/exports 파일 편집 [2]

$ vim /etc/exports 
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/computation_node  192.168.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
/home              192.168.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
/usr               192.168.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
/root              192.168.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)

  우리가 NFS로 마운트 시킬 항목은 /computation_node/nfsroot, /home, /root, /usr 디렉토리이다.
 

 • /etc/exports 파일을 수정 후, 아래의 명령어를 친다.

$ exportfs -rv

 

※ 이후에 할 일들 (2.1.1에서 계속)
   계산노드들이 자신의 루트 디렉토리로 인식할 리눅스 이미지를 만드는 것
   계산노드들이 영구적으로 마운트 시킬 디렉토리들을 설정하는 것

 

 

 


 

[1] nfs에 대한 설명은 다음 링크를 통해 참조 : m31phy.tistory.com/74
[2] /etc/exports에 대한 자세한 내용은 다음 링크를 통해 참조: m31phy.tistory.com/72

728x90

댓글