What advantage does padding with swap give over leaving some unallocated space?
> Yes in case the drive fails with the swap on.
There's no scenario I can think of where I want swap on a spinning disk.
> You don't want to use ZFS for swap, it can require extra memory to allocate blocks. Not what you want when you are out of memory.
Is that even possible? Do you mean putting swap on a ZVOL?
> Perhaps, but you are assuming their reasons are not as good as yours without knowing their reasoning.
If anyone can justify a reason for putting swap on a spinning disk in 2023 I'd love to be enlightened.
When you only have spinning disks and you run out of ram.
> What advantage does padding with swap give over leaving some unallocated space?
It allows you to not run out of ram, and it means you get to use the space.
As someone who (this week) had a spinning disk fail in the NAS, with swap spread across all disks... it's kind of a pain in the arse vs using the whole disk.
It's extra complication, which can be especially bad if the disk failure occurs at early am when you're not 100% awake but still need to deal with it. :/
Was your swap non-raided?
If you have a drive fail, you don't want to replace the failed drive with one that is slightly smaller. It won't work. So they pad with swap.
> IIRC it may have even set up some mdadm RAID mirrors.
Yes in case the drive fails with the swap on.
You don't want to use ZFS for swap, it can require extra memory to allocate blocks. Not what you want when you are out of memory.
> It's a bunch of complexity and can leave you with swap on spinning disks if you don't notice and override the behavior.
Perhaps, but you are assuming their reasons are not as good as yours without knowing their reasoning.