On 04/16/15 at 05:29pm, Baoquan He wrote:
Minfei,
I have finished reviewing, you can repost with update. Please think
about the comment adding if it's necessary. Otherwise functionality
implementation looks good to me.
Thanks for your reviewing. I will re-post the patches based on your
comment.
Thanks
Minfei
Thanks
On 04/10/15 at 09:31pm, Minfei Huang wrote:
> Enhance kdump to support bind mounted target, since kdump cann't parse
> the bind mounted path.
>
> Following is the testcases which kdump can generate the core sucessfully.
> 1) rootfs, default path / specified path
> 2) rootfs with bind mounted path which is in the rootfs device
> # cat /etc/kdump | grep ^path
> path /var/crash
> # mount -o bind /var/crash /mnt/crash
> 4) rootfs with bind mounted path which is not in the rootfs device
> # cat /etc/kdump | grep ^path
> path /var/crash
> # mount /dev/vdb /mnt
> # mount -o bind /var/crash /mnt/crash
> 5) no-rootfs
> 6) no-rootfs with bind mounted path which is in the same device
> 7) no-rootfs with bind mounted path which is not in the same device
> 8) nfs
> 9) nfs with bind mounted path which is under the nfs mount point path
> # cat /etc/kdump | grep ^nfs
> nfs 192.168.122.134:/opt/crash
> # cat /etc/kdump | grep ^path
> path /var/crash
> # mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
> # mount -o bind /mnt/nfs/var/crash /mnt/nfs/dump
> 10) nfs with bind mounted path which is not under the nfs mount point path
> # cat /etc/kdump | grep ^nfs
> nfs 192.168.122.134:/opt/crash
> # cat /etc/kdump | grep ^path
> path /var/crash
> # mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
> # mount -o bind /mnt/nfs/var/crash /mnt/dump
> 11) nfs which don't specify the nfs option in the /etc/kdump, with bind mounted
path which is under the nfs mount point path
> # cat /etc/kdump | grep ^nfs
> # mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
> # cat /etc/kdump | grep ^path
> path /mnt/nfs/var/crash
> # mount -o bind /mnt/nfs/var/crash /mnt/nfs/dump
> 12) nfs which don't specify the nfs option in the /etc/kdump, with bind mounted
path which is not under the nfs mount point path
> # cat /etc/kdump | grep ^nfs
> # mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
> # cat /etc/kdump | grep ^path
> path /mnt/nfs/var/crash
> # mount -o bind /mnt/nfs/var/crash /mnt/dump
> 13) ext4
> 14) ext4 with bind mounted path which is under the ext4 mount point path
> 15) ext4 with bind mounted path which is not under the ext4 mount point path
> 16) btrfs
> 17) btrfs with subvolume which mounts under mount point path
> 18) btrfs with subvolume which does not mount under mount point path
>
> ---
> changelog:
> v2:
> - bisect the patch to make it clear to be reviewed
> - add the necessary function decription
> v1:
> - add the judgment to make it work only in Atomic
> ---
>
> Minfei Huang (5):
> kdump-lib: Add the new function to enhance bind mounted judgement
> kdump-lib: Add new function to judge the system is Atomic or not
> Get the mount point correctly, if the device has several mount point
> Fix the warning if the target path is bind mount in Atomic
> dracut-module-setup: Enhance kdump to support the bind mounted feature
> in Atomic
>
> dracut-module-setup.sh | 46 ++++++++++++++++++++++++++++++++--
> kdump-lib.sh | 67 ++++++++++++++++++++++++++++++++++++++++++++++++--
> mkdumprd | 36 +++++++++++++++++++++------
> 3 files changed, 138 insertions(+), 11 deletions(-)
>
> --
> 1.9.3
>