Biểu hiện
Cấu hình kernel crash dump rất hữu ích trong các trường hợp xử lý vấn đề phần cứng trên Parallels Cloud Server, Parallels Server Bare Metal, or Parallels Virtuozzo Containers for Linux.
Giải pháp
- Cài đặt
kexec-toolstrên Hardware Node:[root@pvcfl46x64 ~]# yum install kexec-tools - Thêm vào grub tham số kernel
crashkernel=128M@16Mcho i386 hoặc x86_64 vàcrashkernel=256M@256MItanium cho PVC phiên bản thấp hơn 4.7. Cấu hình cho phiên bản lớn hơn 4.7, sử dụngcrashkernel=129M@0Mtrên cấu trúc i386 và x86_64.[root@pvcfl46x64 ~]# grep crash /etc/grub.confkernel /boot/vmlinuz-2.6.18-028stab070.14 ro root=LABEL=/1 debug console=ttyS0,115200 console=tty crashkernel=128M@16M - Reboot HW.
- Enable Kdump trên HW:
[root@pvcfl46x64 ~]# chkconfig kdump on[root@pvcfl46x64 ~]# chkconfig --list kdumpkdump 0:off 1:off 2:on 3:on 4:on 5:on 6:off - Hãy đảm bảo rằng phân vùng đủ khoảng trống để lưu trữ thông tin kernel dumps..
[root@pvcfl46x64 ~]# cat /etc/kdump.confpath /vz/crash - Start Kdump trên HW:
[root@pvcfl46x64 ~]# service kdump startNo kdump initial ramdisk found. [WARNING]Rebuilding /boot/initrd-2.6.18-028stab070.14kdump.imgStarting kdump: [ OK ][root@psbm5~]# tail -n1 /etc/kdump.confblacklist extra/parallels/~# service parallels-server stop~# touch /etc/kdump.conf~# service kdump restart - Trường hợp bạn cần lưu trữ kdump trên một server khác thì phải chỉnh sửa “/etc/kdump.conf”:
[root@pvcfl46x64 ~]# cat /etc/kdump.confnet root@10.55.63.11 - Propagate settings:
[root@pvcfl46x64 ~]# service kdump propagateGenerating new ssh keys... done.root@10.55.63.11's password:/root/.ssh/kdump_id_rsa.pub has been added to ~root/.ssh/authorized_keys2 on 10.55.63.11[root@pvcfl46x64 ~]# - Restart Kdump:
[root@pvcfl46x64 ~]# service kdump restartStopping kdump: [ OK ]Detected change(s) the following file(s):/etc/kdump.confRebuilding /boot/initrd-2.6.18-028stab070.14kdump.imgStarting kdump: [ OK ][root@pvcfl46x64 ~]#
Khi kernel crash thông tin dump có thể tìm thấy trong “/var/crash/pvcfl46x64/.”
Bạn có thể kiểm tra kdump bằng cách dùng chuỗi SysRq:
# echo 1 > /proc/sys/kernel/sysrq # echo c > /proc/sysrq-trigger
Doanh nghiệp quan tâm về giải pháp vui lòng liên hệ trực tiếp cho ODS theo số hotline (028) 7300 7788 hoặc website: https://ods.vn để được tư vấn và hỗ trợ nhanh nhất.