Hi, Dave.
I am fine with this patch. It is more appropriate if you can add the
comment log that systemd will umount device to avoid data corruption.
Thanks
Minfei
On 12/09/15 at 04:02pm, Dave Young wrote:
> Systemd reports a conflict when kdump calls reboot during booting
> because it tries to stop services while they are starting up.
>
> use systemctl reboot -f will fix this problem.
>
> man systemd.service show below:
>
> [snip]
> reboot causes a reboot
> following the normal shutdown procedure (i.e. equivalent to systemctl reboot).
reboot-force causes a forced reboot
> which will terminate all processes forcibly but should cause no dirty file systems
on reboot (i.e. equivalent to
> systemctl reboot -f) and reboot-immediate causes immediate execution of the
reboot(2) system call, which might result in
> data loss.
> [snip]
>
> But during test "/sbin/reboot -f" actually equals to systemctl "reboot
-f -f"
>
> Test with "reboot -f" I still get below dirty ext2 filesystem:
>
> [root@localhost ~]# fsck /dev/vdb
> fsck from util-linux 2.27
> e2fsck 1.42.13 (17-May-2015)
> /dev/vdb was not cleanly unmounted, check forced.
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> Pass 5: Checking group summary information
> /dev/vdb: 12/128016 files (0.0% non-contiguous), 18474/512000 blocks
>
> Change to systemctl reboot -f will instead get a clean filesystem
>
> Thus let's use systemctl reboot -f instead, it will ensure clean filesystem even
if
> other services are not stopped, we do not care.
>
> Since it blocks Fedora rawhide kdump I think we should add this ASAP.
> Later I will dig into systemd changes see which commit cause the breakage.
>
> Signed-off-by: Dave Young <dyoung(a)redhat.com
> Signed-off-by: Dangyi Liu <dliu(a)redhat.com>
> ---
> kdump-lib-initramfs.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- kexec-tools.orig/kdump-lib-initramfs.sh
> +++ kexec-tools/kdump-lib-initramfs.sh
> @@ -6,14 +6,14 @@ KDUMP_PATH="/var/crash"
> CORE_COLLECTOR=""
> DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31"
> DMESG_COLLECTOR="/sbin/vmcore-dmesg"
> -DEFAULT_ACTION="reboot"
> +DEFAULT_ACTION="systemctl reboot -f"
> DATEDIR=`date +%Y-%m-%d-%T`
> HOST_IP='127.0.0.1'
> DUMP_INSTRUCTION=""
> SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
> KDUMP_SCRIPT_DIR="/kdumpscripts"
> DD_BLKSIZE=512
> -FINAL_ACTION="reboot"
> +FINAL_ACTION="systemctl reboot -f"
> KDUMP_CONF="/etc/kdump.conf"
> KDUMP_PRE=""
> KDUMP_POST=""
> @@ -57,7 +57,7 @@ get_kdump_confs()
> DEFAULT_ACTION="kdump_emergency_shell"
> ;;
> reboot)
> - DEFAULT_ACTION="reboot"
> + DEFAULT_ACTION="systemctl reboot -f"
> ;;
> halt)
> DEFAULT_ACTION="halt"
> _______________________________________________
> kexec mailing list
> kexec(a)lists.fedoraproject.org
>
http://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org