I added a partition for crash dumps, because savecore doesn't find the core after dumping to the mirror, so my fstab looks like this:
/dev/mirror/swap none swap sw 0 0
/dev/ada0p4 none dump sw 0 0
After reboot, the dump device is being used as swap. I'm not sure if this is a bug, but I'm expecting only the mirror being used for swap.
dumpdev (str) Indicates the device (usually a swap partition) to
which a crash dump should be written in the event of a system
crash. If the value of this variable is "AUTO", the first
suitable swap device listed in /etc/fstab will be used as
dump device. Otherwise, the value of this variable is passed
as the argument to dumpon(8). To disable crash dumps, set
this variable to "NO".
Can you confirm that setting dumpdev=/dev/ada0p4 addresses the issue?
What we probably need to do is change the logic to:
If the value of this variable is "AUTO", the first dump device listed in /etc/fstab will be used, or the first suitable swap device if no dump device is found.
Im not sure what you mean by "adresses this issue", I did have dumpdev="/dev/ada0p4" in my rc.conf when the dump partition was added as swap during boot.
IMO, however, something categorized as dump via fstab should never be added as swap.
If you want me to try different settings, I'd prefer to not reboot for a few weeks.
(The reason I ran into this was a crash that claimed to be writing a dump on the /dev/mirror/swap, savecore did not find one at boot, though. So I tried to be sure it works next time.)
Oh, sorry I read your report the wrong way around - I thought you meant the swap device was still being used as dumpdev. I agree that a dump device should not be used for swap.
With fstab as in the original report and no explicit dumpdev setting I would currently expect /dev/mirror/swap to (attempt to) be used as the dump device, but this is something that should be fixed.