Ssup2 Blog logo Ssup2 Blog

1. 설치 환경

설치 환경은 다음과 같다.

2. NFSv3 Server 설정

2.1. Ubuntu Package 설치

# sudo apt-get install nfs-kernel-server nfs-common rpcbind

NFSv3 Server Package를 설치한다.

2.2. 공유 폴더 생성 및 Bind Mount 설정

# mkdir -p /nfs_root
# mkdir -p /root/nfs_share
# chmod 777 /root/nfs_share
# mount --bind /root/nfs_share /nfs_root

공유 폴더 생성 및 Bind Mount를 수행한다.

...
/root/nfs_share /nfs_root none bind  0  0
[파일 1] /etc/fstab

/etc/fstab에 다음 [파일 1]의 내용을 추가하여 재부팅 후에도 Bind Mount 되도록 설정한다.

2.3. 설정

/nfs_root      *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
[파일 2] /etc/exports

/etc/exports 파일에 [파일 2]의 내용을 추가한다.

2.4. Restart

# /etc/init.d/nfs-kernel-server restart

NFSv3 Server를 재시작한다.

3. NFSv3 Client 설정

# apt-get install nfs-common

NFSv3 Client Package를 설치한다.

# mount -t nfs localhost:/nfs_root /mnt

NFSv3 Mount를 수행한다.