kdump는 CentOS Stream 8에 dmesg를 저장하지 않습니다.

kdump는 CentOS Stream 8에 dmesg를 저장하지 않습니다.

AWS에서 CentOS 8 스트리밍 머신을 생성하고 grub에서 crashkernel을 구성했습니다.

$ cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-552.el8.x86_64 root=UUID=e52ef623-609b-4202-9b2c-ac7aba5c3bee ro console=ttyS0,115200n8 no_timer_check net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10 crashkernel=128M

그런 다음 kdump를 설치하고 제대로 실행되는지 확인했습니다.

# systemctl status kdump
● kdump.service - Crash recovery kernel arming
   Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2024-04-13 08:42:55 UTC; 40s ago
  Process: 808 ExecStart=/usr/bin/kdumpctl start (code=exited, status=0/SUCCESS)
 Main PID: 808 (code=exited, status=0/SUCCESS)

Apr 13 08:42:43 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Install squash loader ***
Apr 13 08:42:43 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Stripping files ***
Apr 13 08:42:44 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Stripping files done ***
Apr 13 08:42:44 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Squashing the files inside the initramfs ***
Apr 13 08:42:54 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Squashing the files inside the initramfs done ***
Apr 13 08:42:54 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Creating image file '/boot/initramfs-4.18.0-552.el8.x86_64kdump.img' ***
Apr 13 08:42:55 ip-172-31-2-139.ap-east-1.compute.internal dracut[1101]: *** Creating initramfs image file '/boot/initramfs-4.18.0-552.el8.x86_64kdump.img' done ***
Apr 13 08:42:55 ip-172-31-2-139.ap-east-1.compute.internal kdumpctl[814]: kdump: kexec: loaded kdump kernel
Apr 13 08:42:55 ip-172-31-2-139.ap-east-1.compute.internal kdumpctl[814]: kdump: Starting kdump: [OK]
Apr 13 08:42:55 ip-172-31-2-139.ap-east-1.compute.internal systemd[1]: Started Crash recovery kernel arming.

이제 커널 충돌을 시뮬레이션해야 하므로 sysrq를 사용하여 이 작업을 수행합니다.

echo c > /proc/sysrq-trigger

그런데 재부팅 후 CentOS 7.X처럼 /var/crash에 dmesg 파일이 보이지 않습니다.

# ls /var/crash
- nothing, empty folder -

내가 볼 수 있는 유일한 것은 /var/log/kdump.log입니다.

+ 2024-04-13 08:35:56 /usr/bin/kdumpctl@679: ret=0
+ 2024-04-13 08:35:56 /usr/bin/kdumpctl@680: set +x
+ 2024-04-13 08:42:55 /usr/bin/kdumpctl@675: /sbin/kexec -s -d -p '--command-line=BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-552.el8.x86_64 ro console=ttyS0,115200n8 no_timer_check net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10 irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never nokaslr novmcoredd hest_disable disable_cpu_apicid=0' --initrd=/boot/initramfs-4.18.0-552.el8.x86_64kdump.img /boot/vmlinuz-4.18.0-552.el8.x86_64
Try gzip decompression.
Try LZMA decompression.
+ 2024-04-13 08:42:55 /usr/bin/kdumpctl@679: ret=0
+ 2024-04-13 08:42:55 /usr/bin/kdumpctl@680: set +x
+ 2024-04-13 08:44:31 /usr/bin/kdumpctl@675: /sbin/kexec -s -d -p '--command-line=BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-552.el8.x86_64 ro console=ttyS0,115200n8 no_timer_check net.ifnames=0 nvme_core.io_timeout=4294967295 nvme_core.max_retries=10 irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never nokaslr novmcoredd hest_disable disable_cpu_apicid=0' --initrd=/boot/initramfs-4.18.0-552.el8.x86_64kdump.img /boot/vmlinuz-4.18.0-552.el8.x86_64
Try gzip decompression.
Try LZMA decompression.
+ 2024-04-13 08:44:31 /usr/bin/kdumpctl@679: ret=0
+ 2024-04-13 08:44:31 /usr/bin/kdumpctl@680: set +x

충돌의 원인을 이해하려면 dmesg가 필요합니다. 어떻게 해야 하나요?

추신: 충돌을 유발하는 커널 모듈이 있지만 이유를 모르겠습니다. kdump의 문제를 보여주기 위해 도움을 원하는 사람이 쉽게 재현할 수 있도록 sysrq를 사용하고 있습니다.

관련 정보