Git Product home page Git Product logo

fuse-nfs's Introduction

### fuse-nfs
========

NFS 프로토콜을 구현한 퓨즈 모듈입니다.

### Building
========

$ sudo apt-get install libfuse-dev libnfs13 libnfs-dev libtool m4 automake libnfs-dev xsltproc
$ ./setup.sh
$ ./configure
$ make
$ sudo make install

### FUSE OPTIONS
============

	[-?|--help]

	fuse-nfs options :
	[-U NFS_UID|--fusenfs_uid=NFS_UID]
		마운트 지점 내의 rpc 자격 증명 내에 전달된 uid
		이는 URL 내에서 uid를 전달하는 것과 동일합니다. 그러나 둘 다 정의된 경우 URL의 하나가 사용됩니다.
	[-G NFS_GID|--fusenfs_gid=NFS_GID]
		마운트 지점 내의 rpc 자격 증명 내에 전달된 gid
		이는 URL 내에서 gid를 전달하는 것과 동일합니다. 그러나 둘 다 정의된 경우 URL의 gid가 사용됩니다.
	[-o|--fusenfs_allow_other_own_ids]
		대신 현재(기타) 사용자 자격 증명으로 rpc 자격 증명을 업데이트하도록 활성화된 allow_user를 사용하여 fuse-nfs를 허용합니다.
                마운트 사용자 자격 증명 또는 (정의된 경우) -U/-G / url로 정의된 사용자 정의 자격 증명 사용
		이 옵션은 allow_other 를 활성화합니다. allow_other 에는 fuse.conf에 정의된 user_allow_other가 필요합니다.

	libnfs options :
	[-n SHARE|--nfs_share=SHARE]
		마운트할 서버 내보내기 (원본경로, 예: nfs://127.0.0.1/data/tmp)
	[-m MNTPOINT|--mountpoint=MNTPOINT]
		클라이언트 마운트 지점(마운트 포인트, 예: /my/mountpoint)

	fuse options (see man mount.fuse):
	[-p [0|1]|--default_permissions=[0|1]
		The fuse default_permissions option do not have any argument, 
		for compatibility with previous fuse-nfs version default is activated (1)
		with the possibility to overwrite this behavior (0)
	[-t [0|1]|--multithread=[0|1]]
		Single threaded by default (0) , may have issue with nfs and fuse multithread (1)
	[-a|--allow_other]
		이 옵션은 파일 시스템 소유자에 대한 파일 액세스를 제한하는 보안 조치를 무시하므로 
                모든 사용자(루트 포함)가 파일에 액세스할 수 있습니다.
	[-r|--allow_root]
		이 옵션은 allow_other와 유사하지만 파일 액세스는 파일 시스템 소유자 및 루트로 제한됩니다.
                이 옵션과 allow_other는 상호 배타적입니다.
	[-u FUSE_UID|--uid=FUSE_UID]
		마운트 소유자의 숫자 uid를 지정합니다.
                파일 시스템에 의해 설정된 st_uid 필드를 재정의합니다.
	[-g FUSE_GID|--gid=FUSE_GID]
		마운트 소유자의 숫자 gid를 지정합니다.
                파일 시스템에 의해 설정된 st_uid 필드를 재정의합니다.
	[-K UMASK|--umask=UMASK]
		파일 시스템에 의해 설정된 st_mode의 권한 비트를 재정의합니다.
                결과 권한 비트는 지정된 umask 값에서 누락된 비트입니다.
                값은 8진수 표현으로 제공됩니다.
	[-d|--direct_io]
		이 옵션은 이 파일 시스템의 커널에서 페이지 캐시(파일 내용 캐시) 사용을 비활성화합니다.
		이는 여러 가지 영향을 미칩니다.:
		       1.	각 읽기 또는 쓰기 시스템 호출은 하나 이상의 읽기 또는 쓰기 작업을 시작하며 데이터는 커널에 캐시되지 않습니다.
		       2.	읽기 및 쓰기 시스템 호출의 반환 값은 읽기 및 쓰기 작업의 반환 값에 해당합니다.
                                예를 들어 파일 크기를 미리(읽기 전) 알 수 없는 경우에 유용합니다.
	[-k|--kernel_cache]
		이 옵션은 파일을 열 때마다 파일 내용의 캐시 플러시를 비활성화합니다.
		이는 파일 데이터가 외부에서 변경되지 않는 파일 시스템에서만 활성화되어야 합니다(마운트된 FUSE 파일 시스템을 통하지 않음).  
		따라서 네트워크 파일 시스템 및 기타 '중간' 파일 시스템에는 적합하지 않습니다.
	[-c|--auto_cache]
		이 옵션은 kernel_cache의 대안입니다. 
		캐싱된 데이터를 무조건 유지하는 것이 아니라, 마지막 오픈 이후 수정 시간이나 파일 크기가 변경된 경우 오픈 시 캐싱된 데이터가 무효화됩니다.
	[-E TIMEOUT|--entry_timeout=TIMEOUT]
		The timeout in seconds for which name lookups will be cached.
		The default is 1.0 second. For all the timeout options, it is possible to give fractions of a second as well (e.g. entry_timeout=2.8)
	[-N TIMEOUT|--negative_timeout=TIMEOUT]
		The timeout in seconds for which a negative lookup will be cached.
		This means, that if file did not exist (lookup retuned ENOENT), the lookup will only be redone after the timeout, and the file/directory will be assumed to not exist until then.
		The default is 0.0 second, meaning that caching negative lookups are disabled.		
	[-T TIMEOUT|--attr_timeout=TIMEOUT]
		The timeout in seconds for which file/directory attributes are cached. 
		The default is 1.0 second.
	[-C TIMEOUT|--ac_attr_timeout=TIMEOUT]
		The timeout in seconds for which file attributes are cached for the purpose of checking if auto_cache should flush the file data on open. 
		The default is the value of attr_timeout
	[-l|--large_read]
		This can improve performance for some filesystems, but can also degrade performance. 
		This option is only useful on 2.4.X kernels, as on 2.6 kernels requests size is automatically determined for optimum performance.

### ROOT vs NON-ROOT
================
기본적으로 대부분의 NFS 서버는 시스템 포트(예: 포트 1024)를 사용하는 클라이언트의 액세스만 허용합니다.
기본적으로 이러한 포트는 루트 사용자만 사용할 수 있으므로 루트가 아닌 사용자가 NFS 서버에 연결하거나 파일 시스템을 마운트하는 것을 방지합니다.

이 문제를 해결하는 방법에는 두 가지가 있습니다.:
1, cap_net_bind_service
-----------------------
Linux에서 이 기능이 설정되면 커널은 해당 프로그램이 해당 프로그램을 실행하는 모든 사용자에 대해 시스템 포트를 사용할 수 있도록 허용합니다.

>  sudo setcap 'cap_net_bind_service=+ep' ./fuse/fuse-nfs

이 기능을 설정하면 루트가 아닌 일반 사용자가 NFS 서버에 액세스할 수 있습니다.

2, insecure
-----------
또는 NFS 서버 자체에서 '클라이언트가 시스템 포트에서 연결하는 확인'을 비활성화할 수도 있습니다.
Linux NFS 서버에서는 /etc/exports 파일에 'insecure' 키워드를 추가하여 이를 수행합니다.


### LIBNFS URL-FORMAT:
===========
libnfs는 libnfs 특정 URL 인수와 일부 사소한 확장으로 확장된 RFC2224 스타일 URL을 사용합니다.
이러한 URL의 기본 구문은 다음과 같습니다. :

nfs://<server|ipv4|ipv6>/path[?arg=val[&arg=val]*]

libnfs가 지원하는 인수는 다음과 같습니다. :
 tcp-syncnt=<int>  : 서버에 대한 TCP 연결 설정에 실패하기 전에 세션 설정 중에 보낼 SYN 수입니다.
 uid=<int>         : 서버와 통신할 때 사용할 UID 값입니다.
                     Windows에서는 기본값이 65534이고 Unixen에서는 getuid()입니다.
 gid=<int>         :서버와 통신할 때 사용할 GID 값입니다.
                     Windows에서는 기본값이 65534이고 unixen에서는 getgid()입니다.
 readahead=<int>   : 파일에 대해 미리 읽기를 활성화하고 최대 미리 읽기 양을 다음으로 설정합니다. <int>.
 auto-traverse-mounts=<0|1>
                   : libnfs가 중첩된 마운트를 자동으로 통과하려고 시도해야 하는지 여부입니다. 기본값은 1 == enabled 입니다.
 dircache=<0|1>    : Disable/enable directory caching. Enabled by default.
 if=<interface>    : Interface name (e.g., eth1) to bind; requires `root`
 version=<3|4>     : 사용할 NFS 버전입니다. 버전 3이 기본값입니다.


파일 시스템을 마운트하려면:
======================
fuse-nfs -n nfs://127.0.0.1/data/tmp -m /my/mountpoint


파일 시스템을 마운트 해제하려면:
========================
fusermount -u /my/mountpoint


NFSv4 support:
==============
NFSv4는 최신 버전의 libnfs와 함께 사용할 때 지원됩니다.
NFSv4 지원을 활성화하려면 URL 인수로 version=4를 지정해야 합니다.:
fuse-nfs -n nfs://127.0.0.1/data/tmp?version=4 -m /my/mountpoint


Windows
=======
다음은 Windows에 대한 포트(포팅)입니다.:

* Daniel Abrech(https://github.com/Daniel-Abrecht)는 dokany 파일 시스템/fuse 래퍼를 사용하여 이 퓨즈 모듈을 Windows에 포팅했습니다.

 이 모듈의 Windows 빌드는 다음에서 다운로드할 수 있습니다 :
 https://github.com/Daniel-Abrecht/fuse-nfs-crossbuild-scripts/releases

* Bill Zissimopoulos(https://github.com/billziss-gh)는 WinFsp를 사용하여 이 퓨즈 모듈을 Windows에 이식했습니다.

  NFS-Win 포트(MSI 설치 프로그램 포함)는 여기에서 찾을 수 있습니다.:
  https://github.com/billziss-gh/nfs-win

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.