tech:serveur_nfs_en_userland_avec_ganesha
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:serveur_nfs_en_userland_avec_ganesha [2025/12/12 17:23] – créée Jean-Baptiste | tech:serveur_nfs_en_userland_avec_ganesha [2026/01/08 10:46] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Serveur NFS en userland avec Ganesha | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | Voir aussi (conteneurs) : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | '' | ||
| + | ~~~c | ||
| + | ################################################### | ||
| + | # | ||
| + | # Ganesha Config Example | ||
| + | # | ||
| + | # This is a commented example configuration file for Ganesha. | ||
| + | # complete, but only has some common configuration options. | ||
| + | # for complete documentation. | ||
| + | # | ||
| + | ################################################### | ||
| + | |||
| + | ## These are core parameters that affect Ganesha as a whole. | ||
| + | NFS_CORE_PARAM { | ||
| + | ## Allow NFSv3 to mount paths with the Pseudo path, the same as NFSv4, | ||
| + | ## instead of using the physical paths. | ||
| + | # | ||
| + | |||
| + | ## Configure the protocols that Ganesha will listen for. This is a hard | ||
| + | ## limit, as this list determines which sockets are opened. | ||
| + | ## can be restricted per export, but cannot be expanded. | ||
| + | #Protocols = 3,4,9P; | ||
| + | Protocols = 4; | ||
| + | |||
| + | Enable_NLM = false; | ||
| + | Enable_RQUOTA = false; | ||
| + | |||
| + | } | ||
| + | |||
| + | ## These are defaults for exports. | ||
| + | EXPORT_DEFAULTS { | ||
| + | ## Access type for clients. | ||
| + | ## given either here or in the export itself. | ||
| + | # | ||
| + | Access_Type = RO; | ||
| + | Protocols = 4; | ||
| + | |||
| + | PrivilegedPort = false; | ||
| + | Transports = TCP; | ||
| + | Squash = All_Squash; | ||
| + | } | ||
| + | |||
| + | ## Configure settings for the object handle cache | ||
| + | #MDCACHE { | ||
| + | ## The point at which object cache entries will start being reused. | ||
| + | # | ||
| + | #} | ||
| + | |||
| + | |||
| + | # | ||
| + | |||
| + | ## Configure an export for some file tree | ||
| + | EXPORT | ||
| + | { | ||
| + | Export_Id = 0; | ||
| + | Filesystem_id = 0.0; | ||
| + | Protocols = 4; | ||
| + | Path = /srv/nfs; | ||
| + | Pseudo = /; | ||
| + | FSAL { | ||
| + | Name = PSEUDO; | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | EXPORT | ||
| + | { | ||
| + | ## Export Id (mandatory, each EXPORT must have a unique Export_Id) | ||
| + | Export_Id = 1; | ||
| + | |||
| + | ## Exported path (mandatory) | ||
| + | Path = / | ||
| + | |||
| + | ## Pseudo Path (required for NFSv4 or if mount_path_pseudo = true) | ||
| + | #Pseudo = / | ||
| + | Pseudo = /files; | ||
| + | |||
| + | ## Restrict the protocols that may use this export. | ||
| + | ## access that is denied in NFS_CORE_PARAM. | ||
| + | #Protocols = 3,4; | ||
| + | Protocols = 4; | ||
| + | |||
| + | ## Access type for clients. | ||
| + | ## given. It can be here, in the EXPORT_DEFAULTS, | ||
| + | # | ||
| + | Access_Type = RO; | ||
| + | |||
| + | Transports = " | ||
| + | # Anonymous_Uid = -2; | ||
| + | # Anonymous_Gid = -2; | ||
| + | Anonymous_Uid = 65534; | ||
| + | Anonymous_Gid = 65534; | ||
| + | #SecType = " | ||
| + | SecType = " | ||
| + | # Manage_Gids = true; | ||
| + | |||
| + | ## Whether to squash various users. | ||
| + | Squash = root_squash; | ||
| + | |||
| + | ## Allowed security types for this export | ||
| + | #Sectype = sys, | ||
| + | |||
| + | # Exporting FSAL | ||
| + | FSAL { | ||
| + | Name = VFS; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | ## Configure logging. | ||
| + | ## configured from the command line | ||
| + | LOG { | ||
| + | ## Default log level for all components | ||
| + | Default_Log_Level = WARN; | ||
| + | |||
| + | ## Configure per-component log levels. | ||
| + | Components { | ||
| + | FSAL = INFO; | ||
| + | NFS4 = EVENT; | ||
| + | } | ||
| + | |||
| + | ## Where to log | ||
| + | Facility { | ||
| + | name = FILE; | ||
| + | destination = "/ | ||
| + | enable = active; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | #CLIENT { | ||
| + | # Clients = 192.168.100.104, | ||
| + | # Access_Type = RO; | ||
| + | # } | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Sur Debian | ||
| + | ~~~ | ||
| + | # systemctl list-units |awk '/nfs/ { print $1 }' | ||
| + | nfs-blkmap.service | ||
| + | nfs-ganesha-lock.service | ||
| + | nfs-ganesha.service | ||
| + | nfs-client.target | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Lancement | ||
| + | ~~~bash | ||
| + | / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | FIXME | ||
| + | |||
