----- Original Message -----
On 12/09/13 at 09:37pm, Zhi Zou wrote:
>
>
> ----- Original Message -----
> > On 12/09/13 at 04:45pm, Zhi Zou wrote:
> > > Description of problem:
> > > Kdump can dump the vmcore to remote nfs target if kdump was
> > > configred by using nfs dump and nfs target was mounted before
> > > building kdump initramfs. But if we use hostname to configure
> > > nfs dump, Though the kdump service will start successfully, dump
> > > will fail because there isn't a /etc/hosts file in initramfs.
> > >
> > > Resolution:
> > > copy /etc/hosts to initramfs.
> >
> > I think it would be useful if we install /etc/hosts to kdump initramfs.
> > But what I concern is when the host ip changed in /etc/hosts, a rebuild
> > wouldn't be triggered, and in 2nd kernel, mount nfs server would fail.
> >
> Yes, That is really a problem.
>
> > Moreover, this seems like a dracut issue. dracut can mount nfs in
> > initramfs and it does need /etc/hosts to look up for static configured
> > hostname.
> >
> I think mkdumprd just add a "mount" argument and a "nfs"
module in dracut
> when using nfs. The way dracut address the "mount" argument is add a
entry
> in "${initdir}/etc/fstab. So if there isn't /etc/hosts in intramfs, the
2nd
> kernel still can't mount the target.
That's exactly what I was talking about.
Think about the case of normal boot, if we want to mount such static
hostname in initramfs, we still need /etc/hosts. That's why a normal
boot and a kdump boot share the same concern in this case.
> What's more, /etc/hosts is not necessary for dracut nfs and ssh module.
Why? Is it because dracut doesn't support static hostname or dracut just
need to be fixed?
Seems like dracut doesn't support static hostname currently, at least I
don't find any clue. That why I install /etc/hosts manually.
> So I think the better way is test if we should install
/etc/hosts to
> initramfs
> in mkdumprd.
If we really need /etc/hosts to do static hostname lookup, we should
install it.
If we don't need /etc/hosts because the hostname is a dynamic name
configured by DNS server, it's harmless whether or not we install it.
I think I'd like to support what dracut supports (unless it's kdump
specific stuff). So my idea is:
1. Try to fix it in dracut. Because this is not kdump only issue.
2. If we can't fix it in dracut, we can always encourage user to specify
'dracut_args --install /etc/hosts' in /etc/kdump.conf, when they want
to use a static hostname.
Thanks
WANG Chao
>
>
> > >
> > > Signed-off-by: arthur <zzou(a)redhat.com>
> > > ---
> > > mkdumprd | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/mkdumprd b/mkdumprd
> > > index 6de1755..d18882a 100644
> > > --- a/mkdumprd
> > > +++ b/mkdumprd
> > > @@ -520,6 +520,7 @@ do
> > >
> > > if [ "$config_opt" = "nfs" ]; then
> > > add_dracut_module "nfs"
> > > + add_dracut_arg "--install" "/etc/hosts"
> >
> > ssh dump is in the same situation here.
> >
> Yes, ssh should have the same problem.
>
> > Thanks
> > WANG Chao
> >
> > > fi
> > > add_mount "$config_val"
> > > mkdir_save_path_fs $config_val
> > > --
> > > 1.8.4.2
> > >
> > > _______________________________________________
> > > kexec mailing list
> > > kexec(a)lists.fedoraproject.org
> > >
https://lists.fedoraproject.org/mailman/listinfo/kexec
> >