v1 -> v2: For Patch 1, rename "does_dracut_args_contain_mount" to "is_mount_in_dracut_args". No functional change.
v2 -> v3: For Patch 1, remove the double quota requirement for "--mount". For Patch 2, Improved description according to Dave's suggestion.
There were some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
In order to solve this, we introduce a new way of specifying mount information via the already-existent "dracut_args" directive, this is not only for nfs mount, also including other supported filesystems like ext[2-4]/xfs, etc.
This feature relys on the latest fedora dracut version: http://koji.fedoraproject.org/koji/taskinfo?taskID=15307615
The last patch is a fix found when designing this feature for nfs, so attached in passing.
Xunlei Pang (4): Support special mount information via "dracut_args" kexec-kdump-howto: Add doc about the special mount information via "dracut_args" spec: Update to add dependency on dracut version >= 044-117 mkdumprd: Do not add "nfs" dracut module explicitly
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- kexec-kdump-howto.txt | 18 ++++++++++++++++++ kexec-tools.spec | 5 +++-- mkdumprd | 8 -------- 7 files changed, 67 insertions(+), 13 deletions(-)
There are some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
We introduce a new way of specifying mount information via the already-existent "dracut_args" directive(so avoid adding extra directives in /etc/kdump.conf), we will skip all the filesystem mounting and checking stuff for it. So it can be used in the above-mentioned nfs scenario to avoid severe nfs server overhead.
Specifically, if there is any "--mount" information specified via "dracut_args" in /etc/kdump.conf, always use it as the final mount without any validation(mounting or checking like mount options, fs size, etc), so users are expected to ensure its correctness.
NOTE: -Only one mount target is allowed using "dracut_args" globally. -Dracut will create <mountpoint> if it doesn't exist in kdump kernel, <mountpoint> must be specified as an absolute path. -Users should do a test first and ensure it works because kdump does not prepare the mount or check all the validity.
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com --- dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 4aab205..42ba37f 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -146,6 +146,10 @@ read_kdump_conf() # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) case "$config_opt" in + dracut_args) + config_val=$(get_dracut_args_target "$config_val") + [[ -n "$config_val" ]] && add_dump_code "dump_fs $config_val" + ;; ext[234]|xfs|btrfs|minix|nfs) add_dump_code "dump_fs $config_val" ;; diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f5c0218..68e0ff8 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -450,6 +450,11 @@ kdump_install_conf() { ssh|nfs) kdump_install_net "$config_val" ;; + dracut_args) + if [[ $(get_dracut_args_fstype "$config_val") = nfs* ]] ; then + kdump_install_net "$(get_dracut_args_target "$config_val")" + fi + ;; kdump_pre|kdump_post|extra_bins) dracut_install $config_val ;; diff --git a/kdump-lib.sh b/kdump-lib.sh index 4567a05..da072d9 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -23,7 +23,9 @@ is_ssh_dump_target()
is_nfs_dump_target() { - grep -q "^nfs" /etc/kdump.conf + grep -q "^nfs" /etc/kdump.conf || \ + [[ $(grep "^dracut_args .*--mount" /etc/kdump.conf | \ + sed "s/.*--mount *.(.*)/\1/" | cut -d' ' -f3) = nfs* ]] }
is_raw_dump_target() @@ -45,7 +47,8 @@ is_fs_dump_target()
is_user_configured_dump_target() { - return $(is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target || is_fs_dump_target) + return $(is_mount_in_dracut_args || is_ssh_dump_target || is_nfs_dump_target || \ + is_raw_dump_target || is_fs_dump_target) }
strip_comments() @@ -406,3 +409,23 @@ is_wdt_mod_omitted() {
return $ret } + +# If "dracut_args" contains "--mount" information, use it +# directly without any check(users are expected to ensure +# its correctness). +is_mount_in_dracut_args() +{ + return $(grep ^dracut_args /etc/kdump.conf | grep -q "--mount") +} + +# $1: configuration value of "dracut_args". +get_dracut_args_fstype() +{ + echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f3 +} + +# $1: configuration value of "dracut_args". +get_dracut_args_target() +{ + echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f1 +} diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) + nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
+ nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l) + [ $nr -gt 1 ] && { + echo "More than one mount targets specified in "dracut_args"." + return 1 + } + while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) @@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
+ # No need to check in case of mount target specified via "dracut_args". + if is_mount_in_dracut_args; then + return 0 + fi + # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
On 2016/08/25 at 18:23, Xunlei Pang wrote:
There are some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
We introduce a new way of specifying mount information via the already-existent "dracut_args" directive(so avoid adding extra directives in /etc/kdump.conf), we will skip all the filesystem mounting and checking stuff for it. So it can be used in the above-mentioned nfs scenario to avoid severe nfs server overhead.
Specifically, if there is any "--mount" information specified via "dracut_args" in /etc/kdump.conf, always use it as the final mount without any validation(mounting or checking like mount options, fs size, etc), so users are expected to ensure its correctness.
NOTE: -Only one mount target is allowed using "dracut_args" globally. -Dracut will create <mountpoint> if it doesn't exist in kdump kernel, <mountpoint> must be specified as an absolute path. -Users should do a test first and ensure it works because kdump does not prepare the mount or check all the validity.
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 4aab205..42ba37f 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -146,6 +146,10 @@ read_kdump_conf() # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) case "$config_opt" in
dracut_args)
config_val=$(get_dracut_args_target "$config_val")
[[ -n "$config_val" ]] && add_dump_code "dump_fs $config_val"
;; ext[234]|xfs|btrfs|minix|nfs) add_dump_code "dump_fs $config_val" ;;
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f5c0218..68e0ff8 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -450,6 +450,11 @@ kdump_install_conf() { ssh|nfs) kdump_install_net "$config_val" ;;
dracut_args)
if [[ $(get_dracut_args_fstype "$config_val") = nfs* ]] ; then
kdump_install_net "$(get_dracut_args_target "$config_val")"
fi
;; kdump_pre|kdump_post|extra_bins) dracut_install $config_val ;;
diff --git a/kdump-lib.sh b/kdump-lib.sh index 4567a05..da072d9 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -23,7 +23,9 @@ is_ssh_dump_target()
is_nfs_dump_target() {
- grep -q "^nfs" /etc/kdump.conf
- grep -q "^nfs" /etc/kdump.conf || \
- [[ $(grep "^dracut_args .*--mount" /etc/kdump.conf | \
sed "s/.*--mount *.\(.*\)/\1/" | cut -d' ' -f3) = nfs* ]]
Sorry, I wanted to replace this with: [[ $(get_dracut_args_fstype "$(grep "^dracut_args .*--mount" /etc/kdump.conf)") = nfs* ]]
will resend it alone.
Regards, Xunlei
}
is_raw_dump_target() @@ -45,7 +47,8 @@ is_fs_dump_target()
is_user_configured_dump_target() {
- return $(is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target || is_fs_dump_target)
- return $(is_mount_in_dracut_args || is_ssh_dump_target || is_nfs_dump_target || \
is_raw_dump_target || is_fs_dump_target)
}
strip_comments() @@ -406,3 +409,23 @@ is_wdt_mod_omitted() {
return $ret }
+# If "dracut_args" contains "--mount" information, use it +# directly without any check(users are expected to ensure +# its correctness). +is_mount_in_dracut_args() +{
- return $(grep ^dracut_args /etc/kdump.conf | grep -q "--mount")
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_fstype() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f3
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_target() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f1
+} diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
Hi Xunlei,
On 25/08/2016:06:23:25 PM, Xunlei Pang wrote:
There are some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
We introduce a new way of specifying mount information via the already-existent "dracut_args" directive(so avoid adding extra directives in /etc/kdump.conf), we will skip all the filesystem mounting and checking stuff for it. So it can be used in the above-mentioned nfs scenario to avoid severe nfs server overhead.
Specifically, if there is any "--mount" information specified via "dracut_args" in /etc/kdump.conf, always use it as the final mount without any validation(mounting or checking like mount options, fs size, etc), so users are expected to ensure its correctness.
NOTE: -Only one mount target is allowed using "dracut_args" globally. -Dracut will create <mountpoint> if it doesn't exist in kdump kernel, <mountpoint> must be specified as an absolute path. -Users should do a test first and ensure it works because kdump does not prepare the mount or check all the validity.
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 4aab205..42ba37f 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -146,6 +146,10 @@ read_kdump_conf() # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) case "$config_opt" in
dracut_args)
config_val=$(get_dracut_args_target "$config_val")
[[ -n "$config_val" ]] && add_dump_code "dump_fs $config_val"
;; ext[234]|xfs|btrfs|minix|nfs) add_dump_code "dump_fs $config_val" ;;
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f5c0218..68e0ff8 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -450,6 +450,11 @@ kdump_install_conf() { ssh|nfs) kdump_install_net "$config_val" ;;
dracut_args)
if [[ $(get_dracut_args_fstype "$config_val") = nfs* ]] ; then
kdump_install_net "$(get_dracut_args_target "$config_val")"
fi
;; kdump_pre|kdump_post|extra_bins) dracut_install $config_val ;;
diff --git a/kdump-lib.sh b/kdump-lib.sh index 4567a05..da072d9 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -23,7 +23,9 @@ is_ssh_dump_target()
is_nfs_dump_target() {
- grep -q "^nfs" /etc/kdump.conf
- grep -q "^nfs" /etc/kdump.conf || \
- [[ $(grep "^dracut_args .*--mount" /etc/kdump.conf | \
sed "s/.*--mount *.\(.*\)/\1/" | cut -d' ' -f3) = nfs* ]]
}
is_raw_dump_target() @@ -45,7 +47,8 @@ is_fs_dump_target()
is_user_configured_dump_target() {
- return $(is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target || is_fs_dump_target)
- return $(is_mount_in_dracut_args || is_ssh_dump_target || is_nfs_dump_target || \
is_raw_dump_target || is_fs_dump_target)
}
I see, that in the cover letter you have mentioned "including other supported filesystems like ext[2-4]/xfs, etc". If we intend to support other file system then, we will need to improve is_raw_dump_target(), is_fs_dump_target() etc as well. Probably, we can skip complexity of other filesystem support in current patch set, and can just rename is_mount_in_dracut_args as is_nfs_mount_in_dracut_args.
strip_comments() @@ -406,3 +409,23 @@ is_wdt_mod_omitted() {
return $ret }
+# If "dracut_args" contains "--mount" information, use it +# directly without any check(users are expected to ensure +# its correctness). +is_mount_in_dracut_args() +{
- return $(grep ^dracut_args /etc/kdump.conf | grep -q "--mount")
may be return $(grep -q "^dracut_args .*--mount" /etc/kdump.conf)
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_fstype() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f3
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_target() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f1
+} diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
--
~Pratyush
On 2016/08/25 at 22:15, Pratyush Anand wrote:
Hi Xunlei,
On 25/08/2016:06:23:25 PM, Xunlei Pang wrote:
There are some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
We introduce a new way of specifying mount information via the already-existent "dracut_args" directive(so avoid adding extra directives in /etc/kdump.conf), we will skip all the filesystem mounting and checking stuff for it. So it can be used in the above-mentioned nfs scenario to avoid severe nfs server overhead.
Specifically, if there is any "--mount" information specified via "dracut_args" in /etc/kdump.conf, always use it as the final mount without any validation(mounting or checking like mount options, fs size, etc), so users are expected to ensure its correctness.
NOTE: -Only one mount target is allowed using "dracut_args" globally. -Dracut will create <mountpoint> if it doesn't exist in kdump kernel, <mountpoint> must be specified as an absolute path. -Users should do a test first and ensure it works because kdump does not prepare the mount or check all the validity.
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 4aab205..42ba37f 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -146,6 +146,10 @@ read_kdump_conf() # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) case "$config_opt" in
dracut_args)
config_val=$(get_dracut_args_target "$config_val")
[[ -n "$config_val" ]] && add_dump_code "dump_fs $config_val"
;; ext[234]|xfs|btrfs|minix|nfs) add_dump_code "dump_fs $config_val" ;;
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f5c0218..68e0ff8 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -450,6 +450,11 @@ kdump_install_conf() { ssh|nfs) kdump_install_net "$config_val" ;;
dracut_args)
if [[ $(get_dracut_args_fstype "$config_val") = nfs* ]] ; then
kdump_install_net "$(get_dracut_args_target "$config_val")"
fi
;; kdump_pre|kdump_post|extra_bins) dracut_install $config_val ;;
diff --git a/kdump-lib.sh b/kdump-lib.sh index 4567a05..da072d9 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -23,7 +23,9 @@ is_ssh_dump_target()
is_nfs_dump_target() {
- grep -q "^nfs" /etc/kdump.conf
- grep -q "^nfs" /etc/kdump.conf || \
- [[ $(grep "^dracut_args .*--mount" /etc/kdump.conf | \
sed "s/.*--mount *.\(.*\)/\1/" | cut -d' ' -f3) = nfs* ]]
}
is_raw_dump_target() @@ -45,7 +47,8 @@ is_fs_dump_target()
is_user_configured_dump_target() {
- return $(is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target || is_fs_dump_target)
- return $(is_mount_in_dracut_args || is_ssh_dump_target || is_nfs_dump_target || \
is_raw_dump_target || is_fs_dump_target)
}
I see, that in the cover letter you have mentioned "including other supported filesystems like ext[2-4]/xfs, etc". If we intend to support other file system then, we will need to improve is_raw_dump_target(), is_fs_dump_target() etc as well. Probably, we can skip complexity of other filesystem support in current patch set, and can just rename is_mount_in_dracut_args as is_nfs_mount_in_dracut_args.
is_raw_dump_target() can't be specified by "dracut_args", so it is fine. As for "is_fs_dump_target", its only callsite is "is_user_configured_dump_target()", where I added "is_mount_in_dracut_args", so I think it is fine too.
strip_comments() @@ -406,3 +409,23 @@ is_wdt_mod_omitted() {
return $ret }
+# If "dracut_args" contains "--mount" information, use it +# directly without any check(users are expected to ensure +# its correctness). +is_mount_in_dracut_args() +{
- return $(grep ^dracut_args /etc/kdump.conf | grep -q "--mount")
may be return $(grep -q "^dracut_args .*--mount" /etc/kdump.conf)
Yes, this is better, thanks for the review.
Regards, Xunlei
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_fstype() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f3
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_target() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f1
+} diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
--
~Pratyush
On 25/08/2016:11:06:30 PM, Xunlei Pang wrote:
On 2016/08/25 at 22:15, Pratyush Anand wrote:
Hi Xunlei,
On 25/08/2016:06:23:25 PM, Xunlei Pang wrote:
There are some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
We introduce a new way of specifying mount information via the already-existent "dracut_args" directive(so avoid adding extra directives in /etc/kdump.conf), we will skip all the filesystem mounting and checking stuff for it. So it can be used in the above-mentioned nfs scenario to avoid severe nfs server overhead.
Specifically, if there is any "--mount" information specified via "dracut_args" in /etc/kdump.conf, always use it as the final mount without any validation(mounting or checking like mount options, fs size, etc), so users are expected to ensure its correctness.
NOTE: -Only one mount target is allowed using "dracut_args" globally. -Dracut will create <mountpoint> if it doesn't exist in kdump kernel, <mountpoint> must be specified as an absolute path. -Users should do a test first and ensure it works because kdump does not prepare the mount or check all the validity.
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- 4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 4aab205..42ba37f 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -146,6 +146,10 @@ read_kdump_conf() # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) case "$config_opt" in
dracut_args)
config_val=$(get_dracut_args_target "$config_val")
[[ -n "$config_val" ]] && add_dump_code "dump_fs $config_val"
;; ext[234]|xfs|btrfs|minix|nfs) add_dump_code "dump_fs $config_val" ;;
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f5c0218..68e0ff8 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -450,6 +450,11 @@ kdump_install_conf() { ssh|nfs) kdump_install_net "$config_val" ;;
dracut_args)
if [[ $(get_dracut_args_fstype "$config_val") = nfs* ]] ; then
kdump_install_net "$(get_dracut_args_target "$config_val")"
fi
;; kdump_pre|kdump_post|extra_bins) dracut_install $config_val ;;
diff --git a/kdump-lib.sh b/kdump-lib.sh index 4567a05..da072d9 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -23,7 +23,9 @@ is_ssh_dump_target()
is_nfs_dump_target() {
- grep -q "^nfs" /etc/kdump.conf
- grep -q "^nfs" /etc/kdump.conf || \
- [[ $(grep "^dracut_args .*--mount" /etc/kdump.conf | \
sed "s/.*--mount *.\(.*\)/\1/" | cut -d' ' -f3) = nfs* ]]
}
is_raw_dump_target() @@ -45,7 +47,8 @@ is_fs_dump_target()
is_user_configured_dump_target() {
- return $(is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target || is_fs_dump_target)
- return $(is_mount_in_dracut_args || is_ssh_dump_target || is_nfs_dump_target || \
is_raw_dump_target || is_fs_dump_target)
}
I see, that in the cover letter you have mentioned "including other supported filesystems like ext[2-4]/xfs, etc". If we intend to support other file system then, we will need to improve is_raw_dump_target(), is_fs_dump_target() etc as well. Probably, we can skip complexity of other filesystem support in current patch set, and can just rename is_mount_in_dracut_args as is_nfs_mount_in_dracut_args.
is_raw_dump_target() can't be specified by "dracut_args", so it is fine. As for "is_fs_dump_target", its only callsite is "is_user_configured_dump_target()", where I added "is_mount_in_dracut_args", so I think it is fine too.
Yes, you are right! It is safe as long as is_fs_dump_target() is not called from any other place.
Reviewed-by: Pratyush Anand panand@redhat.com
strip_comments() @@ -406,3 +409,23 @@ is_wdt_mod_omitted() {
return $ret }
+# If "dracut_args" contains "--mount" information, use it +# directly without any check(users are expected to ensure +# its correctness). +is_mount_in_dracut_args() +{
- return $(grep ^dracut_args /etc/kdump.conf | grep -q "--mount")
may be return $(grep -q "^dracut_args .*--mount" /etc/kdump.conf)
Yes, this is better, thanks for the review.
Regards, Xunlei
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_fstype() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f3
+}
+# $1: configuration value of "dracut_args". +get_dracut_args_target() +{
- echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f1
+} diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
--
~Pratyush
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
Here are you trying to prevent customer from specifying multiple lines of "dracut_args --mount "xx.xx.xx.xx:/share /test nfs4 defaults"? If yes , it could be redundent. You have checked that in above duplicate dump target checking.
- while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On 2016/08/26 at 10:11, Baoquan He wrote:
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
Here are you trying to prevent customer from specifying multiple lines of "dracut_args --mount "xx.xx.xx.xx:/share /test nfs4 defaults"? If yes , it could be redundent. You have checked that in above duplicate dump target checking.
This for detecting the case multiple "--mount" specified in one dracut_args, for example: dracut_args --mount "xxx" --mount "yyy"
Regards, Xunlei
- while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On 08/26/16 at 10:25am, Xunlei Pang wrote:
On 2016/08/26 at 10:11, Baoquan He wrote:
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
Here are you trying to prevent customer from specifying multiple lines of "dracut_args --mount "xx.xx.xx.xx:/share /test nfs4 defaults"? If yes , it could be redundent. You have checked that in above duplicate dump target checking.
This for detecting the case multiple "--mount" specified in one dracut_args, for example: dracut_args --mount "xxx" --mount "yyy"
Yes, got it. Thanks. Could it be better to say a few words above the block? Or tell in doc.
Regards, Xunlei
- while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On 2016/08/26 at 10:38, Baoquan He wrote:
On 08/26/16 at 10:25am, Xunlei Pang wrote:
On 2016/08/26 at 10:11, Baoquan He wrote:
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
diff --git a/kdumpctl b/kdumpctl index 0436bfc..4d83e69 100755 --- a/kdumpctl +++ b/kdumpctl @@ -236,12 +236,18 @@ check_config() { local nr
- nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE)
nr=$(awk 'BEGIN{cnt=0} /^raw|^ssh[[:blank:]]|^nfs|^ext[234]|^xfs|^btrfs|^minix|^dracut_args .*--mount/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) [ $nr -gt 1 ] && { echo "More than one dump targets specified." return 1 }
nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l)
[ $nr -gt 1 ] && {
echo "More than one mount targets specified in \"dracut_args\"."
return 1
}
Here are you trying to prevent customer from specifying multiple lines of "dracut_args --mount "xx.xx.xx.xx:/share /test nfs4 defaults"? If yes , it could be redundent. You have checked that in above duplicate dump target checking.
This for detecting the case multiple "--mount" specified in one dracut_args, for example: dracut_args --mount "xxx" --mount "yyy"
Yes, got it. Thanks. Could it be better to say a few words above the block? Or tell in doc.
Yes, this is mentioned in patch 2, refer to the end of paragraph one: "You also cannot specify mutliple "--mount" targets via dracut_args."
Regards, Xunlei
Regards, Xunlei
- while read config_opt config_val; do # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val)
@@ -365,6 +371,11 @@ check_dump_fs_modified() local _new_dev _new_mntpoint _new_fstype local _target _path _dracut_args
- # No need to check in case of mount target specified via "dracut_args".
- if is_mount_in_dracut_args; then
return 0
- fi
- # No need to check in case of raw target. # Currently we do not check also if ssh/nfs target is specified if is_ssh_dump_target || is_nfs_dump_target || is_raw_dump_target; then
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Update "kexec-kdump-howto" to illustrate the usage of special mount information via "dracut_args".
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com --- kexec-kdump-howto.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt index 38f831e..ae7a5fa 100644 --- a/kexec-kdump-howto.txt +++ b/kexec-kdump-howto.txt @@ -345,6 +345,24 @@ mount the NFS mount and copy out the vmcore to your NFS server. Restart the kdump service via '/sbin/systemctl restart kdump.service' to commit this change to your kdump initrd.
+Special mount via "dracut_args" + +You can utilize "dracut_args" to pass "--mount" to kdump, see dracut manpage +about the format of "--mount" for details. If there is any "--mount" specified +via "dracut_args", kdump will build it as the mount target without doing any +validation (mounting or checking like mount options, fs size, save path, etc), +so you must test it to ensure all the correctness. You cannot use other targets +in /etc/kdump.conf if you use "--mount" in dracut_args. You also cannot specify +mutliple "--mount" targets via dracut_args. + +One use case of "--mount" in dracut_args is you do not want to mount dump target +before kdump service startup, for example, to reduce the burden of the shared nfs +server. Such as the example below: +dracut_args --mount "192.168.1.1:/share /test nfs4 defaults" + +NOTE: +- <mountpoint> must be specified as an absolute path. + Remote system via ssh/scp
Dumping over ssh/scp requires setting up passwordless ssh keys for every
On 25/08/2016:06:23:26 PM, Xunlei Pang wrote:
Update "kexec-kdump-howto" to illustrate the usage of special mount information via "dracut_args".
Suggested-by: Dave Young dyoung@redhat.com Signed-off-by: Xunlei Pang xlpang@redhat.com
Reviewed-by: Pratyush Anand panand@redhat.com
kexec-kdump-howto.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt index 38f831e..ae7a5fa 100644 --- a/kexec-kdump-howto.txt +++ b/kexec-kdump-howto.txt @@ -345,6 +345,24 @@ mount the NFS mount and copy out the vmcore to your NFS server. Restart the kdump service via '/sbin/systemctl restart kdump.service' to commit this change to your kdump initrd.
+Special mount via "dracut_args"
+You can utilize "dracut_args" to pass "--mount" to kdump, see dracut manpage +about the format of "--mount" for details. If there is any "--mount" specified +via "dracut_args", kdump will build it as the mount target without doing any +validation (mounting or checking like mount options, fs size, save path, etc), +so you must test it to ensure all the correctness. You cannot use other targets +in /etc/kdump.conf if you use "--mount" in dracut_args. You also cannot specify +mutliple "--mount" targets via dracut_args.
+One use case of "--mount" in dracut_args is you do not want to mount dump target +before kdump service startup, for example, to reduce the burden of the shared nfs +server. Such as the example below: +dracut_args --mount "192.168.1.1:/share /test nfs4 defaults"
+NOTE: +- <mountpoint> must be specified as an absolute path.
Remote system via ssh/scp
Dumping over ssh/scp requires setting up passwordless ssh keys for every
1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Fedora dracut-network version >= 044-117 must be installed to work with this set of kexec-tools patches. Therefore adding dependency for them.
Signed-off-by: Xunlei Pang xlpang@redhat.com --- kexec-tools.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kexec-tools.spec b/kexec-tools.spec index d70b561..d386af1 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -45,8 +45,9 @@ Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units Requires(pre): coreutils sed zlib -Requires: dracut >= 044-75 -Requires: dracut-network, ethtool +Requires: dracut >= 044-117 +Requires: dracut-network >= 044-117 +Requires: ethtool BuildRequires: zlib-devel zlib zlib-static elfutils-devel-static glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel BuildRequires: pkgconfig intltool gettext BuildRequires: systemd-units
Kdump explicitly adds "nfs" dracut module in case of nfs dumping, actually in case of nfs dump, nfs is a mount target, and will be added into host_fs_types[], thus dracut will add it automatically, according to 95nfs/module-setup.sh check().
So, we can safely remove all the add_dracut_module "nfs".
Signed-off-by: Xunlei Pang xlpang@redhat.com --- mkdumprd | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/mkdumprd b/mkdumprd index 2791613..3705749 100644 --- a/mkdumprd +++ b/mkdumprd @@ -355,10 +355,6 @@ handle_default_dump_target() SAVE_PATH=${SAVE_PATH##"$_mntpoint"} _fstype=$(get_fs_type_from_target $_target)
- if $(is_fs_type_nfs $_fstype); then - add_dracut_module "nfs" - fi - add_mount "$_target" check_size fs $_target fi @@ -519,10 +515,6 @@ do perror_exit "Dump target $config_val is probably not mounted." fi
- if [ "$config_opt" = "nfs" ]; then - add_dracut_module "nfs" - fi - _absolute_save_path=$(make_absolute_save_path $config_val) _mntpoint=$(get_mntpoint_from_path $_absolute_save_path) if is_atomic && is_bind_mount $_mntpoint; then
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
v1 -> v2: For Patch 1, rename "does_dracut_args_contain_mount" to "is_mount_in_dracut_args". No functional change.
v2 -> v3: For Patch 1, remove the double quota requirement for "--mount". For Patch 2, Improved description according to Dave's suggestion.
There were some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
In order to solve this, we introduce a new way of specifying mount information via the already-existent "dracut_args" directive, this is not only for nfs mount, also including other supported filesystems like ext[2-4]/xfs, etc.
This feature relys on the latest fedora dracut version: http://koji.fedoraproject.org/koji/taskinfo?taskID=15307615
The last patch is a fix found when designing this feature for nfs, so attached in passing.
Xunlei Pang (4): Support special mount information via "dracut_args" kexec-kdump-howto: Add doc about the special mount information via "dracut_args" spec: Update to add dependency on dracut version >= 044-117 mkdumprd: Do not add "nfs" dracut module explicitly
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- kexec-kdump-howto.txt | 18 ++++++++++++++++++ kexec-tools.spec | 5 +++-- mkdumprd | 8 -------- 7 files changed, 67 insertions(+), 13 deletions(-)
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Looks good to me, for the series
Acked-by: Dave Young dyoung@redhat.com
Thanks Dave
On 2016/08/26 at 08:53, Dave Young wrote:
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
v1 -> v2: For Patch 1, rename "does_dracut_args_contain_mount" to "is_mount_in_dracut_args". No functional change.
v2 -> v3: For Patch 1, remove the double quota requirement for "--mount". For Patch 2, Improved description according to Dave's suggestion.
There were some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
In order to solve this, we introduce a new way of specifying mount information via the already-existent "dracut_args" directive, this is not only for nfs mount, also including other supported filesystems like ext[2-4]/xfs, etc.
This feature relys on the latest fedora dracut version: http://koji.fedoraproject.org/koji/taskinfo?taskID=15307615
The last patch is a fix found when designing this feature for nfs, so attached in passing.
Xunlei Pang (4): Support special mount information via "dracut_args" kexec-kdump-howto: Add doc about the special mount information via "dracut_args" spec: Update to add dependency on dracut version >= 044-117 mkdumprd: Do not add "nfs" dracut module explicitly
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- kexec-kdump-howto.txt | 18 ++++++++++++++++++ kexec-tools.spec | 5 +++-- mkdumprd | 8 -------- 7 files changed, 67 insertions(+), 13 deletions(-)
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Looks good to me, for the series
Acked-by: Dave Young dyoung@redhat.com
Thanks, anyway I'd like to send out v4 with the minor optimization according to Pratyush's suggestion.
Regards, Xunlei
On 08/26/16 at 09:27am, Xunlei Pang wrote:
On 2016/08/26 at 08:53, Dave Young wrote:
On 08/25/16 at 06:23pm, Xunlei Pang wrote:
v1 -> v2: For Patch 1, rename "does_dracut_args_contain_mount" to "is_mount_in_dracut_args". No functional change.
v2 -> v3: For Patch 1, remove the double quota requirement for "--mount". For Patch 2, Improved description according to Dave's suggestion.
There were some complaints about nfs kdump that users must mount nfs beforehand, which may cause some overhead to nfs server. For example, there're thounsands of diskless clients deployed with nfs dumping, each time the client is boot up, it will trigger kdump rebuilding so will mount nfs, thus resulting in thousands of nfs request concurrently imposed on the same nfs server.
In order to solve this, we introduce a new way of specifying mount information via the already-existent "dracut_args" directive, this is not only for nfs mount, also including other supported filesystems like ext[2-4]/xfs, etc.
This feature relys on the latest fedora dracut version: http://koji.fedoraproject.org/koji/taskinfo?taskID=15307615
The last patch is a fix found when designing this feature for nfs, so attached in passing.
Xunlei Pang (4): Support special mount information via "dracut_args" kexec-kdump-howto: Add doc about the special mount information via "dracut_args" spec: Update to add dependency on dracut version >= 044-117 mkdumprd: Do not add "nfs" dracut module explicitly
dracut-kdump.sh | 4 ++++ dracut-module-setup.sh | 5 +++++ kdump-lib.sh | 27 +++++++++++++++++++++++++-- kdumpctl | 13 ++++++++++++- kexec-kdump-howto.txt | 18 ++++++++++++++++++ kexec-tools.spec | 5 +++-- mkdumprd | 8 -------- 7 files changed, 67 insertions(+), 13 deletions(-)
-- 1.8.3.1 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Looks good to me, for the series
Acked-by: Dave Young dyoung@redhat.com
Thanks, anyway I'd like to send out v4 with the minor optimization according to Pratyush's suggestion.
Ok, I may missed the comment, feel free to carry the ack when you repost.
I will merge it if there's no other comments. BTW, it has passed my test in Fedora rawhide.
Regards, Xunlei _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org