man exportfs(exportfs Command manual in Chinese )
Collection of my translations ：http://www.cnblogs.com/f-ck-need-u/p/7048359.html
exportfs(8) System Manager's Manual exportfs(8) NAME exportfs - Management and maintenance NFS Export table
SYNOPSIS/usr/sbin/exportfs [-avi] [-o options,..] [client:/path ..]
/usr/sbin/exportfs -r [-v] /usr/sbin/exportfs [-av] -u [client:/path ..]
/usr/sbin/exportfs [-v] /usr/sbin/exportfs -f /usr/sbin/exportfs -s DESCRIPTION
NFS The server will maintain a NFS Table of the local physical file system accessed by the client . Each file system in the table is called Exported file system , Or export item for short .
exportfs Command maintenance NFS Current export table of server . The exported main table is stored in /var/lib/nfs/etab In file . When the client Send a NFS
MOUNT On request ,rpc.mountd The process will read the file . generally speaking , Export main table is "exportfs -s"
read /etc/exports and /etc/exports.d/*.exports File to initialize .
however , System administrators can use exportfs Command to add or remove export items directly to the main table , It doesn't need to be modified
/etc/exports or /etc/exports.d/*.exports file .
exportfs And its partner program rpc.mountd Working in one of two modes ： Traditional mode for Linux Kernel 2.4 And before
Version of , New mode applied to kernel 2.6 And later , The new model provides nfsd Virtual file system , And mount them on
/proc/fs/nfsd or /proc/fs/nfs upper . stay kernel 2.6 after , If not mounted nfsd Virtual file system , It means working in Under the traditional mode .
In new mode ,exportfs No information to the kernel , But through documents /var/lib/nfs/etab Give information to rpc.mountd,
then rpc.mountd You can manage kernel requests for export information on demand . Under the traditional mode ,exports Files can only identify hosts , Network segments and network groups are not recognized , And will directly deliver the exported information to the kernel
Export table for , Write to file at the same time /var/lib/nfs/etab In file . OPTIONS -d kind or --debug kind
Turn on debugging function . effective kind The value is ：all, auth, call, general and parse. -a Export or uninstall all directories . -o options,...
Specify a series of export options ( as rw,async,root_squash), These export options are available in the exports(5) Of man There are records in the document . -i
ignore /etc/exports and /etc/exports.d Files under directory . Only the options given on the command line and the default options take effect . -r
Re export all directories , And synchronize changes /var/lib/nfs/etab About /etc/exports and /etc/exports.d/
*.exports Information about ( It will also be re exported /etc/exports and /etc/exports.d/* And so on ). The
Option will be removed /var/lib/nfs/etab Deleted and invalid export items in . -u uninstall ( No more exports ) One or more export directories . -f
If /prof/fs/nfsd or /proc/fs/nfs Mounted , I.e. working in the new mode , This option will empty the export table in the kernel
All exports of . The next time the client requests to mount the export item, it will pass the rpc.mountd Add it to the export table of the kernel . -v Output details . -s
Display for /etc/exports List of current exported directories for . DISCUSSION Exporting Directories
synopsis The first item in shows how to call when you want to add an export entry to the export table exportfs command . When using "exportfs -a"
Time , All recorded in /etc/exports and /etc/exports.d/*.exports The export items in will be added to the file /var/lib/nfs/etab
in . And update the export table in the kernel as needed . client:/path In parameter /path Specified the directory to be exported locally , and client Represents a client that can access the export directory .
About export options and client Specified format of , See exports(5) Of man file .
IPv6 Address contains colon , But colons are already used to separate "client" and "/path" Command line arguments . So when using IPv6 Address designated customer
Home terminal time , The address needs to be surrounded by brackets . about IPv6 network address , Place prefix after closing bracket .
( as ：[X:X:X:X:X:X:X:X]:/path and [fe80::]/64:/path)
If you want to export the directory as accessible to all ( Export to the whole world), Only use ":/path" that will do . But it may be given at this time Warning message , have access to
A specific host/directory Export options for can have multiple sources . The default export option is sync,ro,root_squash,wdelay.
These default options can be /etc/exports or /etc/exports.d/*.exports The options in are overridden . System administrators can use "exportfs -o
options" To override options from all other sources . Use when specifying export options on the command line Comma separated list of export options . in other words ,exportfs Export options available for modifying exported directories .
Unexporting Directories synopsis The third item in shows how to uninstall the currently exported directory . When using "exportfs
-ua" Time ,/var/lib/nfs/etab in All entries for will be removed from the kernel export table , And the file will be emptied . This is to close all NFS Active .
If you just remove an export item , Then specify client:/path that will do . It will be deleted /var/lib/nfs/etab Corresponding item in , And from Remove the corresponding entry in the kernel export table .
Dumping the Export Table When exportfs When the command does not accept any options , A list of all currently exported directories will be output . use "-v" Option to output more details .
The following example exports /etc/exports and /etc/exports.d/*.exports Table of contents in , And it will be recorded /var/lib/nfs/etab in ,
Finally, it will be recorded in the kernel export table ： # exportfs -a export directory /usr/tmp to django host , And allow clients to send insecure file lock requests ： #
exportfs -o insecure_locks django:/usr/tmp uninstall /usr/tmp catalog ： # exportfs -u
django:/usr/tmp Uninstall all export lists ： # exportfs -au export /usr/tmp Catalog to IPv6 Local client for ： # exportfs
[fe80::]/64:/usr/tmp USAGE NOTES Exporting to IP networks or DNS and NIS
domains does not enable clients from these groups to access NFS immediately.
Rather, these sorts of exports are hints to rpc.mountd(8) to grant any mount
requests from these clients. This is usually not a problem, because any
existing mounts are preserved in rmtab across reboots. When unexporting a
network or domain entry, any current exports to members of this group wi- ll be
checked against the remaining valid exports and if they themselves are no
longer valid they will be removed. FILES /etc/exports input file listing
exports, export options, and access control lists /etc/exports.d directory
where extra input files are stored. Note: only files that end with .exports are
used. /var/lib/nfs/etab master table of exports /var/lib/nfs/rmtab table of
clients accessing server's exports SEE ALSO exports(5), rpc.mountd(8),
netgroup(5) AUTHORS Olaf Kirch <[email protected]> Neil Brown
<[email protected]> 30 September 2013 exportfs(8)
Here is NFS Related translation ：
translate ：man rpcbind(rpcbind Chinese Manual ) <http://www.cnblogs.com/f-ck-need-u/p/7302577.html>
translate ：man nfsd(rpc.nfsd Chinese Manual ) <http://www.cnblogs.com/f-ck-need-u/p/7302580.html>
translate ：man mountd(rpc.mountd Chinese Manual )
translate ：man statd(rpc.statd Chinese Manual ) <http://www.cnblogs.com/f-ck-need-u/p/7302593.html>
translate ：man sm-notify(sm-notify Command manual in Chinese )
translate ：man exportfs(exportfs Command manual in Chinese )
Partial translation ：man nfs <http://www.cnblogs.com/f-ck-need-u/p/7305755.html#blogmannfs>