Commit graph

174 commits

Author SHA1 Message Date
Rick Macklem 8f13abb4fd nfsd.8: Document ways to minimize Copy operation times
For NFSv4.2, a Copy operation can take a long time to complete.
If there is a concurrent ExchangeID or DelegReturn operation
which requires the exclusive lock on all NFSv4 state, this can
result in a stall of the nfsd server.

This patch documents ways to avoid this problem.

This is a content change.

Reviewed by:	karels, wollman, pauamma_gundo.com (manpages)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D44395
2024-03-18 15:40:41 -07:00
Daniel Ebdrup Jensen 45486372ca nfsv4(4): Reflow lines to 80 character limit
In belatedly fixing a mistake made in fbbdfa2b8a, I noticed that igor
and mandoc -Tlint had a few more things to say.

As such, I'm reflowing a few lines and fixing a contraction.

MFC with:	fbbdfa2b8a
2024-01-09 12:14:57 +01:00
Daniel Ebdrup Jensen c925f0720f nfsv4(4): Belatedly bump .Dd
I forgot to do it when making the commit, so hat-tip to asomers@

Reported by:	asomers@
Fixes:		fbbdfa2b8a (nfsv4(4): mention the nfsv4_server_only..)
MFC with:	fbbdfa2b8a
2024-01-09 12:14:56 +01:00
Lexi Winter fbbdfa2b8a nfsv4(4): mention the nfsv4_server_only setting
Add note about configuring the NFSv4-only option.

It is already mentioned in rc.conf(5), but documenting it here makes it
more likely that people see it when they need it.

MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1008
2024-01-06 19:21:25 +01:00
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00
Warner Losh 8a7b612037 usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:56 -07:00
John Baldwin eba230afba Purge more stray embedded $FreeBSD$ strings
These do not use __FBSDID but instead use bare char arrays.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41957
2023-09-25 07:54:56 -07:00
Warner Losh b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Rick Macklem a1254dcaa8 nfsd.8: Update for nfsd running in jails
Nfsd can now be run in an appropriately
configured vnet jail.

This man page update adds some information
for this case.

This is a content change.

Reviewed by:	karels, markj
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D39219
2023-03-29 14:58:47 -07:00
Rick Macklem fe5c211ba8 nfsd.c: Log a more meaningful failure message
For the cases where the nfsd(8) daemon is already running or
has failed to start within a prison due to an incorrect prison
configuration, the failure message logged is:
  Can't read stable storage file: operation not permitted

This patch replaces the above with more meaningful messages.
It depends on commit 10dff9da97 to differentiate between the
above two cases, however even without this commit, the messages
should be an improvement.

MFC after:	3 months
2023-02-22 14:09:15 -08:00
Gordon Bergling 40b245af0f pnfs.4: Fix a typo
- s/attrbute/attribute/

MFC after:3 days
2022-11-08 14:57:06 +01:00
Jens Schweikhardt e9e615c88a Fix dead references (wrong section) to sysctl(8). 2022-09-16 20:00:49 +02:00
Gordon Bergling a16977209b pnfsserver(4): Fix a typo in the manual page
- s/commmand/command/

MFC after:	3 days
2022-04-02 15:12:51 +02:00
Wolfram Schneider a0e33bbdc5 update URL 2022-02-05 17:35:24 +00:00
Gordon Bergling 4c87085d35 nfsd: Fix some issues found by mandoc
- consider using OS macro: Fx

Reviewed by:	bcr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31145
2021-07-12 06:31:54 +02:00
Emmanuel Vadot 081fb64492 pkgbase: Create a FreeBSD-nfs package
And move all the nfs related commands there.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D30754
Sponsored by:	Diablotin Systems
2021-06-19 17:49:50 +02:00
Rick Macklem b43fe9eb4b nfsd: silence rpcb_unset noise for NFSv4 only servers
An NFSv4 only configuration does not register with
rpcbind(). Without this patch a failure to rpcb_unset()
is reported when the daemon is terminated for this case.

This is harmless noise, but this patch avoids calling
rpcb_unset() for the NFSv4 only case, avoiding the noise.

When called with "-d", it still does the rpcb_unset(),
assuming that the configuration might have been
changed to NFSv4 only and unregistering with
rpcbind() might still be needed.

