On 03/28/17 at 08:24pm, Xunlei Pang wrote:
On 03/28/2017 at 05:14 PM, Xunlei Pang wrote:
> On 03/28/2017 at 03:55 PM, Dave Young wrote:
>> On 03/27/17 at 10:42am, Xunlei Pang wrote:
>>> v1->v2:
>>> Add the hook in kdumpctl, so we use this hook anywhere, this helps a loot
>>> for the "all_root" checklist(see PATCH4).
>>>
>>> We add a generic dump target hook for kdump, supposed to monitor all the
>>> devices mounted by kdump.
>>>
>>> PATCH2 implements the basic framework, add a hook kdump_target_hook(),
>>> and provide a generic helper kdump_targets_tell() for use.
>> Xunlei, I personally like the v1 more, since it is easier to understand.
>>
>> Dropping root parameter is simple. For changing lvm parameter as
>> we discussed we do not need to consider linear or not, so we can just
>> change the lvm.conf if it exists in 2nd kernel /etc/ unconditionally.
>>
>> So I'm not sure this framework is necessary to be maintained..
> My original thought is that we can keep the old behavior under this framework,
> because I am not sure if adding the special root device via "--mount"
instead of
> "root=X" cmdline has some potential issue. If not I am ok with dealing
with it like
> I did in v1. At the first glance, seems keeping the orignal "root=X" way
is safer.
Here is an example:
If we remove root by way of v1, the sysroot.mount unit generated is required by
local-fs.target:
kdump:/run/systemd/generator# cat /etc/fstab
/dev/dm-0 /sysroot xfs defaults,x-initrd.mount 0 2
kdump:/run/systemd/generator# ls -l
total 8
drwxr-xr-x 2 root 0 60 Mar 28 20:04 local-fs.target.requires
-rw-r--r-- 1 root 0 311 Mar 28 20:04 sysroot.mount
-rw-r--r-- 1 root 0 383 Mar 28 20:04 systemd-fsck-root.service
kdump:/run/systemd/generator# ls -l local-fs.target.requires/
total 0
lrwxrwxrwx 1 root 0 36 Mar 28 20:04 sysroot.mount ->
/run/systemd/generator/sysroot.mount
If we remove root by way of v2, the sysroot.mount unit generated is required by
initrd-root-fs.target:
kdump:/run/systemd/generator# cat /etc/fstab.empty
kdump:/run/systemd/generator# ls -l
total 8
drwxr-xr-x 2 root 0 60 Mar 28 20:21 'dev-mapper-fedora\x2droot.device.d'
drwxr-xr-x 2 root 0 60 Mar 28 20:21 initrd-root-device.target.d
drwxr-xr-x 2 root 0 60 Mar 28 20:21 initrd-root-fs.target.requires
drwxr-xr-x 2 root 0 60 Mar 28 20:21 initrd.target.wants
-rw-r--r-- 1 root 0 311 Mar 28 20:21 sysroot.mount
-rw-r--r-- 1 root 0 425 Mar 28 20:21 systemd-fsck-root.service
drwxr-xr-x 2 root 0 60 Mar 28 20:21
'systemd-fsck(a)dev-mapper-fedora\x2droot.service.d'
kdump:/run/systemd/generator# ls -l initrd-root-fs.target.requires
total 0
lrwxrwxrwx 1 root 0 36 Mar 28 20:21 sysroot.mount ->
/run/systemd/generator/sysroot.mount
The way of v2 is just like the orignal way.
The initrd-root-fs.target seems to be a rootfs target which depends on
kernel cmdline root= which is specific for initrd root mount. But
local-fs.target is general fs mount which matches more with removing
root= dependency. Since root is also a general fs to be mounted it
should work. Even for nfsroot, it should also like a normal kdump nfs
target. Anyway, a local-fs mount sounds better as our initial purpose it
removing the root= dependencies.
>
> Regards,
> Xunlei
>
> >
> > Besides, I want to utilize this framework to minimize the size of initramfs
generated
> > in the future. For example, PATCH5 can remove "lvm" dracut module
easily under
> > this framework.
> >
> > But I am ok with it you think we can do it.
> >
> > Regards,
> > Xunlei
> >
> >>> We prepare a checklist(jobs) in the hook, to implement a checklist:
> >>> Add your new checklist(job) "xxx" separated by whitespace,
and
> >>> implement its logic to update its tag value in the tag inventory.
> >>> Then "kdump_targets_tell xxx" will be available for you to
use.
> >>>
> >>> PATCH4(remove root=X via "all_root" checklist) and
PATCH5(remove "lvm"
> >>> via "any_lvm" checklist) are applications under this
framework.
> >>>
> >>> PATCH6 is an issue we want to solve to reduce "lvm2" memory
consumption
> >>> under kdump.
> >>>
> >>> Xunlei Pang (6):
> >>> kdump-lib.sh: fix inproper get_block_dump_target()
> >>> kdumpctl: add a generic hook for kdump targets
> >>> kdumpctl: fix a bug in remove_cmdline_param()
> >>> kdumpctl: remove "root=X" for kdump boot
> >>> mkdumprd: omit "lvm" dracut module if no lvm target
> >>> mkdumprd: reduce lvm2 memory under kdump
> >>>
> >>> dracut-module-setup.sh | 6 ++
> >>> dracut-process-lvmconf.sh | 6 ++
> >>> kdump-lib.sh | 78 +++++++++++++++++++---
> >>> kdumpctl | 162
++++++++++++++++++++++++++++++++++++++++++----
> >>> kexec-tools.spec | 3 +
> >>> mkdumprd | 24 ++-----
> >>> 6 files changed, 241 insertions(+), 38 deletions(-)
> >>> create mode 100644 dracut-process-lvmconf.sh
> >>>
> >>> --
> >>> 1.8.3.1
> >>> _______________________________________________
> >>> kexec mailing list -- kexec(a)lists.fedoraproject.org
> >>> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
> >> Thanks
> >> Dave
> _______________________________________________
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org