| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
but not containing the nfs/<FQDN> principal
The nfs-client.target requires the auth-rpcgss-module.service, which in
turn requires the rpc-svcgssd.service. However, the rpc.svcgssd daemon
is unnecessary for an NFS client, even when using Kerberos security.
Moreover, starting this daemon with its default configuration will fail
when no nfs/<host>@REALM principal is in the Kerberos keytab. Thus,
resulting in a degraded system state for NFS client configurations
without nfs/<host>@REALM principal in the Kerberos keytab. However, this
is a perfectly valid NFS client configuration as the nfs/<host>@REALM
principal is not required for mounting NFS file systems. This is even
the case when Kerberos security is enabled for the mount!
Installing the gssproxy package hides this problem as this disables the
rpc-svcgssd.service.
Link: http://bugs.debian.org/985002
Link: https://salsa.debian.org/kernel-team/nfs-utils/-/merge_requests/23
Signed-off-by: Joachim Falk <joachim.falk@gmx.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151971
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151966
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
autoconf AC_SYS_LARGEFILE is used by configure to add needed defines
when needed for enabling 64bit off_t, therefore replacing statfs64 with
statfs should be functionally same. Additionally this helps compiling
with latest musl where 64bit LFS functions like statfs64 and friends are
now moved under _LARGEFILE64_SOURCE feature test macro, this works on
glibc systems because _GNU_SOURCE macros also enables
_LARGEFILE64_SOURCE indirectly. This is not case with musl and this
latest issue is exposed.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JianHong reported some strange behavior with automounts on an nfs server
without an explicit pseudoroot. When clients issued a readdir in the
pseudoroot, automounted directories that were not yet mounted would show
up even if they weren't exported, though the clients wouldn't be able to
do anything with them.
The issue was that triggering the automount on a directory would cause
the mountd upcall to time out, which would cause nfsd to include the
automounted dentry in the readdir response. Eventually, the automount
would work and report that it wasn't exported and subsequent attempts to
access the dentry would (properly) fail.
We never want mountd to trigger an automount. The kernel should do that
if it wants to use it. Change the junction checks to do an O_PATH open
and use fstatat with AT_NO_AUTOMOUNT.
Cc: Chuck Lever <chuck.lever@oracle.com>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2148353
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216777
Reported-by: JianHong Yin <jiyin@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Also remove double spaces.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only try to load the auth_rpcgss kernel module if we are not executing
inside a Linux container. Otherwise, the auth-rpcgss-module service will
fail inside a Linux container as the loading of kernel modules is
forbidden for the container. Thus, the "/sbin/modprobe -q auth_rpcgss"
call will fail even if the auth_rpcgss kernel module is already loaded.
This situation occurs when the container host has already loaded the
auth_rpcgss kernel module to enable kerberized NFS service for its
containers. This behavior has been tested with kmod up to version
30+20220630-3 (current in bookworm as of 2022-09-20).
Bug-Debian: http://bugs.debian.org/985000
Discussion-Debian: https://salsa.debian.org/kernel-team/nfs-utils/-/merge_requests/7
Signed-off-by: Joachim Falk <joachim.falk@gmx.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
modules are loaded
sysctl settings (e.g. /etc/sysctl.conf and others) are normally loaded
once at boot. If the module that implements some settings is no yet
loaded, those settings don't get applied.
Various NFS modules support various sysctl settings. If they are loaded
after boot, they miss out.
Add a new udev rule configuration to udev/rules.d/60-nfs.rules to apply
the relevant settings when the modules are loaded.
Placing it in the systemd directory similarly as the choice for the
original commit afc7132dfb21 ("systemd: Apply all sysctl settings when
NFS-related modules are loaded").
Link: https://lore.kernel.org/linux-nfs/Y1KoKwu88PulcokW@eldamar.lan/
Link: https://bugs.debian.org/1022172
Link: https://bugs.debian.org/1024082
Suggested-by: Marco d'Itri <md@linux.it>
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit afc7132dfb212ac1f676a5ac36d29a9e06325645.
The approach caused problems with sysctl from busybox and with kmod as
reported in Debian (https://bugs.debian.org/1024082).
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 5e60e38aa4ba251ef66610514be5f45c41519e0f.
This is part of the full revert of adding support via modprobe.d
configuration to set sysctl settings of NFS-related modules when loading
the modules.
The approach caused problems with sysctl from busybox and with kmod as
reported in Debian (https://bugs.debian.org/1024082).
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7d76dd2e6f09a141eb6303b7343baa5c4f9c85ad.
This is part of the full revert of adding support via modprobe.d
configuration to set sysctl settings of NFS-related modules when loading
the modules.
The approach caused problems with sysctl from busybox and with kmod as
reported in Debian (https://bugs.debian.org/1024082).
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NFSv4.1 and later require the server to report a "scope". Servers with
the same scope are expected to understand each other's state ids etc,
though may not accept them - this ensure there can be no
misunderstanding. This is helpful for migration.
Servers with different scope are known to be different and if a server
appears to change scope on a restart, lock recovery must not be
attempted.
It is important for fail-over configurations to have the same scope for
all server instances. Linux NFSD sets scope to host name. It is common
for fail-over configurations to use different host names on different
server nodes. So the default is not good for these configurations and
must be over-ridden.
As discussed in
https://github.com/ClusterLabs/resource-agents/issues/1644
some HA management tools attempt to address this with calls to "unshare"
and "hostname" before running "rpc.nfsd". This is unnecessarily
cumbersome.
This patch adds a "-S" command-line option and nfsd.scope config value
so that the scope can be set easily for nfsd.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Without device specification, mount tries to mount an entry
from the /etc/fstab file. Hence, specify target "nfsd" to
make this command executable from the command line.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
From: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Also remove unneeded spaces.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When started nfs-blkmap.service, the PID file can't be opened, The
cause is that the child process does not create the PID file before
the systemd reads the PID file.
Adding "ExecStartPost=/bin/sleep 0.1" to
/usr/lib/systemd/system/nfs-blkmap.service will probably solve this
problem, However, there is no guarantee that the above solutions are
effective under high cpu pressure.So replace the daemon function with
the fork function, and put the behavior of creating the PID file in
the parent process to solve the above problems.
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Update the man page to explicitly say setting
nfsv4=n turns off all v4 versions
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Later kernel versions convert NFS readpages to readahead so update
the counts accordingly.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
In function nfs_parse_square_bracket, hostname could be NULL,
dereferencing it in free(*hostname) may cause an unexpected segfault.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2136807
Signed-off-by: Zhi Li <yieli@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The serial->data is not malloced separately (just part of
the serial), so it can't be freed. The bl_serial has its
own free function. Use it.
Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the example /etc/nfs.conf file, most sections include
a commented-out 'debug = 0' line, suggesting that '0' is
the default. In addition, the manpages for some of the
utilities state that debugging can be enabled by setting
'debug = 1' in the nfs.conf file.
However, neither '0' nor '1' is accepted as a valid option
for 'debug' while parsing the nfs.conf file.
Add '0' and '1' to the valid strings when parsing 'debug',
with '0' not changing any debugging settings, and '1'
enabling all debugging.
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
regex.c:545:43: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
struct trans_func *libnfsidmap_plugin_init()
^
void
See: 167f2336b06e1bcbf26f45f2ddc4a535fed4d393
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows to make libmount not mandatory but depending on nfsrahead
since it only requires it. This is useful when cross-compiling because
in that case we need rpcgen only built for host but not nfsrahead that
also require libmount. So this reduces the dependencies for host
building.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The systemctl stop nfs-blkmap.service will sends the SIGTERM signal
to the nfs-blkmap.service first.If the process fails to be stopped,
it sends the SIGKILL signal again to kill the process.
However, exit(1) is executed in the SIGTERM processing function of
nfs-blkmap.service. As a result, systemd receives an error message
indicating that nfs-blkmap.service failed.
"Active: failed" is displayed when the systemctl status
nfs-blkmap.service command is executed.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-lmount must preceed -lblkid and to obtain this let's add in configure.ac:
PKG_CHECK_MODULES([LIBMOUNT], [mount])
and in tools/nfsrahead/Makefile.am let's substitute explicit `-lmount`
with:
$(LIBMOUNT_LIBS)
This way all the required libraries will be present and in the right order
when static linking.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Clang is now erroring out on functions with out parameter types
Fixes errors like
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
simplify the check, stat() return 0 on success -1 on failure
Fixes clang reported errors e.g.
| v4clients.c:29:6: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
| if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
| ^ ~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `systemctl stop rpcbind.socket` is run, the dependency means
that systemd first sends SIGTERM to rpcbind, then sigterm to rpc.statd.
On SIGTERM, rpcbind tears down /var/run/rpcbind.sock. However,
rpc-statd on SIGTERM attempts to unregister from rpcbind
systemd needs to wait for rpc.statd to exit before sending
SIGTERM to rpcbind
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2100395
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Commit 7f8463fe fixed a warning but introduce
a regression by not allocating enough space
for the pipefs-directory buffer when it is
not the default.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2106896
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Debian seems to prefer /lib/modprobe.d - at lease sometimes.
So allow
./configure --with-modprobedir=/lib/modprobe.d
to work, but default to /usr/lib/modprobe.d
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there is an error running sysctl, a modprobe of these modules will
fail. We probably don't want that - missing a sysctl is unlikely to be
fatal.
A real possibility is that /sbin/sysctl might not exist at all,
such as in a initramfs. In that case we definitely don't want modprobe
to fail.
So make the scriptlets safe.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
There seem to be some undocumented options implemented.
Why not mention them in the man page?
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
It's a little irritating to only see the template "<...>@<...>" if you
set a specific principal name. So let's show it (if set).
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
This patch fixes a bug when trying to set "principal" in /etc/nfs.conf.
Memory gets freed by conf_cleanup() before being used - moving cleanup
code resolves that.
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent autoconf don't like variables in AC_CHECK_INCLUDE so we get a
warning.
In libtirpc.m4 we only need to check for the existence of a file, we
don't need to extra support for includes, such as defining HAVE_TIRPC_H
or whatever.
So change from AC_CHECK_INCLUDE to AC_CHECK_FILE.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenSUSE recently updated autoconf to v2.71, and nfs-utils now doesn't
build. This patch fixes it - mostly.
This patch is the result of:
- running autoupdate on configure.am and aclocal/*
- removing any sections add that say they can safely be removed
- revertion the change to AC_PREREQ.
I haven't confirmed that it still works with v2.59. It does seem to
work with 2.69 at least.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sysctl settings (e.g. /etc/sysctl.conf and others) are normally loaded
once at boot. If the module that implements some settings is no yet
loaded, those settings don't get applied.
Various NFS modules support various sysctl settings. If they are loaded
after boot, they miss out.
So add commands to modprobe.d/50-nfs.conf to apply the relevant settings
when the module is loaded.
I have placed this in the "systemd" directory because it seemed the
least bad choice.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
'main' xprts cannot be set offline or removed, so print a helpful error
message in this case instead of a cryptic 'invalid argument' message.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Otherwise the tool will tell us:
'Namespace' object has no attribute 'set_state'
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel major version does not always provide 100% certainty about
presence or absence of a feature, for example:
- some distros backport feature from mainstream kernel to older kernels
- if NFS server is run inside a system container the reported kernel
version inside the container may be faked
So let's determine the feature presence by checking
'/proc/fs/nfsd/clients/' directory presence instead of checking the
kernel version.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While compiling for aarch64, the compiler throws the warning below
because char is unsigned for aarch64.
main.c: In function ?main?:
main.c:145:48: warning: comparison is always true due to limited range of data type [-Wtype-limits]
145 | while((opt = getopt(argc, argv, "dF")) != -1) {
|
This makes nfsrahead to run forever. Fix opt type to the same as getopt
type.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2083926
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Logging was not working properly wrt verbosity, it is changed by
changing the facilities used. While at logging, add some extra logs when
verbose that may be important.
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
brtfs uses a non standard naming scheme for its fs structures, which
causes nfsrahead to take a long time scanning all the memory
available and then crashes. This causes the udev to take forever to
quiesce and delays the system startup.
This t=patch refactors the way the device number is obtained to handle
this situation.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2078147
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The nfsidmap manual page is supposed to be in section 8, but calls the
.TH macro with a section argument of 5. This results in an incorrect
header and causes debhelper (in Debian) to install it in the section 5
directory. Fix that.
Signed-off-by: Ben Hutchings <benh@debian.org>
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Sometimes the mountinfo entry is not available when nfsrahead is called,
leading to failure to set the readahead. Retry getting the device before
failing.
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Add the man page for nfsrahead, and add the new section to nfs.conf.
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Thiago Becker <tbecker@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|