Reviewed by:	freqlabs
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D29449
2021-04-01 15:09:03 -07:00
Gordon Bergling 749ddf491b nfsv4(4): Fix a few issues reported by mandoc
- new sentence, new line
- function name without markup: rtalloc()
- function name without markup: VOP_RECLAIM()

MFC after:	1 week
2020-12-19 13:45:39 +00:00
Gordon Bergling ad5e10ec0c stablerestart(5): Fix some issues reported by mandoc
- New sentence, new line
2020-10-22 19:25:01 +00:00
Gordon Bergling 1f57220934 pnfsserver(4): Fix some issues reported by mandoc
- new sentence, new line
2020-10-22 19:19:42 +00:00
Gordon Bergling 3d265fce43 Fix a few mandoc issues
- skipping paragraph macro: Pp after Sh
- sections out of conventional order: Sh EXAMPLES
- whitespace at end of input line
- normalizing date format
2020-10-09 19:12:44 +00:00
Rick Macklem 9449898858 Update the man page to reflect the addition of NFSv4.2 (r355677).
Update all the references to NFSv4.1, so that they apply to NFSv4.1 and
NFSv4.2. Also, change the MDS->DS mounts to use NFSv4.2, so that both
versions of the protocol can be used against the server with pNFS enabled.

This is a content change.
2019-12-20 21:45:20 +00:00
Rick Macklem 452588d3e5 Update the man page to reflect the addition of NFSv4.2 (r355677).
Include references to NFSv4.2 and Flexible File layout, plus clarify
when vfs.nfsd.flexlinuxhack needs to be set for Linux pNFS clients.
Also update the man page to reflect the addition of SpaceUsed to the
attributes stored in the extended attribute on the MDS (r354158).

This is a content change.
2019-12-20 21:41:33 +00:00
Rick Macklem fa40c59d21 Update the man page to reflect the addition of NFSv4.2 (r355677).
Include references to NFSv4.2 and associated RFCs and note new features
present in NFSv4.2.

This is a content change.
2019-12-20 21:31:08 +00:00
Rick Macklem 1fd129c9ff Update the man page to reflect the addition of NFSv4.2 (r355677).
Include references to NFSv4.2 and associated RFCs.
Also clarify when a Linux client needs to set vfs.nfsd.flexlinuxhack if
a pNFS server is in use.

This is a content change.
2019-12-20 21:25:51 +00:00
Mateusz Piotrowski bc562d41f2 nfsd.8: Fix mandoc -Tlint and igor warnings
- Remove Tn macros
- Refernce sysctl(8) instead of sysctl(1)
- Start new sentences on new lines
- Capitalize NFS where needed
- Use Fx for FreeBSD
- Remove a list block (Bl) that was added to the manual page
  by accident in r335174

Reviewed by:	bcr
Approved by:	doc (bcr)
Differential Revision:	https://reviews.freebsd.org/D20215
2019-05-09 19:03:52 +00:00
Sean Eric Fagan c0ca37d17b Fix the usage error I introduced in r344192.
Specifically, I put the new option line in the wrong place, and then fixed
up the rest without realizing it.  This puts the usage statement back to
what it was, with an additional line for the new -V option.

Reported by:	mav
Sponsored by:	iXsystems Inc.
2019-02-21 22:49:39 +00:00
Sean Eric Fagan 025816d9ce Add support for a virtual hostname to nfsd
Specifically, this allows (via "-V vhostname") telling nfsd what principal
to use, instead of the hostname.  This is used at iXsystems for fail-over in
HA systems.

Reviewed by:	macklem
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D19191
2019-02-16 00:15:54 +00:00
Baptiste Daroussin 56b187fca8 nfsd: Factorize code
Factorize code by using struct sockaddr_storage to handle both ipv6 and ipv4

