BZ: 817044
Harald suggested that we use --add kdumpbase instead of -m kdumpbsae. As
-m means only use modules specified on the command line. I am not sure
that kdump will ever know the list of modules it wants to use. It might
be a good idea to let dracut decide it based on --mount option.
Also start using --hostonly to make sure atleast our default dumping to
root disk always works.
I also noticed that with --add and --hostonly initramfs size came down. So
for the time being just bring down the initramfs size.
But it still looks big and this area will require more experimentation and
bug fixing to make sure we are generatiing optimal size images for kdump
purposes and get rid of bloat. I am just beginning to understand dracut,
so expect more churn in this area down the line from me.
I am posting this patch for the bz opened again F18. As it is reducing
initramfs size significantly, I think it is a good idea to commit it
in F17 branch also.
Following is image size comparision.
Dump to root disk.
------------------
vanilla compressed: 13MB
hostonly compressed: 7.5MB
Dump to nfs
-----------
vanilla compressed: 24MB
hostonly compressed: 13MB
Dump over ssh
-------------
vanilla compressed: 23.5 MB
hostonly compressed: 12 MB
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Resolves: bz816862
Make the variables in get_mp() local, otherwise they are global
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz816860
dracut pre-pivot hook splited to two hooks: pre-pivot and pre-pivot-cleanup
all the cleanup related scripts are moved to pre-pivot-cleanup hook
Because we depends on some early scripts like fstab-sys, also we must run before
cleanup stuff like dhclient killing, so just move kdump script to the end of
pre-pivot hook
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805783
kdumpctl: save_raw if found vmcore
mkdumprd: checking available size of raw disk
dracut module: do the dumping
Note, add a dir /kdumpscripts for monitor_dd_progress and future
kdump scripts
[v1->v2]: monitor_dd_process become a script instead of a function
add missed utils
use pipe with dc
[v2->v3]: Don: fix dd_progress_file typo
Vivek: move [ -f $conf_file ] earlier
don't split keyfile= and [ -f keyfile ]
move default core_collector earlier
move non-makedumpfile warnings to mkdumprd
make check available size a common function
Amerigo: use less pipe for grep then awk print
use shell (( )) instead of dc
use cut instead of awk
no need install dc and awk
make DD_BLKSIZE a variable
don't add 0755 file in git, chmod in module-setup.sh
[v3->v4]: vivek: kdumpctl multi raw target handling
monitor_dd_progress- fix wrong size calculation:
the tail -1 of dd pregress file is in bytes instead of blocks
only print the whole dd src file size for non-filtered case
check [ -b raw target device ] before dump
[v4->v5]: vivek: move check [ -b $1 ] before monitor_dd_progress
remove multi target function
[v5->v6]: vivek: only warning for raw dump of non-makedumpfile core_collector
[v6->v7]: kdumpctl should return 0 when there's no raw target
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
remove multi dump
Resolves: bz816859
multi dump was not written as a failsafe dump. Also it was not really tested.
It introduced more complexity in the early phase of porting plenty of rhel6
functions, so we'd remove it and concentrate on the base functionalities.
[v1->v2]: vivek: better error message
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz810107
in case nic renaming we will failed to bring up network.
Resolve this issue by pass mac addr to 2nd kernel cmdline, let dracut deal
with the udev rename
[v1->v2]: amwang: use ip instead of ifconfig
Signed-off-by: Dave Young <dyoung@redhat.com>
Resolve: bug 807521
The fix is easy.
Command sed should be called with option -n to remain slience when DUMP_TARGET
is a nfs server like 'nfs.server:/mnt/testarea/nfs'.
Then nfs function check_ssh_config will return 1 to not to config nfs like a
ssh dump
Signed-off-by: Chao Wang <chaowang@redhat.com>
Build kdump image will fail when kdump.conf has net option with a host name
instead of ip address.
Handle this just as what we do in rhel6: use getent to get the ip addr.
Signed-off-by: Dave Young <dyoung@redhat.com>
Add ssh dump support
changes including below items:
1. sshkey option
2. sshkey propagate
3. fix a bug of _server ip calculation for dump target string
4. change the prefix of kdump hook from 93 to 01 to avoid dhclient and
other cleanups happening before us
5. enable network with dracut cmdline rd.neednet=1 when there's network
target config
[v1 - v2]:
Only check_ssh_target when there's ssh dump target in kdump config file
[v2 -> v3]
style fixes: trailing spaces and space before tab indent
remove set -x
simply check_ssh_target
use awk to get sshkey option value
change pivot hook order to 0000
Signed-off-by: Dave Young <dyoung@redhat.com>