How to setup kdump with bonding and VLAN
Environment
Red Hat Enterprise Linux 6
Issue
What changes are required for kdump to work properly in a environment with bonding and VLAN?
Resolution
-
Apply Errata RHBA-2012-0758
-
Set up VLAN tagged bond on Kdump box
ifcfg-eth0
DEVICE="eth0" HWADDR="00:05:33:26:9E:4F" NM_CONTROLLED="yes" ONBOOT="yes" BOOTPROTO=static MASTER=bond0 SLAVE=yes USERCTL=noifcfg-bond0
DEVICE=bond0 BOOTPROTO=none ONBOOT=yes BONDING_OPTS="mode=1 miimon=400"ifcfg-bond0.3
DEVICE=bond0.3 BOOTPROTO=static IPADDR=192.168.3.1 NETMASK=255.255.255.0 USERCTL=no VLAN=yes ONBOOT=yes# ifconfig bond0 Link encap:Ethernet HWaddr 00:05:33:26:9E:4F inet6 addr: fe80::205:33ff:fe26:9e4f/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:756 (756.0 b) TX bytes:2068 (2.0 KiB) bond0.3 Link encap:Ethernet HWaddr 00:05:33:26:9E:4F inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: fe80::205:33ff:fe26:9e4f/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:20 errors:0 dropped:3 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:630 (630.0 b) TX bytes:1404 (1.3 KiB) eth0 Link encap:Ethernet HWaddr 00:05:33:26:9E:4F UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:756 (756.0 b) TX bytes:2068 (2.0 KiB) Memory:fbec0000-fbefffff -
Set up VLAN interface on network dump target
# ifconfig eth29 0 # vconfig add eth29 3 # ifconfig eth29.3 192.168.3.10/24 up # ifconfig eth29.3 Link encap:Ethernet HWaddr 00:1B:21:3F:A1:B4 inet addr:192.168.3.10 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: fe80::21b:21ff:fe3f:a1b4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:17 errors:0 dropped:0 overruns:0 frame:0 TX packets:41 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1218 (1.1 KiB) TX bytes:6688 (6.5 KiB) -
Modify the /etc/kdump.conf, adding bonding option
debug_mem_level 1 core_collector makedumpfile -c --message-level 1 -d 31 options bonding mode=1 miimon=400 net 198.18.23.251:/services/sharewr -
Verify kexec-tools-2.0.0-244.el6.x86_64
# cat /etc/kdump.conf net root@192.168.3.10 link_delay 60 default shell -
Make a kdump initrd file.
# service kdump restart Stopping kdump:[ OK ] No kdump initial ramdisk found.[WARNING] Rebuilding /boot/initrd-2.6.32-274.el6.x86_64kdump.img Starting kdump:[ OK ] -
Check the console log
Creating block device ram15 Creating block device ram2 Creating block device ram3 Creating block device ram4 Creating block device ram5 Creating block device ram6 Creating block device ram7 Creat sda:ing block device sda1 ram8 Creating sda2 block device ram9 Creating block device sda Creating block device sr0 mapping bond0 to bond0 mapping bond0.3 to bond0.3 mapping eth0 to eth0 searching for slaves bonding: bond0: doing slave updates when interface is down. enslaving eth0 tbonding: bond0: Adding slave eth0. bonding bond0: master_dev is not up in bond_enslave bond0 8021q: adding VLAN 0 to HW filter on device eth0 bonding: bond0: enslaving eth0 as an active interface with an up link. eth0 Link Up. Waiting 60 Seconds bna: eth0 link up bna: eth0 0 TXQ_STARTED Continuing 8021q: adding VLAN 0 to HW filter on device bond0 bond0 Link Up. Waiting 60 Seconds Continuing bond0.3 Link Up. Waiting 60 Seconds Continuing Saving to remote location root@192.168.3.10 1+0 records in 1+0 records out Free memory/Total memory (free %): 60840 / 114916 ( 52.943 ) Copying data : [100 %] 99215+770 records in 99241+1 records out 50811794 bytes (51 MB) copied, 13.0897 s, 3.9 MB/s Saving core md: stopping all md devices. complete igb 0000:05:00.1: PCI INT B disabled igb 0000:05:00.0: PCI INT A disabled Restarting system. machine restart -
Waiting for crash or trigger a crash for test. Please note the following will lead to a system crash!
# echo c > /proc/sysrq-trigger -
At last, check vmcore at target side:
# ll -h /var/crash/192.168.3.1-2012-05-24-06\:53\:05/vmcore.flat -rw-r--r--. 1 root root 49M May 24 06:56 /var/crash/192.168.3.1-2012-05-24-06:53:05/vmcore.flat
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.