Discussed with:	rmacklem
Reviewed by:	manu
MFC after:	1 month
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D13223
2018-11-04 06:39:01 +00:00
Rick Macklem b8ac5c5a01 Fix a typo plus add a couple of sentences to pnfsserver.4.
This is a content change.
2018-08-09 00:15:28 +00:00
Rick Macklem 9725268c01 Add a reference to pnfsserver.4 to the nfsd.8 man page.
This is a content change.
2018-08-05 20:36:48 +00:00
Rick Macklem b11b70595a Update the pnfs.4 man page to reference the pnfsserver.4 man page.
This is a content change.
2018-08-05 20:20:04 +00:00
Rick Macklem 69934c3d64 Add pnfsserver.4 to the Makefile for nfsd. 2018-08-05 20:15:33 +00:00
Rick Macklem d47b206871 Add a man page that describes the setup of a pNFS service.
This is a content change.
2018-08-05 20:14:07 +00:00
Rick Macklem 076e3c1072 Update nfsd.8 for support of IPv6 addresses for hosts in the "-p" option.
r336795 adds support for handling of IPv6 addresses returned by getaddrinfo(3)
for DS hostnames. This updates the man page for this change.

This is a content change.
2018-07-27 23:38:31 +00:00
Rick Macklem 35f38de3c9 Add support for IPv6 addresses to the pNFS "-p" option.
This patch adds code to handle IPv6 addresses returned by getaddrinfo()
for the host entries in the "-p" command line argument.
If the IPv6 address is a link local address, only use it if it is the
only address for the host. This is done since there is no way to know
if the NFSv4.1 pNFS client is in the same scope zone as the MDS.
inet_ntop() is used for the IPv6 address translation, since the client
will have no use for the scope zone suffix and inet_ntop() does not
put this in the address string.

Discussed with:	bu7cher@yandex.ru
2018-07-27 23:10:28 +00:00
Rick Macklem eec5cbde71 Update the pnfs(4) man page.
This is a content change.
2018-07-10 22:53:07 +00:00
Rick Macklem 0479387e0a Document the "#mds_path" suffix for the "-p" command line option.
r335871 added support for an optional suffix of "#mds_path" that can be
applied to each entry in the "-p" option argument. This specifies that
the DS should be used to store files for the file system on the MDS
at "mds_path".
This patch documents this optional suffix.

This is a content change.
2018-07-02 19:33:26 +00:00
Rick Macklem ed46427268 Add an optional feature to the pNFS server.
Without this patch, the pNFS server distributes the data storage files across
all of the specified DSs.
A tester noted that it would be nice if a system administrator could control
which DSs are used to store the file data for a given exported MDS file system.
This patch adds an optional suffix for each entry in the "-p" option argument
that specifies "store file data for this MDS file system" in this DS.
The patch should only affect sites using the pNFS server (specified via the
"-p" command line option for nfsd.
The interface between the nfsd and the kernel has changed with this patch,
so anyone using the "-p" option needs to rebuild their nfsd from sources
with this patch applied to them.

Discussed with:	james.rose@framestore.com
2018-07-02 19:26:31 +00:00
Rick Macklem 2f800e5593 Add a safety belt assignment to the nfsd for when "-p" isn't specified.
The kernel code assumes that nfsdargs.addr == NULL and nfsdargs.addrlen == 0
when there is no "-p" argument used for starting the nfsd.
This small patch ensures this is the case. In practice, I believe this always
happened, since "nfsdargs" was the last element on the stack for "main()",
but this little patch ensures it will be the case.
Spotted by inspection while adding a new optional field for "-p".
2018-06-30 12:14:20 +00:00
Rick Macklem 203c00b359 Add a new man page that briefly describes the pNFS variant of the NFSv4.1
protocol.

This is a content change.
2018-06-14 21:12:08 +00:00
Rick Macklem 4c176e18d3 Document the "-p" and "-m" options added to nfsd.c by r335172.
This is a content change.
2018-06-14 20:55:33 +00:00
Rick Macklem 61a835e403 Add the "-p" and "-m" options to nfsd.c for the pNFS service.
The "-p" option specifies that the nfsd should run a pNFS service instead
of a regular NFS service. The "-m" option is only meaningful when used with
"-p" to specify that mirroring on the DSs should be done and on how many of
them.
This change requires the kernel changes committed as r334930.
The man page update will be committed as a separate commit soon.
2018-06-14 20:36:55 +00:00
Eitan Adler dae3a64fb9 userland: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:01 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Rick Macklem 6242e8c886 Update the nfsv4 man page to reflect recent changes to support
the newer RFCs (5661 and 7530). The main man changes are for the
case of "numbers in strings" for user/groups that RFC7530 allows
and avoids use of nfsuserd(8).

This is a content change.

Reviewed by:	trasz (earlier version)
MFC after:	1 week
2017-07-19 20:57:41 +00:00