Bug #14767
closedKernel textdumps are not recovered properly on systems with multiple swap partitions
100%
Description
ZFS guided auto-install, selected zfs-mirror, two disks.
As a result we have two swap partitions in fstab
- Device Mountpoint FStype Options Dump Pass#
/dev/gpt/efiboot0 /boot/efi msdosfs rw 2 2
/dev/ada0p3 none swap sw 0 0
/dev/ada1p3 none swap sw 0 0
@
Original rc.dumpon consists function
@
dumpon_try()
{
if /sbin/dumpon "${1}" ; then
# Create a symlink in devfs for savecore
echo "Using ${1} for dump device."
ln -fs "${1}" /dev/dumpdev
return 0
fi
echo "Unable to specify $1 as a dump device."
return 1
}
@
This function overwrites the symlink for dump device with last one tried device.
As a result we have symlink, but no dump for the savecore, because the dump is saved on the first partition, not the last one.
You can test it by entering command in console.
sysctl debug.kdb.enter=1
As a workaround, I've modified code
@
dumpon_try()
{
local dump_device="$1"
if /sbin/dumpon "$dump_device" ; then
# Create a symlink in devfs for savecore only if it doesn't exist
if [ ! -e "/dev/dumpdev" ]; then
ln -s "$dump_device" /dev/dumpdev
fi
# Print a message for each dump device found
echo "Using $dump_device for dump device."
return 0
fi
echo "Unable to specify $dump_device as a dump device."
return 1
}
@
Updated by Jim Pingle over 1 year ago
- Subject changed from If multiple swap devices found, rc.dumpon overwrites the dumpdev symlink with last one to Kernel textdumps are not recovered properly on systems with multiple swap partitions
- Assignee set to Jim Pingle
- Target version set to 2.8.0
- Plus Target Version set to 23.09
Updated by Jim Pingle over 1 year ago
- Status changed from New to In Progress
The problem isn't with rc.dumpon, it's in rc.savecore.
The OS supports multiple dump devices and it can use them all (see dumpon -l
output) so the part that needs correcting is in rc.savecore
-- It's hardcoded to use the symlink to the last dump device when really it should be iterating over dumpdev -l
output.
Updated by Jim Pingle over 1 year ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Applied in changeset 17630ffa48e33def331a65ee50f1ba1d2c3a5de5.
Updated by Jim Pingle over 1 year ago
- Status changed from Feedback to Resolved
Tested and working as expected on snapshots as well.
Updated by Jim Pingle about 1 year ago
- Target version changed from 2.8.0 to 2.7.1