dracut: Override rd.md settings if rd.md.uuid is provided
PATCH 1/1 dracut: Override rd.md settings if rd.md.uuid is provided
Currently anaconda provides rd.md=0 on kernel's command line as a boot time optimization if root is not on md device. But this leads to kdump failure. We copy the command line from first kernel and if dump target is on md device, it fails as we never try to assemble md devices as rd.md=0.
We have already set rd.md.uuid though in /etc/cmdlind.d/ dir providing dracut the info about what md devices to assemble. So this patch overrides rd.md settings if rd.md.uuid is provided.
This is a stop gap measure to get kdump working on software raid devices. Harald seems to have bigger cleanup plans for rd.md. Once that happens, this patch will not be needed and things should automatically be fixed.
--- lib/dracut/modules.d/90mdraid/parse-md.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
lib/dracut/modules.d/90mdraid/parse-md.sh +6 -1
@@ -1,7 +1,12 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if ! getargbool 1 rd.md -n rd_NO_MD; then +MD_UUID=$(getargs rd.md.uuid rd_MD_UUID=) + +# If rd.md.uuid or rd_MD_UUID is specified, override rd.md settings. +[ -n "$MD_UUID" ] && override_rd_md=1 + +if [ ! $(getargbool 1 rd.md -n rd_NO_MD) ] && [ -z "$overide_rd_md" ]; then info "rd.md=0: removing MD RAID activation" udevproperty rd_NO_MD=1 else
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Vivek Goyal
Currently anaconda provides rd.md=0 on kernel's command line as a boot time optimization if root is not on md device. But this leads to kdump failure. We copy the command line from first kernel and if dump target is on md device, it fails as we never try to assemble md devices as rd.md=0.
Oops, forgot to refresh the patch before sending. Please ignore the previous version. Take this version of patch.
Thanks
Vivek
Currently anaconda provides rd.md=0 on kernel's command line as a boot time optimization if root is not on md device. But this leads to kdump failure. We copy the command line from first kernel and if dump target is on md device, it fails as we never try to assemble md devices as rd.md=0.
We have already set rd.md.uuid though in /etc/cmdlind.d/ dir providing dracut the info about what md devices to assemble. So this patch overrides rd.md settings if rd.md.uuid is provided.
This is a stop gap measure to get kdump working on software raid devices. Harald seems to have bigger cleanup plans for rd.md. Once that happens, this patch will not be needed and things should automatically be fixed.
--- lib/dracut/modules.d/90mdraid/parse-md.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
lib/dracut/modules.d/90mdraid/parse-md.sh +6 -1
@@ -1,7 +1,12 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if ! getargbool 1 rd.md -n rd_NO_MD; then +MD_UUID=$(getargs rd.md.uuid rd_MD_UUID=) + +# If rd.md.uuid or rd_MD_UUID is specified, override rd.md settings. +[ -n "$MD_UUID" ] && override_rd_md=1 + +if [ -z "$override_rd_md" ] && [ ! $(getargbool 1 rd.md -n rd_NO_MD) ]; then info "rd.md=0: removing MD RAID activation" udevproperty rd_NO_MD=1 else
A message that is not in the archive (sent off-list or not yet received): [email protected]
Am 05.09.2012 23:24, schrieb Vivek Goyal:
Quoted 53 lines · Vivek Goyal
Quoted 6 lines
Currently anaconda provides rd.md=0 on kernel's command line as a boot time optimization if root is not on md device. But this leads to kdump failure. We copy the command line from first kernel and if dump target is on md device, it fails as we never try to assemble md devices as rd.md=0.
Oops, forgot to refresh the patch before sending. Please ignore the previous version. Take this version of patch.
Thanks
VivekCurrently anaconda provides rd.md=0 on kernel's command line as a boot time optimization if root is not on md device. But this leads to kdump failure. We copy the command line from first kernel and if dump target is on md device, it fails as we never try to assemble md devices as rd.md=0.
We have already set rd.md.uuid though in
/etc/cmdlind.d/dir providing dracut the info about what md devices to assemble. So this patch overrides rd.md settings if rd.md.uuid is provided.This is a stop gap measure to get kdump working on software raid devices. Harald seems to have bigger cleanup plans for rd.md. Once that happens, this patch will not be needed and things should automatically be fixed.
Signed-off-by Vivek Goyal <[email protected]>--- lib/dracut/modules.d/90mdraid/parse-md.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Index:
/lib/dracut/modules.d/90mdraid/parse-md.sh
===================================================================lib/dracut/modules.d/90mdraid/parse-md.sh +6
-2@@ -1,7 +1,12 @@ #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -if ! getargbool 1 rd.md -n rd_NO_MD; then +MD_UUID=$(getargs rd.md.uuid rd_MD_UUID=) + +# If rd.md.uuid or rd_MD_UUID is specified, override rd.md settings. +[ -n "$MD_UUID" ] && override_rd_md=1 + +if [ -z "$override_rd_md" ] && [ ! $(getargbool 1 rd.md -n rd_NO_MD) ]; then info "rd.md=0: removing MD RAID activation" udevproperty rd_NO_MD=1 else --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Similar patch comitted upstream
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Thu, Sep 06, 2012 at 12:14:15PM +0200, Harald Hoyer wrote:
[..]
Quoted 3 lines
Similar patch comitted upstream
Hi Harald,
I think we need to use && instead of || in upstream committed patch.
+if ! [ -n "$MD_UUID" ] || ! getargbool 1 rd.md -d -n rd_NO_MD; then
Otherwise even if MD_UUID is defined, we check for rd_NO_MD and disable raid activation. It is not different from behavior without patch.
Thanks
Vivek