summaryrefslogtreecommitdiffstats
path: root/utils/exportfs
diff options
context:
space:
mode:
authorneilbrown <neilbrown>2003-07-17 23:41:19 +0000
committerneilbrown <neilbrown>2003-07-17 23:41:19 +0000
commitbce6f6871f481087890674497b4b2154dc4825fc (patch)
tree51858d7b5ef07ed1244d29856698418756f4b8c3 /utils/exportfs
parent3094278cd11c3c18d5426210e09e3c903a7a41a3 (diff)
downloadnfs-utils-bce6f6871f481087890674497b4b2154dc4825fc.tar.gz
nfs-utils-bce6f6871f481087890674497b4b2154dc4825fc.tar.xz
nfs-utils-bce6f6871f481087890674497b4b2154dc4825fc.zip
Release 1.0.5
Diffstat (limited to 'utils/exportfs')
-rw-r--r--utils/exportfs/exportfs.c10
-rw-r--r--utils/exportfs/exportfs.man38
2 files changed, 42 insertions, 6 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index fe0f6ba..cbb0aa9 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -91,16 +91,22 @@ main(int argc, char **argv)
fprintf(stderr, "exportfs: -r and -u are incompatible.\n");
return 1;
}
+ new_cache = check_new_cache();
if (optind == argc && ! f_all) {
if (force_flush) {
- cache_flush(1);
+ if (new_cache)
+ cache_flush(1);
+ else {
+ fprintf(stderr, "exportfs: -f: only available with new cache controls: mount /proc/fs/nfs first\n");
+ exit(1);
+ }
+ return 0;
} else {
xtab_export_read();
dump(f_verbose);
return 0;
}
}
- new_cache = check_new_cache();
if (f_export && ! f_ignore)
export_read(_PATH_EXPORTS);
diff --git a/utils/exportfs/exportfs.man b/utils/exportfs/exportfs.man
index 510c48f..7d18509 100644
--- a/utils/exportfs/exportfs.man
+++ b/utils/exportfs/exportfs.man
@@ -2,8 +2,8 @@
.\" exportfs(8)
.\"
.\" Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
-.\" Modifications 1999 Neil Brown <neilb@cse.unsw.edu.au>
-.TH exportfs 8 "7 Sep 1999"
+.\" Modifications 1999-2003 Neil Brown <neilb@cse.unsw.edu.au>
+.TH exportfs 8 "18 July 2003"
.SH NAME
exportfs \- maintain list of NFS exported file systems
.SH SYNOPSIS
@@ -15,6 +15,8 @@ exportfs \- maintain list of NFS exported file systems
.br
.BI "/usr/sbin/exportfs [-v]
.br
+.BI "/usr/sbin/exportfs -f"
+.br
.SH DESCRIPTION
The
.B exportfs
@@ -39,7 +41,30 @@ without modifying
using
.BR exportfs .
.P
-Any export requests which identify a specific host (rather than a
+.B exportfs
+and it's partner program
+.B mountd
+work in one of two modes, a legacy mode which applies to 2.4 and
+earlier versions of the Linux kernel, and a new mode which applies to
+2.6 and later versions providing the
+.B nfsd
+virtual filesystem has been mounted at
+.BR /proc/fs/nfs .
+If this filesystem is not mounted in 2.6, the legacy mode is used.
+.P
+In the new mode,
+.B exportfs
+does not give any information to the kernel but only provides it to
+.B mountd
+through the
+.B /var/lib/nfs/xtab
+file.
+.B mountd
+will listen to requests from the kernel and will provide information
+as needed.
+.P
+In the legacy mode,
+any export requests which identify a specific host (rather than a
subnet or netgroup etc) are entered directly into the kernel's export
table as well as being written to
.BR /var/lib/nfs/xtab .
@@ -71,10 +96,15 @@ with /etc/exports. It removes entries in /var/lib/nfs/xtab
which are deleted from /etc/exports, and remove any entries from the
kernel export table which are no longer valid.
.TP
-.TP
.B -u
Unexport one or more directories.
.TP
+.B -f
+In 'new' mode, flush everything out of the kernels export table. Any
+clients that are active will get new entries added by
+.B mountd
+when they make their next request.
+.TP
.B -v
Be verbose. When exporting or unexporting, show what's going on. When
displaying the current export list, also display the list of export