On 09/23/13 at 03:47pm, Vivek Goyal wrote:
On Thu, Sep 05, 2013 at 12:47:22AM +0800, WANG Chao wrote:
> 1st kernel uses ip=ibft and rd.iscsi.firmware to log in ibft lun. In 2nd
> kernel, ibft lun can be logged in automatically, because 2nd kernel
> inherit 1st kernel cmdline.
>
> Currently kdump will configure netroot=iscsi:xxx if we find iscsi lun
> being used. In case of ibft, ip=ibft and rd.iscsi.firmware is enough for
> dracut to be aware of, otherwise netroot=iscsi:xxx will only confuse
> dracut and fail to log in ibft lun.
>
> So in kdump module, we should avoid handling iscsi lun if ibft.
>
> Signed-off-by: WANG Chao <chaowang(a)redhat.com>
> ---
> dracut-module-setup.sh | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
> index 517099c..252d17a 100755
> --- a/dracut-module-setup.sh
> +++ b/dracut-module-setup.sh
> @@ -268,6 +268,16 @@ kdump_install_conf() {
> rm -f /tmp/$$-kdump.conf
> }
>
> +kdump_is_ibft() {
> + local path=$1
> + local tgt_name fw_tgt_name
> +
> + tgt_name=$(kdump_iscsi_get_rec_val "$path" "node.name")
> + fw_tgt_name=$(/sbin/iscsiadm -m fw 2>/dev/null | awk '$1 ==
"node.name" {print $3}')
> +
> + [ -n "$fw_tgt_name" ] && strstr "$fw_tgt_name"
"$tgt_name"
> +}
> +
> kdump_iscsi_get_rec_val() {
>
> local result
> @@ -323,6 +333,11 @@ kdump_setup_iscsi_device() {
> return 1
> fi
>
> + if kdump_is_ibft ${path}; then
> + dinfo "${path} is ibft, skip"
So this is relying on the fact that ip=ibft and rd.iscsi.firmware has
been passed on command line. Is it always the case in first kernel?
ip=ibft and rd.iscsi.firmware will be appended to cmdline automatically
after installation. Because both of the cmdline args are *required* to
boot an ibft box.
If users want to use ibft, they must have both ip=ibft and
rd.iscsi.firmware in cmdline. I don't know if dracut or anaconda will
change about it, but for now it's true.
Can't I bring up ibft luns from user space later?
You don't have to manually do this. ibft luns will be brought up in
initrd.
If yes, it might be better to always append ip=ibft and
rd.iscsi.firmware
to command line option.
If 1st kernel uses ibft, ip=ibft and rd.iscsi.firmware are already there
in cmdline.
If 1st kernel doesn't use ibft, I don't see a reason for ibft to be used
in 2nd kernel.
Providing duplicated ip=ibft might cause some unexpected behavior of
dracut. I didn't test it. I'm not sure wether it's a good idea or not.
But if you have strong reason or insist to do this, I'm fine with this.
Thanks
WANG Chao