nfs service will append extra mount options to kernel mount options. Such as mountaddr/mountproto options. These options only represent current mounting details of the 1st kernel, but may not appropriate for the 2nd kernel. This patch will remove these options.
Signed-off-by: Tao Liu ltao@redhat.com --- mkdumprd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkdumprd b/mkdumprd index c6cb001..d87d588 100644 --- a/mkdumprd +++ b/mkdumprd @@ -70,8 +70,8 @@ to_mount()
if [[ $_fstype == "nfs"* ]]; then _pdev=$_target - _sed_cmd+='s/,addr=[^,]*//;' - _sed_cmd+='s/,proto=[^,]*//;' + _sed_cmd+='s/,(mount)?addr=[^,]*//g;' + _sed_cmd+='s/,(mount)?proto=[^,]*//g;' _sed_cmd+='s/,clientaddr=[^,]*//;' else # for non-nfs _target converting to use udev persistent name
Hi Tao,
On Tue, Oct 26, 2021 at 10:03:28PM +0800, Tao Liu wrote:
nfs service will append extra mount options to kernel mount options. Such as mountaddr/mountproto options. These options only represent current mounting details of the 1st kernel, but may not appropriate for the 2nd kernel. This patch will remove these options.
Could you explain why these options are not appreciate for the 2nd kernel in the commit msg? Or could you refer to commit d4f04afa47dea89ad5ca42ad0b2ddc355ce93a64 ("mkdumprd: drop some nfs mount options when reading from kernel") if the reason is the same?
Signed-off-by: Tao Liu ltao@redhat.com
mkdumprd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkdumprd b/mkdumprd index c6cb001..d87d588 100644 --- a/mkdumprd +++ b/mkdumprd @@ -70,8 +70,8 @@ to_mount()
if [[ $_fstype == "nfs"* ]]; then _pdev=$_target
_sed_cmd+='s/,addr=[^,]*//;'
_sed_cmd+='s/,proto=[^,]*//;'
_sed_cmd+='s/,\(mount\)\?addr=[^,]*//g;'
_sed_cmd+='s/,clientaddr=[^,]*//;' else # for non-nfs _target converting to use udev persistent name_sed_cmd+='s/,\(mount\)\?proto=[^,]*//g;'
-- 2.29.2 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Hello Coiby,
Thanks for reviewing the patch!
On Mon, Nov 1, 2021 at 11:40 AM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
On Tue, Oct 26, 2021 at 10:03:28PM +0800, Tao Liu wrote:
nfs service will append extra mount options to kernel mount options. Such as mountaddr/mountproto options. These options only represent current mounting details of the 1st kernel, but may not appropriate for the 2nd kernel. This patch will remove these options.
Could you explain why these options are not appreciate for the 2nd kernel in the commit msg? Or could you refer to commit d4f04afa47dea89ad5ca42ad0b2ddc355ce93a64 ("mkdumprd: drop some nfs mount options when reading from kernel") if the reason is the same?
Yes, they are due to the same reason.
The mountaddr and mountproto only represent the current 1st kernel mount details. For example an ipv4/ipv6 dual stack enabled system, the ipv6 address of nfs server and 'mountproto=udp6' options are likely to be passed to dracut when making initramfs img. However the ipv6 stack may not be enabled in the 2nd kernel. A proper way is to pass only hostname instead of specific mountaddr and mountproto to the 2nd kernel, letting itself decide which network stack to use when mounting the nfs folder.
Thanks, Tao Liu
Signed-off-by: Tao Liu ltao@redhat.com
mkdumprd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkdumprd b/mkdumprd index c6cb001..d87d588 100644 --- a/mkdumprd +++ b/mkdumprd @@ -70,8 +70,8 @@ to_mount()
if [[ $_fstype == "nfs"* ]]; then _pdev=$_target
_sed_cmd+='s/,addr=[^,]*//;'
_sed_cmd+='s/,proto=[^,]*//;'
_sed_cmd+='s/,\(mount\)\?addr=[^,]*//g;'
_sed_cmd+='s/,\(mount\)\?proto=[^,]*//g;' _sed_cmd+='s/,clientaddr=[^,]*//;' else # for non-nfs _target converting to use udev persistent name
-- 2.29.2 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
-- Best regards, Coiby
On Mon, Nov 01, 2021 at 02:57:49PM +0800, Tao Liu wrote:
Hello Coiby,
Thanks for reviewing the patch!
No problem!
On Mon, Nov 1, 2021 at 11:40 AM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
On Tue, Oct 26, 2021 at 10:03:28PM +0800, Tao Liu wrote:
nfs service will append extra mount options to kernel mount options. Such as mountaddr/mountproto options. These options only represent current mounting details of the 1st kernel, but may not appropriate for the 2nd kernel. This patch will remove these options.
Could you explain why these options are not appreciate for the 2nd kernel in the commit msg? Or could you refer to commit d4f04afa47dea89ad5ca42ad0b2ddc355ce93a64 ("mkdumprd: drop some nfs mount options when reading from kernel") if the reason is the same?
Yes, they are due to the same reason.
The mountaddr and mountproto only represent the current 1st kernel mount details. For example an ipv4/ipv6 dual stack enabled system, the ipv6 address of nfs server and 'mountproto=udp6' options are likely to be passed to dracut when making initramfs img. However the ipv6 stack may not be enabled in the 2nd kernel. A proper way is to pass only hostname instead of specific mountaddr and mountproto to the 2nd kernel, letting itself decide which network stack to use when mounting the nfs folder.
Thanks for the explanation!
Acked-by: Coiby Xu coxu@redhat.com
Thanks, Tao Liu
Signed-off-by: Tao Liu ltao@redhat.com
mkdumprd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkdumprd b/mkdumprd index c6cb001..d87d588 100644 --- a/mkdumprd +++ b/mkdumprd @@ -70,8 +70,8 @@ to_mount()
if [[ $_fstype == "nfs"* ]]; then _pdev=$_target
_sed_cmd+='s/,addr=[^,]*//;'
_sed_cmd+='s/,proto=[^,]*//;'
_sed_cmd+='s/,\(mount\)\?addr=[^,]*//g;'
_sed_cmd+='s/,\(mount\)\?proto=[^,]*//g;' _sed_cmd+='s/,clientaddr=[^,]*//;' else # for non-nfs _target converting to use udev persistent name
-- 2.29.2 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
-- Best regards, Coiby