* dracut does not mount iscsi targets specified using --mount option @ 2012-04-18 22:28 Vivek Goyal [not found] ` <20120418222829.GG2224-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-18 22:28 UTC (permalink / raw) To: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Cong Wang, Dave Young Hi, I am trying to dump kernel vmcore to an software iscsi target (kdump). kdump specifies the dump destination using "--mount" option. But dracut does not even include the "iscsi" module and associated device is not mounted in second kernel. Following is the dracut command line as called by /sbin/mkdumprd. dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 Note there is a multipath target over iscsi devices and that target is mounted on /mnt/common. Hence specified using "--mount /dev/mapper/mpatha /mnt/common" Following is list of modules being included by dracut (printed on standard output due to -M option). rpmversion dm kernel-modules lvm multipath fstab-sys rootfs-block udev-rules base fs-lib kdumpbase shutdown I thought that once you specify a mount using "--mount" option, dracut will traverse through the full device stack, figure out all the dependencies, include all the modules and bring up the full stack in the kernel and mount the top level device. Is that not the case? BTW, I have done testing with multipath targets (without iscsi) and it works. So multipath is not the issue. But iscsi is. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120418222829.GG2224-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120418222829.GG2224-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-19 4:57 ` Cong Wang 2012-04-19 8:59 ` Harald Hoyer 1 sibling, 0 replies; 27+ messages in thread From: Cong Wang @ 2012-04-19 4:57 UTC (permalink / raw) To: Vivek Goyal; +Cc: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Wed, 2012-04-18 at 18:28 -0400, Vivek Goyal wrote: > Hi, > > I am trying to dump kernel vmcore to an software iscsi target (kdump). > kdump specifies the dump destination using "--mount" option. But dracut > does not even include the "iscsi" module and associated device is not > mounted in second kernel. > > Following is the dracut command line as called by /sbin/mkdumprd. > > dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 > > Note there is a multipath target over iscsi devices and that target is > mounted on /mnt/common. Hence specified using "--mount /dev/mapper/mpatha > /mnt/common" > > Following is list of modules being included by dracut (printed on standard > output due to -M option). > > rpmversion > dm > kernel-modules > lvm > multipath > fstab-sys > rootfs-block > udev-rules > base > fs-lib > kdumpbase > shutdown > > I thought that once you specify a mount using "--mount" option, dracut > will traverse through the full device stack, figure out all the > dependencies, include all the modules and bring up the full stack in > the kernel and mount the top level device. Is that not the case? > > BTW, I have done testing with multipath targets (without iscsi) and > it works. So multipath is not the issue. But iscsi is. I think this is a bug, dracut fails to detect iscsi thus doesn't include the iscsi module. Vivek, can you try to add 'set -x' in the check() function in module-setup.sh of iscsi module to get some debugging info? Especially is_iscsi(). Thanks for testing! ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120418222829.GG2224-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-19 4:57 ` Cong Wang @ 2012-04-19 8:59 ` Harald Hoyer [not found] ` <4F8FD3E5.90103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 1 sibling, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-19 8:59 UTC (permalink / raw) To: Vivek Goyal; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Cong Wang, Dave Young Am 19.04.2012 00:28, schrieb Vivek Goyal: > Hi, > > I am trying to dump kernel vmcore to an software iscsi target (kdump). > kdump specifies the dump destination using "--mount" option. But dracut > does not even include the "iscsi" module and associated device is not > mounted in second kernel. > > Following is the dracut command line as called by /sbin/mkdumprd. > > dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 "-m kdumpbase" - This tells dracut to only use the kdumpbase dracut module So, because the iscsi dracut module is not added, dracut does not even check() it. Why is it "-m kdumpbase" and not "--add kdumpbase" ??? ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <4F8FD3E5.90103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F8FD3E5.90103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-20 6:45 ` Cong Wang 2012-04-20 8:42 ` Harald Hoyer 2012-04-20 13:51 ` Vivek Goyal 1 sibling, 1 reply; 27+ messages in thread From: Cong Wang @ 2012-04-20 6:45 UTC (permalink / raw) To: Harald Hoyer; +Cc: Vivek Goyal, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Thu, 2012-04-19 at 10:59 +0200, Harald Hoyer wrote: > Am 19.04.2012 00:28, schrieb Vivek Goyal: > > Hi, > > > > I am trying to dump kernel vmcore to an software iscsi target (kdump). > > kdump specifies the dump destination using "--mount" option. But dracut > > does not even include the "iscsi" module and associated device is not > > mounted in second kernel. > > > > Following is the dracut command line as called by /sbin/mkdumprd. > > > > dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 > > "-m kdumpbase" - This tells dracut to only use the kdumpbase dracut module > So, because the iscsi dracut module is not added, dracut does not even check() it. Interesting, multipath and lvm etc. modules are added by dracut when it is needed by --mount, so why iscsi is special here? > > Why is it "-m kdumpbase" and not "--add kdumpbase" ??? I thought "--add" is plus for "-m", so the initial module has to be added via "-m" in cmdline? Seems I was wrong, but could this be the reason that causes iscsi module not loaded? Thanks! ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option 2012-04-20 6:45 ` Cong Wang @ 2012-04-20 8:42 ` Harald Hoyer [not found] ` <20120420155143.GK22419@redhat.com> 0 siblings, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-20 8:42 UTC (permalink / raw) To: Cong Wang; +Cc: Vivek Goyal, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 20.04.2012 08:45, schrieb Cong Wang: > On Thu, 2012-04-19 at 10:59 +0200, Harald Hoyer wrote: >> Am 19.04.2012 00:28, schrieb Vivek Goyal: >>> Hi, >>> >>> I am trying to dump kernel vmcore to an software iscsi target (kdump). >>> kdump specifies the dump destination using "--mount" option. But dracut >>> does not even include the "iscsi" module and associated device is not >>> mounted in second kernel. >>> >>> Following is the dracut command line as called by /sbin/mkdumprd. >>> >>> dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 >> >> "-m kdumpbase" - This tells dracut to only use the kdumpbase dracut module >> So, because the iscsi dracut module is not added, dracut does not even check() it. > > Interesting, multipath and lvm etc. modules are added by dracut when it > is needed by --mount, so why iscsi is special here? > >> >> Why is it "-m kdumpbase" and not "--add kdumpbase" ??? > > I thought "--add" is plus for "-m", so the initial module has to be > added via "-m" in cmdline? Seems I was wrong, but could this be the > reason that causes iscsi module not loaded? > > Thanks! > You can send me the output of dracut with the "--debug" option added to inspect it further. ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120420155143.GK22419@redhat.com>]
[parent not found: <20120420155143.GK22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120420155143.GK22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-23 4:09 ` Cong Wang 0 siblings, 0 replies; 27+ messages in thread From: Cong Wang @ 2012-04-23 4:09 UTC (permalink / raw) To: Vivek Goyal; +Cc: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Fri, 2012-04-20 at 11:53 -0400, Vivek Goyal wrote: > On Fri, Apr 20, 2012 at 10:42:34AM +0200, Harald Hoyer wrote: > > [..] > > >> Why is it "-m kdumpbase" and not "--add kdumpbase" ??? > > > > > > I thought "--add" is plus for "-m", so the initial module has to be > > > added via "-m" in cmdline? Seems I was wrong, but could this be the > > > reason that causes iscsi module not loaded? > > > > > > Thanks! > > > > > > > You can send me the output of dracut with the "--debug" option added to inspect > > it further. > > Hi Harald, > > I ran dracut from command line (could not figure out how to capture the > output of service to a file with systemd) and captured the output of > --debug with "-m kdumpbase" and "--add kdumpbase". > > For some reason it was complaining that module kdumpbase not found but > I see that it is present in /lib/dracut/modules.d. Anyway, I am attaching > both the outputs for you to have a look. Files are gzipped as they were > big. Just fyi, that is because kdump module checks an env variable at start, so you can use 'kdumpctl start' to run it manually instead of using dracut directly. :) ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F8FD3E5.90103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-20 6:45 ` Cong Wang @ 2012-04-20 13:51 ` Vivek Goyal [not found] ` <20120420135156.GE22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 1 sibling, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-20 13:51 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Cong Wang, Dave Young On Thu, Apr 19, 2012 at 10:59:17AM +0200, Harald Hoyer wrote: > Am 19.04.2012 00:28, schrieb Vivek Goyal: > > Hi, > > > > I am trying to dump kernel vmcore to an software iscsi target (kdump). > > kdump specifies the dump destination using "--mount" option. But dracut > > does not even include the "iscsi" module and associated device is not > > mounted in second kernel. > > > > Following is the dracut command line as called by /sbin/mkdumprd. > > > > dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 > > "-m kdumpbase" - This tells dracut to only use the kdumpbase dracut module > So, because the iscsi dracut module is not added, dracut does not even check() it. > > Why is it "-m kdumpbase" and not "--add kdumpbase" ??? I don't know why -m is being used instead of --add. I tried changing it to --add and uncompressed initramfs size changed from 36MB to 72MB. To me 32MB size itself is big. IIRc, in RHEL6 using our own mkinitrd, we had uncomressed initrd size close to 25MB. In kdump environment we work in very restricted memory conditions. Currently we reserve 128MB and there are calls to reduce it further. This 128MB should load kernel, initramfs and run all the tools in initramfs to actually save the vmcore to the target. So we need to figure out how can we reduce the size of initramfs for kdump case. In the next mail I will add the output of --debug both for -m kdumpbase and --add kdumpbase. From kdump perspective, we only need to mount targets as specified by --mount option. We might not want to mount even root and it depends on kdump.conf. If root is needed, we will pass that too on command line using --mount. So this is little different from -H option. Can we modify dracut in such a way so that it packs only those modules need to mount targets as specified --mount options? Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120420135156.GE22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120420135156.GE22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-23 4:11 ` Cong Wang 2012-04-23 7:40 ` Harald Hoyer 0 siblings, 1 reply; 27+ messages in thread From: Cong Wang @ 2012-04-23 4:11 UTC (permalink / raw) To: Vivek Goyal; +Cc: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Fri, 2012-04-20 at 09:51 -0400, Vivek Goyal wrote: > On Thu, Apr 19, 2012 at 10:59:17AM +0200, Harald Hoyer wrote: > > Am 19.04.2012 00:28, schrieb Vivek Goyal: > > > Hi, > > > > > > I am trying to dump kernel vmcore to an software iscsi target (kdump). > > > kdump specifies the dump destination using "--mount" option. But dracut > > > does not even include the "iscsi" module and associated device is not > > > mounted in second kernel. > > > > > > Following is the dracut command line as called by /sbin/mkdumprd. > > > > > > dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 > > > > "-m kdumpbase" - This tells dracut to only use the kdumpbase dracut module > > So, because the iscsi dracut module is not added, dracut does not even check() it. > > > > Why is it "-m kdumpbase" and not "--add kdumpbase" ??? > > I don't know why -m is being used instead of --add. I tried changing it > to --add and uncompressed initramfs size changed from 36MB to 72MB. > > To me 32MB size itself is big. IIRc, in RHEL6 using our own mkinitrd, we had > uncomressed initrd size close to 25MB. > > In kdump environment we work in very restricted memory conditions. > Currently we reserve 128MB and there are calls to reduce it further. This > 128MB should load kernel, initramfs and run all the tools in initramfs > to actually save the vmcore to the target. > > So we need to figure out how can we reduce the size of initramfs for > kdump case. In the next mail I will add the output of --debug both for > -m kdumpbase and --add kdumpbase. > > From kdump perspective, we only need to mount targets as specified by > --mount option. We might not want to mount even root and it depends on > kdump.conf. If root is needed, we will pass that too on command line > using --mount. So this is little different from -H option. > > Can we modify dracut in such a way so that it packs only those modules > need to mount targets as specified --mount options? Yeah, I noticed this too, I think this is due to the dracut module "kernel-modules" includes more than enough kernel modules into initramfs, thus the size increased so much. Harald, if you have any idea to improve this? We need to find a way to tell "kernel-modules" module to only include the ones we want. Thanks. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option 2012-04-23 4:11 ` Cong Wang @ 2012-04-23 7:40 ` Harald Hoyer [not found] ` <4F95076A.9060504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> [not found] ` <20120423151711.GD15561@redhat.com> 0 siblings, 2 replies; 27+ messages in thread From: Harald Hoyer @ 2012-04-23 7:40 UTC (permalink / raw) To: Cong Wang; +Cc: Vivek Goyal, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 23.04.2012 06:11, schrieb Cong Wang: > On Fri, 2012-04-20 at 09:51 -0400, Vivek Goyal wrote: >> On Thu, Apr 19, 2012 at 10:59:17AM +0200, Harald Hoyer wrote: >>> Am 19.04.2012 00:28, schrieb Vivek Goyal: >>>> Hi, >>>> >>>> I am trying to dump kernel vmcore to an software iscsi target (kdump). >>>> kdump specifies the dump destination using "--mount" option. But dracut >>>> does not even include the "iscsi" module and associated device is not >>>> mounted in second kernel. >>>> >>>> Following is the dracut command line as called by /sbin/mkdumprd. >>>> >>>> dracut -m kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpatha /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,stripe=16,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 >>> >>> "-m kdumpbase" - This tells dracut to only use the kdumpbase dracut module >>> So, because the iscsi dracut module is not added, dracut does not even check() it. >>> >>> Why is it "-m kdumpbase" and not "--add kdumpbase" ??? >> >> I don't know why -m is being used instead of --add. I tried changing it >> to --add and uncompressed initramfs size changed from 36MB to 72MB. >> >> To me 32MB size itself is big. IIRc, in RHEL6 using our own mkinitrd, we had >> uncomressed initrd size close to 25MB. >> >> In kdump environment we work in very restricted memory conditions. >> Currently we reserve 128MB and there are calls to reduce it further. This >> 128MB should load kernel, initramfs and run all the tools in initramfs >> to actually save the vmcore to the target. >> >> So we need to figure out how can we reduce the size of initramfs for >> kdump case. In the next mail I will add the output of --debug both for >> -m kdumpbase and --add kdumpbase. >> >> From kdump perspective, we only need to mount targets as specified by >> --mount option. We might not want to mount even root and it depends on >> kdump.conf. If root is needed, we will pass that too on command line >> using --mount. So this is little different from -H option. >> >> Can we modify dracut in such a way so that it packs only those modules >> need to mount targets as specified --mount options? > > Yeah, I noticed this too, I think this is due to the dracut module > "kernel-modules" includes more than enough kernel modules into > initramfs, thus the size increased so much. > > Harald, if you have any idea to improve this? We need to find a way to > tell "kernel-modules" module to only include the ones we want. Just activate the host-only mode "--hostonly" or "-H" > > Thanks. > ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <4F95076A.9060504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F95076A.9060504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-23 7:53 ` Cong Wang 2012-04-23 8:37 ` Harald Hoyer 0 siblings, 1 reply; 27+ messages in thread From: Cong Wang @ 2012-04-23 7:53 UTC (permalink / raw) To: Harald Hoyer; +Cc: Vivek Goyal, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Mon, 2012-04-23 at 09:40 +0200, Harald Hoyer wrote: > > Just activate the host-only mode "--hostonly" or "-H" > Well, -H will set host-only mode for all dracut modules, but here we want to activate host-only mode _only_ for kernel-modules module. For other dracut modules, we use --add to only specify those we need, as you can see from Vivek's output. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option 2012-04-23 7:53 ` Cong Wang @ 2012-04-23 8:37 ` Harald Hoyer [not found] ` <4F9514E5.3010003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-23 8:37 UTC (permalink / raw) To: Cong Wang; +Cc: Vivek Goyal, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 23.04.2012 09:53, schrieb Cong Wang: > On Mon, 2012-04-23 at 09:40 +0200, Harald Hoyer wrote: >> >> Just activate the host-only mode "--hostonly" or "-H" >> > > Well, -H will set host-only mode for all dracut modules, but here we > want to activate host-only mode _only_ for kernel-modules module. > > For other dracut modules, we use --add to only specify those we need, as > you can see from Vivek's output. > > Why don't you want host-only mode for the other kernel modules? ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <4F9514E5.3010003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F9514E5.3010003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-23 12:54 ` Vivek Goyal [not found] ` <20120423125449.GF8103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 14:49 ` Vivek Goyal 1 sibling, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-23 12:54 UTC (permalink / raw) To: Harald Hoyer; +Cc: Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Mon, Apr 23, 2012 at 10:37:57AM +0200, Harald Hoyer wrote: > Am 23.04.2012 09:53, schrieb Cong Wang: > > On Mon, 2012-04-23 at 09:40 +0200, Harald Hoyer wrote: > >> > >> Just activate the host-only mode "--hostonly" or "-H" > >> > > > > Well, -H will set host-only mode for all dracut modules, but here we > > want to activate host-only mode _only_ for kernel-modules module. > > > > For other dracut modules, we use --add to only specify those we need, as > > you can see from Vivek's output. > > > > > > Why don't you want host-only mode for the other kernel modules? I think host-only should be reasonable but there should be scope for further optimization. IIUC, host-only will try to include all the modules which are needed to mount root and boot the machine. But in kdump, we might not want to mount root at all. We just might want to dump vmcore over NFS and reboot. So the assumption that we will necessarily mount root is not valid in kdump context. I am not sure how much memory saving this extra optimization will lead to, but I will try passing -H and do some testing and see how size is varying. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120423125449.GF8103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120423125449.GF8103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-24 3:18 ` Cong Wang 2012-04-24 21:02 ` Vivek Goyal 0 siblings, 1 reply; 27+ messages in thread From: Cong Wang @ 2012-04-24 3:18 UTC (permalink / raw) To: Vivek Goyal; +Cc: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Mon, 2012-04-23 at 08:54 -0400, Vivek Goyal wrote: > On Mon, Apr 23, 2012 at 10:37:57AM +0200, Harald Hoyer wrote: > > Am 23.04.2012 09:53, schrieb Cong Wang: > > > On Mon, 2012-04-23 at 09:40 +0200, Harald Hoyer wrote: > > >> > > >> Just activate the host-only mode "--hostonly" or "-H" > > >> > > > > > > Well, -H will set host-only mode for all dracut modules, but here we > > > want to activate host-only mode _only_ for kernel-modules module. > > > > > > For other dracut modules, we use --add to only specify those we need, as > > > you can see from Vivek's output. > > > > > > > > > > Why don't you want host-only mode for the other kernel modules? > > I think host-only should be reasonable but there should be scope for > further optimization. IIUC, host-only will try to include all the modules > which are needed to mount root and boot the machine. But in kdump, we > might not want to mount root at all. We just might want to dump vmcore > over NFS and reboot. Yes, exactly. The last time I tried host-only, it included more dracut modules than what we need, thus increased the initrd size. (The other reason is, as you replied in another email, host-only doesn't respect --mount, this also means "network" module will not be included when I dump to NFS but my rootfs is not NFS.) > > So the assumption that we will necessarily mount root is not valid in > kdump context. I am not sure how much memory saving this extra > optimization will lead to, but I will try passing -H and do some testing > and see how size is varying. Before this, we have to fix -H to work with --mount. ;-) ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option 2012-04-24 3:18 ` Cong Wang @ 2012-04-24 21:02 ` Vivek Goyal [not found] ` <20120424210224.GJ26708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-24 21:02 UTC (permalink / raw) To: Cong Wang; +Cc: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Tue, Apr 24, 2012 at 11:18:09AM +0800, Cong Wang wrote: [..] > > > Why don't you want host-only mode for the other kernel modules? > > > > I think host-only should be reasonable but there should be scope for > > further optimization. IIUC, host-only will try to include all the modules > > which are needed to mount root and boot the machine. But in kdump, we > > might not want to mount root at all. We just might want to dump vmcore > > over NFS and reboot. > > Yes, exactly. The last time I tried host-only, it included more dracut > modules than what we need, thus increased the initrd size. For me using --hostonly seems to be producing smaller initramfs then what is produced by default in kdump today in F17. I tried "-m kdumpbase" and my uncompressed initramfs size is around 36MB. I tried "--add kdumpbase" and my uncompressed initramfs size is 72MB. With "-add kdumpbase --host-only" uncompressed initramfs size is 18MB. So with --hostonly size has come down. So why do you say that using hostonlly increased the size of initramfs. > > (The other reason is, as you replied in another email, host-only doesn't > respect --mount, this also means "network" module will not be included > when I dump to NFS but my rootfs is not NFS.) I did not say that --hostonly does not respect --mount in all the cases. Looks like it does not respect in case of multipath and iscsi as of today. I see code where --mount devices and fs is pushed into host_fs_types[]. I guess it is just a matter of parsing host_fs_types in multipath and things should work. > > > > So the assumption that we will necessarily mount root is not valid in > > kdump context. I am not sure how much memory saving this extra > > optimization will lead to, but I will try passing -H and do some testing > > and see how size is varying. > > Before this, we have to fix -H to work with --mount. ;-) Following is a small patch which seems to fix the issue of dumping to multipath device for me. Is it this simple. Harald? --- lib/dracut/modules.d/90multipath/module-setup.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) Index: /lib/dracut/modules.d/90multipath/module-setup.sh =================================================================== --- .orig/lib/dracut/modules.d/90multipath/module-setup.sh 2012-04-16 10:03:27.000000000 -0400 +++ /lib/dracut/modules.d/90multipath/module-setup.sh 2012-04-24 16:59:53.831999986 -0400 @@ -17,11 +17,14 @@ check() { } if [[ $hostonly ]]; then - _rootdev=$(find_root_block_device) - if [[ $_rootdev ]]; then - check_block_and_slaves is_mpath "$_rootdev" && return 0 - fi - return 1 + local _found + local _dev + for fs in ${host_fs_types[@]}; do + _dev=$(echo $fs | awk -F '|' '{print $1}') + is_mpath $(get_maj_min $_dev) && _found="1" + done + [[ $_found ]] || return 1 + unset _found fi return 0 ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120424210224.GJ26708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120424210224.GJ26708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 9:26 ` Harald Hoyer [not found] ` <4F97C337.8040604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-04-25 13:34 ` Harald Hoyer 1 sibling, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-25 9:26 UTC (permalink / raw) To: Vivek Goyal Cc: Cong Wang, Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 24.04.2012 23:02, schrieb Vivek Goyal: > Following is a small patch which seems to fix the issue of dumping to > multipath device for me. Is it this simple. Harald? > > > --- > lib/dracut/modules.d/90multipath/module-setup.sh | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > Index: /lib/dracut/modules.d/90multipath/module-setup.sh > =================================================================== > --- .orig/lib/dracut/modules.d/90multipath/module-setup.sh 2012-04-16 10:03:27.000000000 -0400 > +++ /lib/dracut/modules.d/90multipath/module-setup.sh 2012-04-24 16:59:53.831999986 -0400 > @@ -17,11 +17,14 @@ check() { > } > > if [[ $hostonly ]]; then > - _rootdev=$(find_root_block_device) > - if [[ $_rootdev ]]; then > - check_block_and_slaves is_mpath "$_rootdev" && return 0 > - fi > - return 1 > + local _found > + local _dev > + for fs in ${host_fs_types[@]}; do > + _dev=$(echo $fs | awk -F '|' '{print $1}') > + is_mpath $(get_maj_min $_dev) && _found="1" > + done > + [[ $_found ]] || return 1 > + unset _found > fi > > return 0 > -- > To unsubscribe from this list: send the line "unsubscribe initramfs" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html it can be even simpler: diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh index 2bc1b41..ae9ec59 100755 --- a/modules.d/90multipath/module-setup.sh +++ b/modules.d/90multipath/module-setup.sh @@ -11,18 +11,16 @@ check() { [[ $debug ]] && set -x is_mpath() { - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 + local _dev + _dev=${1##/dev/} + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 return 1 } - if [[ $hostonly ]]; then - _rootdev=$(find_root_block_device) - if [[ $_rootdev ]]; then - check_block_and_slaves is_mpath "$_rootdev" && return 0 - fi - return 1 - fi + [[ $hostonly ]] || [[ $mount_needs ]] && { + for_each_host_dev_fs is_mpath || return 1 + } return 0 } diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh index 2f343ee..34e101c 100755 --- a/modules.d/95iscsi/module-setup.sh +++ b/modules.d/95iscsi/module-setup.sh @@ -15,8 +15,11 @@ check() { [[ $debug ]] && set -x is_iscsi() ( - [[ -L /sys/dev/block/$1 ]] || return - cd "$(readlink -f /sys/dev/block/$1)" + local _dev + _dev=${1##/dev/} + + [[ -L /sys/dev/block/$_dev ]] || return + cd "$(readlink -f /sys/dev/block/$_dev)" until [[ -d sys || -d iscsi_session ]]; do cd .. done @@ -24,14 +27,7 @@ check() { ) [[ $hostonly ]] || [[ $mount_needs ]] && { - _rootdev=$(find_root_block_device) - if [[ $_rootdev ]]; then - # root lives on a block device, so we can be more precise about - # hostonly checking - check_block_and_slaves is_iscsi "$_rootdev" || return 1 - else - return 1 - fi + for_each_host_dev_fs is_iscsi || return 1 } return 0 } ^ permalink raw reply related [flat|nested] 27+ messages in thread
[parent not found: <4F97C337.8040604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F97C337.8040604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-04-25 13:46 ` Vivek Goyal [not found] ` <20120425134606.GE12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-25 13:46 UTC (permalink / raw) To: Harald Hoyer Cc: Cong Wang, Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote: Hi Harald, [..] > is_mpath() { > - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 > - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 > + local _dev > + _dev=${1##/dev/} > + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 > + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 Will this work? _dev is device name (sda) and /sys/dev/block/ has links based on device "maj:min". I applied this patch and ran dracut and I see that multipath module did not get included. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120425134606.GE12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120425134606.GE12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 13:57 ` Harald Hoyer [not found] ` <4F9802CE.2030601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-25 13:57 UTC (permalink / raw) To: Vivek Goyal Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 25.04.2012 15:46, schrieb Vivek Goyal: > On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote: > > Hi Harald, > > [..] >> is_mpath() { >> - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 >> - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 >> + local _dev >> + _dev=${1##/dev/} >> + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 >> + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 > > Will this work? _dev is device name (sda) and /sys/dev/block/ has links > based on device "maj:min". I applied this patch and ran dracut and I > see that multipath module did not get included. > > Thanks > Vivek oh.. you are right: diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh index ae9ec59..2af112a 100755 --- a/modules.d/90multipath/module-setup.sh +++ b/modules.d/90multipath/module-setup.sh @@ -12,7 +12,7 @@ check() { is_mpath() { local _dev - _dev=${1##/dev/} + _dev=$(get_maj_min $1) [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 return 1 diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh index 34e101c..bfd9d73 100755 --- a/modules.d/95iscsi/module-setup.sh +++ b/modules.d/95iscsi/module-setup.sh @@ -16,7 +16,7 @@ check() { is_iscsi() ( local _dev - _dev=${1##/dev/} + _dev=$(get_maj_min $1) [[ -L /sys/dev/block/$_dev ]] || return cd "$(readlink -f /sys/dev/block/$_dev)" ^ permalink raw reply related [flat|nested] 27+ messages in thread
[parent not found: <4F9802CE.2030601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F9802CE.2030601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 14:14 ` Vivek Goyal [not found] ` <20120425141421.GF12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-30 15:07 ` Vivek Goyal 1 sibling, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-25 14:14 UTC (permalink / raw) To: Harald Hoyer Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Wed, Apr 25, 2012 at 03:57:34PM +0200, Harald Hoyer wrote: > Am 25.04.2012 15:46, schrieb Vivek Goyal: > > On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote: > > > > Hi Harald, > > > > [..] > >> is_mpath() { > >> - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 > >> - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 > >> + local _dev > >> + _dev=${1##/dev/} > >> + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 > >> + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 > > > > Will this work? _dev is device name (sda) and /sys/dev/block/ has links > > based on device "maj:min". I applied this patch and ran dracut and I > > see that multipath module did not get included. > > > > Thanks > > Vivek > > oh.. you are right: > > diff --git a/modules.d/90multipath/module-setup.sh > b/modules.d/90multipath/module-setup.sh > index ae9ec59..2af112a 100755 > --- a/modules.d/90multipath/module-setup.sh > +++ b/modules.d/90multipath/module-setup.sh > @@ -12,7 +12,7 @@ check() { > > is_mpath() { > local _dev > - _dev=${1##/dev/} > + _dev=$(get_maj_min $1) > [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 > [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 > return 1 > diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh > index 34e101c..bfd9d73 100755 > --- a/modules.d/95iscsi/module-setup.sh > +++ b/modules.d/95iscsi/module-setup.sh > @@ -16,7 +16,7 @@ check() { > > is_iscsi() ( > local _dev > - _dev=${1##/dev/} > + _dev=$(get_maj_min $1) > > [[ -L /sys/dev/block/$_dev ]] || return > cd "$(readlink -f /sys/dev/block/$_dev)" Thanks Harald. This fixes the issue for multipath. For iscsi, I see that after this change iscsi module is included but iscsi target bring up still does not happen so iscsi luns don't show up in second kernel. I think iscsi code might be assuing that we will pass some iscsi parameters on command line but we don't have any information and we don't pass anything. So iscsi module need save some files/state in initramfs during build and bring up iscsi targets accordingly. In RHEL6, during the block device stack traversal, I had saved the target information in a file and packed that file in initramfs. And then invoked code in initramfs to specifically bring up those luns. I need to read up some code and also see if network modules are being included or not and if networking is coming up or not before iscsi can come up. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120425141421.GF12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120425141421.GF12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 14:22 ` Harald Hoyer [not found] ` <4F9808A1.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-25 14:22 UTC (permalink / raw) To: Vivek Goyal Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 25.04.2012 16:14, schrieb Vivek Goyal: > On Wed, Apr 25, 2012 at 03:57:34PM +0200, Harald Hoyer wrote: >> Am 25.04.2012 15:46, schrieb Vivek Goyal: >>> On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote: >>> >>> Hi Harald, >>> >>> [..] >>>> is_mpath() { >>>> - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 >>>> - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 >>>> + local _dev >>>> + _dev=${1##/dev/} >>>> + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 >>>> + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 >>> >>> Will this work? _dev is device name (sda) and /sys/dev/block/ has links >>> based on device "maj:min". I applied this patch and ran dracut and I >>> see that multipath module did not get included. >>> >>> Thanks >>> Vivek >> >> oh.. you are right: >> >> diff --git a/modules.d/90multipath/module-setup.sh >> b/modules.d/90multipath/module-setup.sh >> index ae9ec59..2af112a 100755 >> --- a/modules.d/90multipath/module-setup.sh >> +++ b/modules.d/90multipath/module-setup.sh >> @@ -12,7 +12,7 @@ check() { >> >> is_mpath() { >> local _dev >> - _dev=${1##/dev/} >> + _dev=$(get_maj_min $1) >> [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 >> [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 >> return 1 >> diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh >> index 34e101c..bfd9d73 100755 >> --- a/modules.d/95iscsi/module-setup.sh >> +++ b/modules.d/95iscsi/module-setup.sh >> @@ -16,7 +16,7 @@ check() { >> >> is_iscsi() ( >> local _dev >> - _dev=${1##/dev/} >> + _dev=$(get_maj_min $1) >> >> [[ -L /sys/dev/block/$_dev ]] || return >> cd "$(readlink -f /sys/dev/block/$_dev)" > > Thanks Harald. > > This fixes the issue for multipath. > > For iscsi, I see that after this change iscsi module is included but iscsi > target bring up still does not happen so iscsi luns don't show up in second > kernel. > > I think iscsi code might be assuing that we will pass some iscsi > parameters on command line but we don't have any information and we > don't pass anything. So iscsi module need save some files/state in > initramfs during build and bring up iscsi targets accordingly. > > In RHEL6, during the block device stack traversal, I had saved the > target information in a file and packed that file in initramfs. And > then invoked code in initramfs to specifically bring up those luns. > > I need to read up some code and also see if network modules are being > included or not and if networking is coming up or not before iscsi > can come up. > > Thanks > Vivek Just drop a iscsi.conf file in the initramfs /etc/cmdline.d either via your module-setup.sh or: echo 'netroot=iscsi:[<username>:<password>[:<reverse>:<password>]@][<servername>]:[<protocol>]:[<port>][:[<iscsi_iface_name>]:[<netdev_name>]]:[<LUN>]:<targetname>' > iscsi.conf dracut -i iscsi.conf /etc/cmdline.d/iscsi.conf .... ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <4F9808A1.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F9808A1.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 15:02 ` Vivek Goyal [not found] ` <20120425150246.GG12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Vivek Goyal @ 2012-04-25 15:02 UTC (permalink / raw) To: Harald Hoyer Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Wed, Apr 25, 2012 at 04:22:25PM +0200, Harald Hoyer wrote: > Am 25.04.2012 16:14, schrieb Vivek Goyal: > > On Wed, Apr 25, 2012 at 03:57:34PM +0200, Harald Hoyer wrote: > >> Am 25.04.2012 15:46, schrieb Vivek Goyal: > >>> On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote: > >>> > >>> Hi Harald, > >>> > >>> [..] > >>>> is_mpath() { > >>>> - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 > >>>> - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 > >>>> + local _dev > >>>> + _dev=${1##/dev/} > >>>> + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 > >>>> + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 > >>> > >>> Will this work? _dev is device name (sda) and /sys/dev/block/ has links > >>> based on device "maj:min". I applied this patch and ran dracut and I > >>> see that multipath module did not get included. > >>> > >>> Thanks > >>> Vivek > >> > >> oh.. you are right: > >> > >> diff --git a/modules.d/90multipath/module-setup.sh > >> b/modules.d/90multipath/module-setup.sh > >> index ae9ec59..2af112a 100755 > >> --- a/modules.d/90multipath/module-setup.sh > >> +++ b/modules.d/90multipath/module-setup.sh > >> @@ -12,7 +12,7 @@ check() { > >> > >> is_mpath() { > >> local _dev > >> - _dev=${1##/dev/} > >> + _dev=$(get_maj_min $1) > >> [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 > >> [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 > >> return 1 > >> diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh > >> index 34e101c..bfd9d73 100755 > >> --- a/modules.d/95iscsi/module-setup.sh > >> +++ b/modules.d/95iscsi/module-setup.sh > >> @@ -16,7 +16,7 @@ check() { > >> > >> is_iscsi() ( > >> local _dev > >> - _dev=${1##/dev/} > >> + _dev=$(get_maj_min $1) > >> > >> [[ -L /sys/dev/block/$_dev ]] || return > >> cd "$(readlink -f /sys/dev/block/$_dev)" > > > > Thanks Harald. > > > > This fixes the issue for multipath. > > > > For iscsi, I see that after this change iscsi module is included but iscsi > > target bring up still does not happen so iscsi luns don't show up in second > > kernel. > > > > I think iscsi code might be assuing that we will pass some iscsi > > parameters on command line but we don't have any information and we > > don't pass anything. So iscsi module need save some files/state in > > initramfs during build and bring up iscsi targets accordingly. > > > > In RHEL6, during the block device stack traversal, I had saved the > > target information in a file and packed that file in initramfs. And > > then invoked code in initramfs to specifically bring up those luns. > > > > I need to read up some code and also see if network modules are being > > included or not and if networking is coming up or not before iscsi > > can come up. > > > > Thanks > > Vivek > > Just drop a iscsi.conf file in the initramfs /etc/cmdline.d either via your > module-setup.sh or: > > echo > 'netroot=iscsi:[<username>:<password>[:<reverse>:<password>]@][<servername>]:[<protocol>]:[<port>][:[<iscsi_iface_name>]:[<netdev_name>]]:[<LUN>]:<targetname>' > > iscsi.conf > > dracut -i iscsi.conf /etc/cmdline.d/iscsi.conf .... Problem is that I don't know all the details in kdump. Only thing user has told kdump is top level mount point. We don't even know that this mount point is on top of multipath + iscsi + underlying network. I was hoping that iscsi dracut module will store all the relevant information when it finds a device is iscsi device and bring that device up in second kernel. That includes storing information about network card and bringing it up. We have device traversal code in rhel6 mkdumprd but I end up duplicating all the code in rhel7 kdump, then it just increases the complexity in kdump module. I was hoping that generic iscsi dracut-module will take care of storing all the info itself once it knows it has said "yes" to an iscsi device in check() function. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120425150246.GG12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120425150246.GG12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 16:14 ` Harald Hoyer [not found] ` <4F9822FD.1010303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-25 16:14 UTC (permalink / raw) To: Vivek Goyal Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 25.04.2012 17:02, schrieb Vivek Goyal: > Problem is that I don't know all the details in kdump. Only thing user > has told kdump is top level mount point. We don't even know that this > mount point is on top of multipath + iscsi + underlying network. > > I was hoping that iscsi dracut module will store all the relevant > information when it finds a device is iscsi device and bring that > device up in second kernel. That includes storing information about > network card and bringing it up. > > We have device traversal code in rhel6 mkdumprd but I end up duplicating > all the code in rhel7 kdump, then it just increases the complexity > in kdump module. > > I was hoping that generic iscsi dracut-module will take care of storing > all the info itself once it knows it has said "yes" to an iscsi device > in check() function. > > Thanks > Vivek Ok, here I could use some help from you guys. ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <4F9822FD.1010303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F9822FD.1010303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-25 18:44 ` Vivek Goyal 0 siblings, 0 replies; 27+ messages in thread From: Vivek Goyal @ 2012-04-25 18:44 UTC (permalink / raw) To: Harald Hoyer Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Wed, Apr 25, 2012 at 06:14:53PM +0200, Harald Hoyer wrote: > Am 25.04.2012 17:02, schrieb Vivek Goyal: > > Problem is that I don't know all the details in kdump. Only thing user > > has told kdump is top level mount point. We don't even know that this > > mount point is on top of multipath + iscsi + underlying network. > > > > I was hoping that iscsi dracut module will store all the relevant > > information when it finds a device is iscsi device and bring that > > device up in second kernel. That includes storing information about > > network card and bringing it up. > > > > We have device traversal code in rhel6 mkdumprd but I end up duplicating > > all the code in rhel7 kdump, then it just increases the complexity > > in kdump module. > > > > I was hoping that generic iscsi dracut-module will take care of storing > > all the info itself once it knows it has said "yes" to an iscsi device > > in check() function. > > > > Thanks > > Vivek > > Ok, here I could use some help from you guys. Sure I will look into it. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F9802CE.2030601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 14:14 ` Vivek Goyal @ 2012-04-30 15:07 ` Vivek Goyal 1 sibling, 0 replies; 27+ messages in thread From: Vivek Goyal @ 2012-04-30 15:07 UTC (permalink / raw) To: Harald Hoyer Cc: Harald Hoyer, Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Wed, Apr 25, 2012 at 03:57:34PM +0200, Harald Hoyer wrote: > Am 25.04.2012 15:46, schrieb Vivek Goyal: > > On Wed, Apr 25, 2012 at 11:26:15AM +0200, Harald Hoyer wrote: > > > > Hi Harald, > > > > [..] > >> is_mpath() { > >> - [ -e /sys/dev/block/$1/dm/uuid ] || return 1 > >> - [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 > >> + local _dev > >> + _dev=${1##/dev/} > >> + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 > >> + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 > > > > Will this work? _dev is device name (sda) and /sys/dev/block/ has links > > based on device "maj:min". I applied this patch and ran dracut and I > > see that multipath module did not get included. > > > > Thanks > > Vivek > > oh.. you are right: Harald, I saw these patches committed in master branch of fedora tree. Are you planning to commit them for F17 too? They are not very intrusive so it might not be a bad idea? From my perspective, multipath kdump support gets enabled in F17 and my future testing becomes easier. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120424210224.GJ26708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 9:26 ` Harald Hoyer @ 2012-04-25 13:34 ` Harald Hoyer 1 sibling, 0 replies; 27+ messages in thread From: Harald Hoyer @ 2012-04-25 13:34 UTC (permalink / raw) To: Vivek Goyal; +Cc: Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young you might want to try rawhide dracut-018-37.git20120425.fc18 ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F9514E5.3010003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 12:54 ` Vivek Goyal @ 2012-04-23 14:49 ` Vivek Goyal 1 sibling, 0 replies; 27+ messages in thread From: Vivek Goyal @ 2012-04-23 14:49 UTC (permalink / raw) To: Harald Hoyer; +Cc: Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Mon, Apr 23, 2012 at 10:37:57AM +0200, Harald Hoyer wrote: > Am 23.04.2012 09:53, schrieb Cong Wang: > > On Mon, 2012-04-23 at 09:40 +0200, Harald Hoyer wrote: > >> > >> Just activate the host-only mode "--hostonly" or "-H" > >> > > > > Well, -H will set host-only mode for all dracut modules, but here we > > want to activate host-only mode _only_ for kernel-modules module. > > > > For other dracut modules, we use --add to only specify those we need, as > > you can see from Vivek's output. > > > > > > Why don't you want host-only mode for the other kernel modules? ^^^^^^^^^^ You meant "dracut modules" probably? I have the same question that -H should make sense for other dracut modules too. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <20120423151711.GD15561@redhat.com>]
[parent not found: <20120423151711.GD15561-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <20120423151711.GD15561-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-23 16:11 ` Harald Hoyer [not found] ` <4F957F4A.6090808-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 27+ messages in thread From: Harald Hoyer @ 2012-04-23 16:11 UTC (permalink / raw) To: Vivek Goyal; +Cc: Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young Am 23.04.2012 17:17, schrieb Vivek Goyal: > On Mon, Apr 23, 2012 at 09:40:26AM +0200, Harald Hoyer wrote: > > [..] >> Just activate the host-only mode "--hostonly" or "-H" > > I tried -H but then it looks like it does not include modules required > to mount disks passed using "--mount" option. For example, I want to > mount a multipath target in initramfs but I don't see multipath module > being included. > > Following is dracut command line. > > dracut --add kdumpbase --add dash --add fstab-sys --add kernel-modules -c /dev/null -I /sbin/makedumpfile --hostonly --mount '/dev/mapper/vg-lv_root / ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' --mount '/dev/mapper/mpathb /mnt/common ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=ordered' -M -f /boot/initramfs-3.3.2-1.fc17.x86_64kdump.img 3.3.2-1.fc17.x86_64 > > Notice, /dev/mapper/mpathb is the multipath device. > > Following is the list of modules included by dracut. > > ----------------- > i18n > rpmversion > plymouth > dm > kernel-modules > lvm > fstab-sys > resume > rootfs-block > terminfo > udev-rules > biosdevname > usrmount > base > fs-lib > kdumpbase > shutdown > ------------------- > > Notice it did not inclde "multipath" module. > > I passed the --debug option to dracut and attaching the resulting output. > I personally think that a new dracut option "--mount-only" might make > sense where only those modules are included which somehow contribute to > mounting of targets specified by "--mount". > > BTW, using --hostonly gave a nice redcution in initramfs size and my > uncomressed initramfs is around 18MB which sounds just right. > > Thanks > Vivek oh.. multipath detection is not yet implemented for host-only... everything else should work, though ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <4F957F4A.6090808-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: dracut does not mount iscsi targets specified using --mount option [not found] ` <4F957F4A.6090808-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-04-24 1:38 ` Vivek Goyal 0 siblings, 0 replies; 27+ messages in thread From: Vivek Goyal @ 2012-04-24 1:38 UTC (permalink / raw) To: Harald Hoyer; +Cc: Cong Wang, initramfs-u79uwXL29TY76Z2rM5mHXA, Dave Young On Mon, Apr 23, 2012 at 06:11:54PM +0200, Harald Hoyer wrote: [..] > oh.. multipath detection is not yet implemented for host-only... everything else > should work, though iscsi does not work either. Just gave it a try and iscsi does not show up in list of included modules. Thanks Vivek ^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2012-04-30 15:07 UTC | newest] Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-04-18 22:28 dracut does not mount iscsi targets specified using --mount option Vivek Goyal [not found] ` <20120418222829.GG2224-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-19 4:57 ` Cong Wang 2012-04-19 8:59 ` Harald Hoyer [not found] ` <4F8FD3E5.90103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-20 6:45 ` Cong Wang 2012-04-20 8:42 ` Harald Hoyer [not found] ` <20120420155143.GK22419@redhat.com> [not found] ` <20120420155143.GK22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 4:09 ` Cong Wang 2012-04-20 13:51 ` Vivek Goyal [not found] ` <20120420135156.GE22419-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 4:11 ` Cong Wang 2012-04-23 7:40 ` Harald Hoyer [not found] ` <4F95076A.9060504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 7:53 ` Cong Wang 2012-04-23 8:37 ` Harald Hoyer [not found] ` <4F9514E5.3010003-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 12:54 ` Vivek Goyal [not found] ` <20120423125449.GF8103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-24 3:18 ` Cong Wang 2012-04-24 21:02 ` Vivek Goyal [not found] ` <20120424210224.GJ26708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 9:26 ` Harald Hoyer [not found] ` <4F97C337.8040604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-04-25 13:46 ` Vivek Goyal [not found] ` <20120425134606.GE12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 13:57 ` Harald Hoyer [not found] ` <4F9802CE.2030601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 14:14 ` Vivek Goyal [not found] ` <20120425141421.GF12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 14:22 ` Harald Hoyer [not found] ` <4F9808A1.50206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 15:02 ` Vivek Goyal [not found] ` <20120425150246.GG12519-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 16:14 ` Harald Hoyer [not found] ` <4F9822FD.1010303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-25 18:44 ` Vivek Goyal 2012-04-30 15:07 ` Vivek Goyal 2012-04-25 13:34 ` Harald Hoyer 2012-04-23 14:49 ` Vivek Goyal [not found] ` <20120423151711.GD15561@redhat.com> [not found] ` <20120423151711.GD15561-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-23 16:11 ` Harald Hoyer [not found] ` <4F957F4A.6090808-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2012-04-24 1:38 ` Vivek Goyal
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.