Skip to content

Commit

Permalink
make-automaps: add -vers=4.0 to all nfs mounts
Browse files Browse the repository at this point in the history
Since a few days we have some severe nfs problems with the
server continuously logging "RPC request reserved 84 but used 276"
and the affected client blocking.

This may be related to the fact, that after the last update of nfs-utils
the mount.nfs command now supports nfs4.1 so that new mounts are done
with nfs4.1 (or nfs4.2 if the server kernel supports it) and not
with nfs4.0 as before.

Some bug reports on the internet suggest, that the problem does not
exist with nfs4.0 [1].

Change make-automaps to add -vers=4.0 to all location entries of all
maps. Experiments confirmed, that this (nfs-specific) option doesn not
interfere with bind mounts, when the location is on the local host.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1552037
  • Loading branch information
donald committed Jan 23, 2019
1 parent 8bff893 commit 9ccc432
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions make-automaps/make-automaps
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ sub convert_map {
sub parse_jbod_line {
my ($in,$source)=@_;
if ($in=~m"^(X\d+)\s+host==([^;]+);type:=link;fs:=/amd/\2/X/\1 host!=\2;type:=nfs;rhost:=\2;fs:=/amd/\2/x/\1;rfs:=/amd/\2/X/\1$") {
return "$1 $2:/amd/$2/X/$1";
return "$1 -vers=4.0 $2:/amd/$2/X/$1";
} elsif ($in=~m"^(C\d+)\s+host==([^;]+);type:=link;fs:=/amd/\2/C/\1 host!=\2;type:=nfs;rhost:=\2;fs:=/amd/\2/c/\1;rfs:=/amd/\2/C/\1$") {
return "$1 $2:/amd/$2/C/$1";
return "$1 -vers=4.0 $2:/amd/$2/C/$1";
} elsif ($in=~m"^(M\d+)\s+host==([^;]+);type:=link;fs:=/amd/\2/M/\1 host!=\2;type:=nfs;rhost:=\2;fs:=/amd/\2/m/\1;rfs:=/amd/\2/M/\1$") {
return "$1 $2:/amd/$2/M/$1";
return "$1 -vers=4.0 $2:/amd/$2/M/$1";
} elsif ($in=~m"^(X\d+)\s+-fs:=/amd/([^/]+)/X/\1 host==\2;type:=link host!=\2;type:=nfs;rhost:=\2") {
return "$1 $2:/amd/$2/X/$1";
return "$1 -vers=4.0 $2:/amd/$2/X/$1";
} else {
warn "?? $source : $_ ??";
}
Expand Down Expand Up @@ -68,8 +68,8 @@ sub parse_map_line {
return ();
}

sub parse_subkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key $host:$fs/$key" : undef; }
sub parse_nosubkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key $host:$fs" : undef; }
sub parse_subkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key -vers=4.0 $host:$fs/$key" : undef; }
sub parse_nosubkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key -vers=4.0 $host:$fs" : undef; }

sub create_pkg_map {
my $cache;
Expand All @@ -82,7 +82,7 @@ sub create_pkg_map {
/\S/ or next;
my ($pkg,$flags)=split ' ';
my $local="/var/pkg/$pkg";
my $rw = $flags eq 'BUILD' ? ' -rw' : '';
my $rw = $flags eq 'BUILD' ? ' -vers=4.0,rw' : ' -vers=4.0';
if (-d $local) {
print $out "$pkg$rw :$local\n";
} else {
Expand Down

0 comments on commit 9ccc432

Please sign in to comment.