Enable inter server to server copies on a export
Subsystems (3)
cover Enable inter server to server copies on a export
This kernel patch and an upcoming nfs-utils patch adds a new export option 's2sc' which will allow inter server to server copies.
The option needs to be set on the destination server.
The idea behind the option is to allow admins the ability to control which export can do these types of copies.
Steve Dickson (1):
nfsd4_copy: Adds the ability to do inter server to server on an export
fs/nfsd/nfs4proc.c | 3 ++- include/uapi/linux/nfsd/export.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.31.1
PATCH 1/1 nfsd4_copy: Adds the ability to do inter server to server on an export
This adds the 's2sc' export option allowing inter server to server copies on the destination server.
--- fs/nfsd/nfs4proc.c | 3 ++- include/uapi/linux/nfsd/export.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
fs/nfsd/nfs4proc.c +2 -1
@@ -1654,9 +1654,10 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,struct nfsd4_copy *copy = &u->copy;__be32 status;struct nfsd4_copy *async_copy =NULL ; +int s2sc = (cstate->current_fh.fh_export->ex_flags &NFSEXP_S2SC );if (!copy->cp_intra) {/* Inter server SSC */ -if (!inter_copy_offload_enable || copy->cp_synchronous) { +if (s2sc ==0 && (!inter_copy_offload_enable || copy->cp_synchronous)) { status = nfserr_notsupp; goto out; }
include/uapi/linux/nfsd/export.h +1 -0
@@ -53,6 +53,7 @@*/ #define NFSEXP_V4ROOT 0x10000#define NFSEXP_PNFS 0x20000 +#define NFSEXP_S2SC 0x40000/* All flags that we claim to support. (Note we don't support NOACL.) */ #define NFSEXP_ALLFLAGS 0x3FEFF
Signature · 1 line
2.31.1
Quoted 3 lines · Steve Dickson
This kernel patch and an upcoming nfs-utils patch adds a new export option 's2sc' which will allow inter server to server copies.
They're already allowed by a module option. Why is an export option better? And why should it be set on the destination server and not the source server?
Really, first I think we should try to identify what the problem is that we're trying to solve.
--b.
Quoted 16 lines
The option needs to be set on the destination server.
The idea behind the option is to allow admins the ability to control which export can do these types of copies.
Steve Dickson (1):
nfsd4_copy: Adds the ability to do inter server to server on an exportfs/nfsd/nfs4proc.c | 3 ++- include/uapi/linux/nfsd/export.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)Signature · 1 line
2.31.1
Quoted 11 lines · bfields
Quoted 3 lines · Steve Dickson
This kernel patch and an upcoming nfs-utils patch
adds a new export option 's2sc' which will allow
inter server to server copies.They're already allowed by a module option. Why is an export option better? And why should it be set on the destination server and not the source server?
Really, first I think we should try to identify what the problem is that we're trying to solve.
I guess we're thinking: we expect server-to-server copy to be a win in some cases, but not others.
What would those cases look like?
Say you've got a client "C" and two servers, "S" and "T", and C is copying a file from S to T.
I'd expect bandwidth of the traditional read-write-loop copy to be the minimum of the network bandwidth between S and C, and the network bandwidth between C and T. Are there common cases were the S-to-T bandwidth would be significantly less than both of those?
My guess would've been that that's relatively unusual. So as a first pass, just turning on COPY unconditionally doesn't seem so bad.
I know you're thinking about in cases where S and T are connected by a high-performance network not necessarily available to C.
In that case, we know we want to use server-to-server copy for copies between S and T. But is it necessarily a problem to also use it for copies between some other server and T? Also, does knowing the export containing the destination file on T really tell you whether or not the copy will be coming from S and not from some other server?
I'd think the bigger issue in that case is figuring out how to configure S so that it returns the right IP address in the cnr_source_server field of the COPY_NOTIFY reply. Currently we return address that the client sent the COPY_NOTIFY, and I don't know if that's correct for that case.
--b.
Quoted 10 lines · J. Bruce Fields
Quoted 9 lines · bfields
Quoted 3 lines · Steve Dickson
This kernel patch and an upcoming nfs-utils patch
adds a new export option 's2sc' which will allow
inter server to server copies.They're already allowed by a module option. Why is an export option better? And why should it be set on the destination server and not the source server?
Quoted 5 lines
Quoted 2 lines
Really, first I think we should try to identify what the problem is that we're trying to solve.
I guess we're thinking: we expect server-to-server copy to be a win in some cases, but not others.
Right!
Quoted 10 lines
What would those cases look like?
Say you've got a client "C" and two servers, "S" and "T", and C is copying a file from S to T.
I'd expect bandwidth of the traditional read-write-loop copy to be the minimum of the network bandwidth between S and C, and the network bandwidth between C and T. Are there common cases were the S-to-T bandwidth would be significantly less than both of those?
I was thinking the connection between S-to-T would be much faster (come type of cluster interconnect) that the connection between C-S or C-T.
Quoted 6 lines
My guess would've been that that's relatively unusual. So as a first pass, just turning on COPY unconditionally doesn't seem so bad.
I know you're thinking about in cases where S and T are connected by a high-performance network not necessarily available to C.
Exactly... well said.
Quoted 6 lines
In that case, we know we want to use server-to-server copy for copies between S and T. But is it necessarily a problem to also use it for copies between some other server and T? Also, does knowing the export containing the destination file on T really tell you whether or not the copy will be coming from S and not from some other server?
No... All the export is doing is allowing the COPY request to succeed. I don't think T has any idea where the COPY is coming from... but you would know better that I :-)
Quoted 5 lines
I'd think the bigger issue in that case is figuring out how to configure S so that it returns the right IP address in the
cnr_source_serverfield of theCOPY_NOTIFYreply. Currently we return address that the client sent theCOPY_NOTIFY, and I don't know if that's correct for that case.
I didn't look at this part of the transaction since it was not controlled by the module param... But How would S know its the "right IP address" since it is C that did the mount to T and is giving S the address?
Keeping in context of what I'm trying to do... All I'm trying to do is enable the feature, and with your points, I think you are making my case there should be an alternate of enabling these copies.
steved.
Hey!
Quoted 7 lines · J. Bruce Fields
Quoted 3 lines · Steve Dickson
This kernel patch and an upcoming nfs-utils patch adds a new export option 's2sc' which will allow inter server to server copies.
They're already allowed by a module option. Why is an export option better?
I was talking with an old admin... that you might know :-) and he was suggestion he would what to control which export used these types of copies... And I agreed with him.
Quoted 2 lines
And why should it be set on the destination server and not the source server?
Maybe I'm missing something... but I believe nfsd4_copy() is only called on the destination server since it is the only function that looks at the inter_copy_offload_enable param.
Quoted 3 lines
Really, first I think we should try to identify what the problem is that we're trying to solve.
I'm not trying to solve any problem... I'm just trying to enable a feature in a sane and safe way. By only have one module param it is on all the time on all copies... With an export opt, admins can pick and choose which exports use it. I'm thinking that is a bit less risky.
The option of setting the inter_copy_offload_enable is still there... if admins want to go that route.
steved.
Quoted 20 lines
--b.
Quoted 16 lines
The option needs to be set on the destination server.
The idea behind the option is to allow admins the ability to control which export can do these types of copies.
Steve Dickson (1):
nfsd4_copy: Adds the ability to do inter server to server on an exportfs/nfsd/nfs4proc.c | 3 ++- include/uapi/linux/nfsd/export.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)Signature · 1 line
2.31.1
Quoted 8 lines · Steve Dickson
Quoted 2 lines · J. Bruce Fields
Really, first I think we should try to identify what the problem is that we're trying to solve.
I'm not trying to solve any problem... I'm just trying to enable a feature in a sane and safe way. By only have one module param it is on all the time on all copies... With an export opt, admins can pick and choose which exports use it. I'm thinking that is a bit less risky.
So, I'm not sure which risk you're thinking about.
If it's the risk of the client telling the destination server to copy from a rogue server--I'm kind of regretting bringing that up. If there are bugs in that area, I'd rather they be fixed, than that we introduce new configuration to work around bugs that may or may not exist. They'd need to be fixed anyway, for other reasons. I think Dai has volunteered to look through the code that handles replies to the small number of operations concerned, and I think that's good enough due diligence. And I'm not getting the impression Trond is particularly worried about the client code here either.
If the risk is performance--like I say, I'm not sure exactly what those cases look like.
I've been thinking about it in terms of bandwidth, but maybe that's wrong--the bigger problem may be when the source server is only accessible to the client for some reason (like, you're copying from a local server to a destination server that's outside a firewall). Maybe the destination server will end up waiting a long time trying to reach the source.
But, again, I'm not sure an export option helps, because I don't see why that problem would necessarily be per-destination-server-export.
Instead, we may just need to make sure the destination server is quick to timeout, or has some mechanism to blacklist source servers so it's not repeatedly timing out trying to copy from the same server. I don't know, I'm just thinking out loud.
Quoted 2 lines
The option of setting the
inter_copy_offload_enableis still there... if admins want to go that route.
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
It's not as though turning on a module option is any more difficult than setting an export option.
--b.
Quoted 11 lines · J. Bruce Fields
Quoted 8 lines · Steve Dickson
Quoted 2 lines · J. Bruce Fields
Really, first I think we should try to identify what the problem is that we're trying to solve.
I'm not trying to solve any problem... I'm just trying to enable a feature in a sane and safe way. By only have one module param it is on all the time on all copies... With an export opt, admins can pick and choose which exports use it. I'm thinking that is a bit less risky.
So, I'm not sure which risk you're thinking about.
Now, I don't know how often a client copies files from one server to another... but change the path on all those copies... without making the admins aware that is happening... is the risk I'm thinking about.
Quoted 10 lines
If it's the risk of the client telling the destination server to copy from a rogue server--I'm kind of regretting bringing that up. If there are bugs in that area, I'd rather they be fixed, than that we introduce new configuration to work around bugs that may or may not exist. They'd need to be fixed anyway, for other reasons. I think Dai has volunteered to look through the code that handles replies to the small number of operations concerned, and I think that's good enough due diligence. And I'm not getting the impression Trond is particularly worried about the client code here either.
I agree we should fix the bugs is better than working around them. But having the bug effect all these types of copies verses a few of them on a select number of exports... We still would see the bugs.
Quoted 3 lines
If the risk is performance--like I say, I'm not sure exactly what those cases look like.
Well Jorge seem to show there was a was a big performance gain [1]
Quoted 10 lines
I've been thinking about it in terms of bandwidth, but maybe that's wrong--the bigger problem may be when the source server is only accessible to the client for some reason (like, you're copying from a local server to a destination server that's outside a firewall). Maybe the destination server will end up waiting a long time trying to reach the source.
But, again, I'm not sure an export option helps, because I don't see why that problem would necessarily be per-destination-server-export.
It helps enabling the technology without out the big hammer approach. Allowing these type of copies on a couple exports verses all exports would still show any problem.
Quoted 5 lines
Instead, we may just need to make sure the destination server is quick to timeout, or has some mechanism to blacklist source servers so it's not repeatedly timing out trying to copy from the same server. I don't know, I'm just thinking out loud.
This sounds like you not happy with the design... And it appears where is there today is what the RPC specified... Again... I'm just trying to enable it...
Quoted 7 lines
Quoted 3 lines
The option of setting the
inter_copy_offload_enableis still there... if admins want to go that route.Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented and it more if a stick you toe in the pool verses jumping in...
steved.
Quoted 4 lines
It's not as though turning on a module option is any more difficult than setting an export option.
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Quoted 2 lines
and it more if a stick you toe in the pool verses
jumping in...
If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Let's document the module parameter and go with that for now.
--b.
Hey!
Quoted 9 lines · J. Bruce Fields
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
Quoted 9 lines
Quoted 3 lines
and it more if a stick you toe in the pool verses
jumping in...If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Let's document the module parameter and go with that for now.
Now that cp will use copy_file_range() when available, what are the steps needed to enable these fast copies?
steved.
Quoted 8 lines · Steve Dickson
Hey!
Quoted 5 lines · J. Bruce Fields
Quoted 4 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
and it more if a stick you toe in the pool verses
jumping in...If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Let's document the module parameter and go with that for now.
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?
1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
--b.
Quoted 15 lines · J. Bruce Fields
Quoted 11 lines · Steve Dickson
Hey!
Quoted 8 lines · J. Bruce Fields
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Aren't sysctls documented under Documentation/ ?
Quoted 14 lines
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
and it more if a stick you toe in the pool verses
jumping in...If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Let's document the module parameter and go with that for now.
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
Quoted 7 lines
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
--b.
--
Chuck Lever
Quoted 20 lines · Chuck Lever III
Quoted 20 lines · J. Bruce Fields
Quoted 15 lines · Steve Dickson
Hey!
Quoted 9 lines · J. Bruce Fields
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
Quoted 5 lines
Quoted 3 lines
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Aren't sysctls documented under
Documentation/?No... there is aDocumentation/admin-guide/sysctl/sunrpc.rst
but it talks about rpcdebug commands and there is nothing that documents the module parameters under Documentation/filesystems/nfs
steved.
Quoted 29 lines
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
and it more if a stick you toe in the pool verses
jumping in...Quoted 7 lines
Quoted 5 lines
If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Let's document the module parameter and go with that for now.
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
Quoted 7 lines
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
--b.
--
Chuck Lever
Quoted 20 lines · Chuck Lever III
Quoted 20 lines · J. Bruce Fields
Quoted 15 lines · Steve Dickson
Hey!
Quoted 9 lines · J. Bruce Fields
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
Quoted 5 lines
Quoted 3 lines
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Aren't sysctls documented under
Documentation/?
Sorry, I meant "module parameter". Anyway, yes, looks like both are listed in Documentation/admin-guide/kernel-parameters.txt.
Might be nice if these were in a man page too somewhere, but maybe that's not the most important thing these days.
--b.
Documentation/admin-guide/kernel-parameters.txt +14 -0
@@ -3243,6 +3243,19 @@ driver. A non-zero value sets the minimum interval in seconds between layoutstats transmissions. + nfsd.inter_copy_offload_enable = + [NFSv4.2] When set to 1, the server will support + server-to-server copies for which this server is + the destination of the copy. + + nfsd.nfsd4_ssc_umount_timeout = + [NFSv4.2] When used as the destination of a + server-to-server copy, knfsd temporarily mounts + the source server. It caches the mount in case + it will be needed again, and discards it if not + used for the number of milliseconds specified by + this parameter. + nfsd.nfs4_disable_idmapping= [NFSv4] When set to the default of '1', the NFSv4 server will return only numeric uids and gids to
@@ -3250,6 +3263,7 @@ and gids from such clients. This is intended to ease migration from NFSv2/v3. + nmi_backtrace.backtrace_idle [KNL] Dump stacks even of idle CPUs in response to an NMI stack-backtrace request.
Quoted 61 lines · Bruce Fields
Quoted 20 lines · Chuck Lever III
Quoted 20 lines · J. Bruce Fields
Quoted 15 lines · Steve Dickson
Hey!
Quoted 9 lines · J. Bruce Fields
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
Quoted 5 lines
Quoted 3 lines
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Aren't sysctls documented under
Documentation/?Sorry, I meant "module parameter". Anyway, yes, looks like both are listed in
Documentation/admin-guide/kernel-parameters.txt.Might be nice if these were in a man page too somewhere, but maybe that's not the most important thing these days.
--b.
Documentation/admin-guide/kernel-parameters.txt +13
-0@@ -3243,6 +3243,19 @@ driver. A non-zero value sets the minimum interval in seconds between layoutstats transmissions. + nfsd.inter_copy_offload_enable = + [NFSv4.2] When set to 1, the server will support + server-to-server copies for which this server is + the destination of the copy. + + nfsd.nfsd4_ssc_umount_timeout = + [NFSv4.2] When used as the destination of a + server-to-server copy, knfsd temporarily mounts + the source server. It caches the mount in case + it will be needed again, and discards it if not + used for the number of milliseconds specified by + this parameter. + nfsd.nfs4_disable_idmapping= [NFSv4] When set to the default of '1', the NFSv4 server will return only numeric uids and gids to
Documentation/admin-guide/kernel-parameters.txt line 3269
Quoted 7 lines
Documentation/admin-guide/kernel-parameters.txt +1
-0@@ -3250,6 +3263,7 @@ and gids from such clients. This is intended to ease migration from NFSv2/v3. + nmi_backtrace.backtrace_idle [KNL] Dump stacks even of idle CPUs in response to an NMI stack-backtrace request.
Interesting... I don't see these in the Linus tree I'm looking at [1] find Documentation/ -type f | xargs grep -i inter_copy_offload_enable
steved
[1] git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Quoted 28 lines · Steve Dickson
Quoted 25 lines · Bruce Fields
Documentation/admin-guide/kernel-parameters.txt +13
-0@@ -3243,6 +3243,19 @@ driver. A non-zero value sets the minimum interval in seconds between layoutstats transmissions. + nfsd.inter_copy_offload_enable = + [NFSv4.2] When set to 1, the server will support + server-to-server copies for which this server is + the destination of the copy. + + nfsd.nfsd4_ssc_umount_timeout = + [NFSv4.2] When used as the destination of a + server-to-server copy, knfsd temporarily mounts + the source server. It caches the mount in case + it will be needed again, and discards it if not + used for the number of milliseconds specified by + this parameter. + nfsd.nfs4_disable_idmapping= [NFSv4] When set to the default of '1', the NFSv4 server will return only numeric uids and gids to@@ -3250,6 +3263,7 @@ and gids from such clients. This is intended to ease
Quoted 8 lines
Documentation/admin-guide/kernel-parameters.txt
Quoted 6 lines
Documentation/admin-guide/kernel-parameters.txt +1
-0migration from NFSv2/v3. + nmi_backtrace.backtrace_idle [KNL] Dump stacks even of idle CPUs in response to an NMI stack-backtrace request.Interesting... I don't see these in the Linus tree I'm looking at [1] find
Documentation/-type f | xargs grep -iinter_copy_offload_enable
I was suggesting that as a patch. It's queued up for 5.16 now.
--b.
Quoted 38 lines · Bruce Fields
Quoted 28 lines · Steve Dickson
Quoted 25 lines · Bruce Fields
Documentation/admin-guide/kernel-parameters.txt +13
-0@@ -3243,6 +3243,19 @@ driver. A non-zero value sets the minimum interval in seconds between layoutstats transmissions. + nfsd.inter_copy_offload_enable = + [NFSv4.2] When set to 1, the server will support + server-to-server copies for which this server is + the destination of the copy. + + nfsd.nfsd4_ssc_umount_timeout = + [NFSv4.2] When used as the destination of a + server-to-server copy, knfsd temporarily mounts + the source server. It caches the mount in case + it will be needed again, and discards it if not + used for the number of milliseconds specified by + this parameter. + nfsd.nfs4_disable_idmapping= [NFSv4] When set to the default of '1', the NFSv4 server will return only numeric uids and gids to@@ -3250,6 +3263,7 @@ and gids from such clients. This is intended to easeQuoted 8 lines
Documentation/admin-guide/kernel-parameters.txt
Quoted 6 lines
Documentation/admin-guide/kernel-parameters.txt +1
-0migration from NFSv2/v3. + nmi_backtrace.backtrace_idle [KNL] Dump stacks even of idle CPUs in response to an NMI stack-backtrace request.Interesting... I don't see these in the Linus tree I'm looking at [1] find
Documentation/-type f | xargs grep -iinter_copy_offload_enable
Quoted 1 line
I was suggesting that as a patch. It's queued up for 5.16 now.
Sorry I did miss the patch part of the email...
Does it make sense to document both nfs and nfsd module parameters in a couple man pages?
steved.
Quoted 31 lines · Bruce Fields
Quoted 20 lines · Chuck Lever III
Quoted 20 lines · J. Bruce Fields
Quoted 15 lines · Steve Dickson
Hey!
Quoted 9 lines · J. Bruce Fields
Quoted 6 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
Quoted 5 lines
Quoted 3 lines
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Aren't sysctls documented under
Documentation/?
Quoted 7 lines
Sorry, I meant "module parameter". Anyway, yes, looks like both are listed in
Documentation/admin-guide/kernel-parameters.txt.Might be nice if these were in a man page too somewhere, but maybe that's not the most important thing these days.
--b.
This looks like a step forward to me.
Quoted 25 lines
Documentation/admin-guide/kernel-parameters.txt +13
-0@@ -3243,6 +3243,19 @@ driver. A non-zero value sets the minimum interval in seconds between layoutstats transmissions. + nfsd.inter_copy_offload_enable = + [NFSv4.2] When set to 1, the server will support + server-to-server copies for which this server is + the destination of the copy. + + nfsd.nfsd4_ssc_umount_timeout = + [NFSv4.2] When used as the destination of a + server-to-server copy, knfsd temporarily mounts + the source server. It caches the mount in case + it will be needed again, and discards it if not + used for the number of milliseconds specified by + this parameter. + nfsd.nfs4_disable_idmapping= [NFSv4] When set to the default of '1', the NFSv4 server will return only numeric uids and gids to
Documentation/admin-guide/kernel-parameters.txt line 3269
Quoted 7 lines
Documentation/admin-guide/kernel-parameters.txt +1
-0@@ -3250,6 +3263,7 @@ and gids from such clients. This is intended to ease migration from NFSv2/v3. + nmi_backtrace.backtrace_idle [KNL] Dump stacks even of idle CPUs in response to an NMI stack-backtrace request.
--
Chuck Lever
Quoted 28 lines · J. Bruce Fields
Quoted 8 lines · Steve Dickson
Hey!
Quoted 5 lines · J. Bruce Fields
Quoted 4 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
and it more if a stick you toe in the pool verses
jumping in...If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Let's document the module parameter and go with that for now.
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
Something is already figuring this out... The only time the client sends a COPY_NOTIFY and COPY is when both mounts are 4.2. I have not looked into but that is what the network traces are showing.
Quoted 3 lines
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
How can one server know what the other server has exported or access to??
Quoted 3 lines
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
Who would be doing this? Plus this would not survive over a reboot. An export would as well a /etc/modprobe.d/ file.
I can see the admin setting up the export but I really don't see the admin doing the echo or creating the file esp since the neither would is documented.
steved.
[email protected]
reviewerQuoted 45 lines · Steve Dickson
Quoted 28 lines · J. Bruce Fields
Quoted 8 lines · Steve Dickson
Hey!
Quoted 5 lines · J. Bruce Fields
Quoted 4 lines · Steve Dickson
Quoted 3 lines · J. Bruce Fields
Let's just stick with that for now, and leave it off by default until we're sure it's mature enough. Let's not introduce new configuration to work around problems that we haven't really analyzed yet.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
How is this going to find problems? At least with the export option it is documented
That sounds fixable. We need documentation of module parameters anyway.
Yeah I just took I don't see any documentation of module parameters anywhere for any of the modules. But by documentation I meant having the feature in the exports(5) manpage.
I think I'd probably create a new page for sysctls (this isn't the only one needing documentation), and make sure it's listed in the "SEE ALSO" section of the other man pages.
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
and it more if a stick you toe in the pool verses
jumping in...If we want more fine-grained control, I'm not yet seeing the argument that an export option on the destination server side is the way to do it.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Let's document the module parameter and go with that for now.
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
Something is already figuring this out... The only time the client sends a
COPY_NOTIFYand COPY is when both mounts are 4.2. I have not looked into but that is what the network traces are showing.Quoted 3 lines
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
Quoted 8 lines
How can one server know what the other server has exported or access to??
Quoted 3 lines
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
Who would be doing this? Plus this would not survive over a reboot. An export would as well a
/etc/modprobe.d/file.
You can add a line in /etc/modprobe.d/nfsd.conf:
options nfsd inter_copy_offload_enable=Y
to enable the option.
-Dai
Quoted 7 lines
I can see the admin setting up the export but I really don't see the admin doing the echo or creating the file esp since the neither would is documented.
steved.
Quoted 9 lines · On Mon, Nov 01, 2021 at 12:22:15PM -0700, [email protected] wrote:
Quoted 7 lines · Steve Dickson
Quoted 4 lines · J. Bruce Fields
Quoted 2 lines · Steve Dickson
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
Something is already figuring this out... The only time the client sends a
COPY_NOTIFYand COPY is when both mounts are 4.2. I have not looked into but that is what the network traces are showing.
Right. I was thinking what I'd tell an admin who wanted to set up server-to-server copy. The first thing they'd need to do was check that their clients and servers were new enough.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
How can one server know what the other server has exported or access to??
And the second is to make sure that the destination server is able to read from the source.
Quoted 10 lines
Quoted 4 lines
Quoted 2 lines
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
Who would be doing this? Plus this would not survive over a reboot. An export would as well a
/etc/modprobe.d/file.You can add a line in
/etc/modprobe.d/nfsd.conf:options nfsd inter_copy_offload_enable=Y
to enable the option.
Yep, it would be better to document it that way, thanks.
--b.
Quoted 12 lines · J. Bruce Fields
Quoted 11 lines · On Mon, Nov 01, 2021 at 12:22:15PM -0700, [email protected] wrote:
Quoted 9 lines · Steve Dickson
Quoted 6 lines · J. Bruce Fields
Quoted 2 lines · Steve Dickson
Now that cp will use
copy_file_range()when available, what are the steps needed to enable these fast copies?1) Make sure client and both servers support NFSv4.2 and server-to-server copy.
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Something is already figuring this out... The only time the client sends a
COPY_NOTIFYand COPY is when both mounts are 4.2. I have not looked into but that is what the network traces are showing.Right. I was thinking what I'd tell an admin who wanted to set up server-to-server copy. The first thing they'd need to do was check that their clients and servers were new enough.
Well the code went in over two years agoce0887ac96d35 (Olga Kornievskaia 2019-10-09 11:50:48 -0400 1663) so most modern kernel will have the feature.
The real question is does the cp command have the copy_file_range() support which didn't go in until Mar of this year
* Wed Mar 24 2021 Kamil Dudka <[email protected]> - 8.32-20
- cp: use copy_file_range if available
Quoted 19 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
2) Make sure destination server can access (at least for read) any exports on the source that you want to be able to copy from.
How can one server know what the other server has exported or access to??
And the second is to make sure that the destination server is able to read from the source.
Quoted 10 lines
Quoted 4 lines
Quoted 2 lines
3) echo 1 >/sys/module/nfsd/parameters/inter_copy_offload_enable on the destination server.
Who would be doing this? Plus this would not survive over a reboot. An export would as well a
/etc/modprobe.d/file.You can add a line in
/etc/modprobe.d/nfsd.conf:options nfsd inter_copy_offload_enable=Y
to enable the option.
Yes... This is what I meant by "a /etc/modprobe.d/ file"
Quoted 2 lines
Yep, it would be better to document it that way, thanks.
But the question is who would create this file?
nfs-utils or the admin?
If it is nfs-utils, it is a global switch unbeknown by the admin (but documented). If by the admin, the person would know about but it still will not documented.
With a export option, it would be per export switch and documented. Just saying... :-)
steved.