From 7f59604e41f55e0ec352bdd4baa65911f685ac82 Mon Sep 17 00:00:00 2001 From: WANG Chao Date: Fri, 21 Jun 2013 11:23:59 +0800 Subject: [PATCH] dracut-kdump.sh: recursively umount fs and its submounts Certain dracut module will mount fs under real root(/sysroot/ or $NEWROOT/). Thus root fs can not be umounted by `umount /sysroot/`. We should use `umount -R /sysroot/` to recursively umount root and its submounts. v2: do the same for dump_fs() from Baoquan Signed-off-by: WANG Chao Signed-off-by: Baoquan He Acked-by: Vivek Goyal --- dracut-kdump.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index b7917fd..67ec1ad 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -74,7 +74,7 @@ dump_fs() mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore echo "kdump: saving vmcore complete" - umount $_mp || return 1 + umount -R $_mp || return 1 return 0 } @@ -121,7 +121,7 @@ dump_to_rootfs() echo "kdump: saving vmcore complete" sync - umount $NEWROOT || return 1 + umount -R $NEWROOT || return 1 return 0 }