[kexec-tools] use fstab-sys to mount nfs

Dave Young yangrr at fedoraproject.org
Mon Jul 23 07:41:15 UTC 2012


commit 5e85d20d344f2013b69a5680e72bbf7b2cbb0f97
Author: Dave Young <dyoung at redhat.com>
Date:   Mon Jul 23 15:31:22 2012 +0800

    use fstab-sys to mount nfs
    
    dump_nfs mount the nfs share to /mnt, it's not what we expected.
    Change to use dracut fstab mount infrastructure for this.
    After the fix nfs dump is just same as localfs dump.
    
    The --mount for nfs does not work before, it depend on the upstream patch:
    1. dracut fix to autoload nfs.ko in case nfs4. the patch post as below:
    http://permalink.gmane.org/gmane.linux.kernel.initramfs/2768
    
    Signed-off-by: Dave Young <dyoung at redhat.com>
    Acked-by: Vivek Goyal <vgoyal at redhat.com>

 dracut-kdump.sh |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index eb4cbe1..144cc88 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -126,17 +126,6 @@ dump_rootfs()
     sync
 }
 
-dump_nfs()
-{
-    mount -o remount,rw $NEWROOT/ || return 1
-    [ -d $NEWROOT/mnt ] || mkdir -p $NEWROOT/mnt
-    mount -o nolock -o tcp -t nfs $1 $NEWROOT/mnt/ || return 1
-    mkdir -p $NEWROOT/mnt/$KDUMP_PATH/$DATEDIR || return 1
-    $CORE_COLLECTOR /proc/vmcore $NEWROOT/mnt/$KDUMP_PATH/$DATEDIR/vmcore || return 1
-    umount $NEWROOT/mnt/ || return 1
-    return 0
-}
-
 dump_ssh()
 {
     local _opt="-i $1 -o BatchMode=yes -o StrictHostKeyChecking=yes"
@@ -225,7 +214,7 @@ read_kdump_conf()
             if [[ "$config_val" =~ "@" ]]; then
                 add_dump_code "dump_ssh $SSH_KEY_LOCATION $config_val"
             else
-                add_dump_code "dump_nfs $config_val"
+                add_dump_code "dump_fs $config_val"
             fi
             ;;
         esac


More information about the scm-commits mailing list