The
exportfs
Command
259
formatted in the same way they are specified in
/etc/exports
. Refer to
Section 19.7, “The
/etc/
exports
Configuration File”
for more information on
/etc/exports
syntax. This option is often
used to test an exported file system before adding it permanently to the list of file systems to be
exported.
•
-i
— Ignores
/etc/exports
; only options given from the command line are used to define
exported file systems.
•
-u
— Unexports all shared directories. The command
/usr/sbin/exportfs -ua
suspends NFS
file sharing while keeping all NFS daemons up. To re-enable NFS sharing, type
exportfs -r
.
•
-v
— Verbose operation, where the file systems being exported or unexported are displayed in
greater detail when the
exportfs
command is executed.
If no options are passed to the
/usr/sbin/exportfs
command, it displays a list of currently
exported file systems.
For more information about the
/usr/sbin/exportfs
command, refer to the
exportfs
man page.
19.7.1.1. Using
exportfs
with NFSv4
The
exportfs
command is used in maintaining the NFS table of exported file systems. When typed
in a terminal with no arguments, the
exportfs
command shows all the exported directories.
Since NFSv4 no longer utilizes the
MOUNT
protocol, which was used with the NFSv2 and NFSv3
protocols, the mounting of file systems has changed.
An NFSv4 client now has the ability to see all of the exports served by the NFSv4 server as a single
file system, called the NFSv4 pseudo-file system. On Red Hat Enterprise Linux, the pseudo-file
system is identified as a single, real file system, identified at export with the
fsid=0
option.
For example, the following commands could be executed on an NFSv4 server:
mkdir /exports
mkdir /exports/opt
mkdir /exports/etc
mount --bind /usr/local/opt /exports/opt
mount --bind /usr/local/etc /exports/etc
exportfs -o fsid=0,insecure,no_subtree_check gss/krb5p:/exports
exportfs -o rw,nohide,insecure,no_subtree_check gss/krb5p:/exports/opt
exportfs -o rw,nohide,insecure,no_subtree_check gss/krb5p:/exports/etc
In this example, clients are provided with multiple file systems to mount, by using the
--bind
option
which creates unbreakeable links.
Because of the pseudo-file systems feature, NFS version 2, 3 and 4 export configurations are not
always compatible. For example, given the following directory tree:
/home /home/sam /home/john /home/joe
and the export:
Содержание ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Страница 22: ...xxii ...
Страница 28: ......
Страница 36: ...10 ...
Страница 40: ...14 ...
Страница 96: ...70 ...
Страница 116: ...90 ...
Страница 144: ...118 ...
Страница 146: ......
Страница 158: ...132 ...
Страница 165: ...Installing and Removing Packages 139 Figure 11 7 Installing and removing packages simultaneously ...
Страница 166: ...140 ...
Страница 172: ...146 ...
Страница 178: ......
Страница 228: ...202 ...
Страница 264: ...238 ...
Страница 318: ...292 ...
Страница 330: ...304 ...
Страница 388: ...362 ...
Страница 428: ...402 ...
Страница 452: ......
Страница 458: ...432 ...
Страница 476: ...450 ...
Страница 478: ...452 ...
Страница 494: ...468 ...
Страница 498: ...472 ...
Страница 530: ...504 ...
Страница 536: ...510 ...
Страница 544: ...Chapter 36 Log Files 518 Figure 36 7 Log file contents after five seconds ...
Страница 546: ......
Страница 550: ...524 ...
Страница 576: ......
Страница 584: ...558 ...
Страница 608: ......
Страница 776: ...750 ...
Страница 796: ...770 ...
Страница 800: ...774 ...
Страница 804: ......
Страница 806: ...780 ...
Страница 808: ...782 ...
Страница 816: ...790 ...
Страница 820: ...794 ...
Страница 822: ...796 ...
Страница 830: ...804 ...
Страница 836: ...810 ...
Страница 844: ...818 ...
Страница 848: ...822 ...