NFS - 설치, 설정, 성능, Migration

1. NFS 서버 설정 (예 : 10.200.200.15)

  1. 서비스확인
    • # ntsysv
      • [*] nfs
  2. 설치
    • # yum install nfs
  3. 환경설정
    • # vi /etc/exports
    • 예 1: /pcs/nfs *(rw,sync,no_root_squash)
    • 예 2: /pcs/nfs 10.200.200.0/255.255.255.0(rw)
      • no-root-squash 루트의 자격으로 파일시스템에 접근할 수 있도록 마운트
      • root-squash 루트의 자격으로 파일시스템에 접근하면 anonymous uid/gid로 바꿔서 허가
  4. 서비스 실행
    • # service nfs restart
      • 에러
        • Starting NFS quotas: Cannot register service: RPC:
        • Unable to receive; errno = Connection refused rpc.rquotad:
        • unable to register (RQUOTAPROG, RQUOTAVERS, udp)
      • 해결책
        • Method 1 # /etc/init.d/portmap restart
        • Method 2 # yum reinstall rpcbind

2. NFS 클라이언트 설정 (예 : 10.200.200.16)

  1. 동작 확인
    • # mkdir -p /pcs/mnt
    • # mount -t nfs 10.200.200.15:/pcs/nfs /pcs/mnt
      • hang => 해결책 : # /etc/init.d/portmap restart
    • # df -k
      • Filesystem 1K-blocks Used Available Use% Mounted on
      • 10.200.200.15:/pcs/nfs 646431520 202080 612862848 1% /pcs/mnt
    • # umount /pcs/mnt
    • # vi /etc/fstab
      • 10.200.200.15:/pcs/nfs /pcs/mnt nfs defaults 0 0
    • # mount -a
    • # df -k

3. nfslock 설정

  1. 여러 클라이언트에서 파일을 접근했을때, 파일의 무결성을 보장하기 위해 필요
  2. lock 을 걸어준다.
  3. /etc/rc.d/init.d/nfslock start

4. BMT 결과

  1. NFS 테스트 결과
    • # ./iozone -ac -i0 -i1 -i2 -f ./mnt/test_mnt -s 4g -r 4096 <PRE class=wiki> random random KB reclen write rewrite read reread read write 4194304 4096 77748 60224 3317121 3293555 3142259 63086 4194304 4096 83027 62312 3040463 3079547 3045457 61774 </PRE>
  2. Local FS 테스트 결과
    • # ./iozone -ac -i0 -i1 -i2 -f ./test_mnt -s 4g -r 4096 <PRE class=wiki> random random KB reclen write rewrite read reread read write 4194304 4096 601705 1536143 2944315 2967729 2950421 1804832 4194304 4096 769442 1863042 2891610 2898843 2884011 1772394 </PRE>
  3. Local FS 테스트 결과 (-o Writes are synch (O_SYNC) 추가, 메모리 영향 제거)
    • # ./iozone -aco -i0 -i1 -i2 -f ./test_mnt -s 4g -r 4096 <PRE class=wiki> random random KB reclen write rewrite read reread read write 4194304 4096 86656 84444 3083568 3170194 3175075 86132 4194304 4096 88631 81013 3150580 3212889 3229828 85238 </PRE>

5. Virtualization over shared storage

  1. Comparison of Storage Protocol Performance
    • 결론
      • Fibre Channel and hardware iSCSI are the most CPU efficient
      • In cases in which CPU consumption is not a concern,
      • software iSCSI and NFS can also be part of a high‐performance solution.

6. Migration

  1. Migration 테스트
    1. VM 정보
      • Memory : 1 G
      • HDD : 3G
    2. Shared Storage
      • NFS에 VM 이미지 파일 저장
    3. 테스트 과정
      • Step 1 : 10.200.200.26 에서 VM 실행 <PRE class=wiki>[root@nebebs016 mnt]# virsh list Id Name State---------------------------------- 8 TEST running</PRE>
      • Step 2 : 10.200.200.27 로 live migration 수행
        • EBS ssh 포트 변경 필요 (/etc/services 의 ssh 포트를 22에서 22222로 변경)
        • 10.200.200.26 의 공개키를 10.200.200.27의 authorized_keys 에 복사 <PRE class=wiki>[root@nebebs016 mnt]# time virsh migrate 8 qemu+ssh://10.200.200.27/systemreal 0m18.460suser 0m0.028ssys 0m0.022s[root@nebebs016 mnt]# virsh list Id Name State----------------------------------</PRE>
      • Step 3 : 10.200.200.27 에서 Migration된 VM 확인 <PRE class=wiki>[root@nebebs017 pcs]# virsh list Id Name State---------------------------------- 3 TEST running</PRE>

댓글

이 블로그의 인기 게시물

SSH 연결 Delay 해결

[ELK] search guard를 이용한 보안 설정 (사용자 권한)

공공데이터(openapi) 사용법 (특정 정류소, 버스의 남은 좌석 확인 하기)