4 ms·
> First, when you create a ZFS pool, it partitions drives and puts swap on all of them. If you have a drive fail, you don't want to replace the failed drive wi
by noja 3y ago
> First, when you create a ZFS pool, it partitions drives and puts swap on all of them.
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.
- donmcronald 3y ago> 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. 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.
- noja 3y ago> There's no scenario I can think of where I want swap on a spinning disk. 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.
- justinclift 3y ago> 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. :/
- noja 3y agoWhat was the complication? TrueNAS handles this automatically. Was your swap non-raided?
- justinclift 3y agoIt's on a standard Linux server. For these particular servers, I'm using them with a different containerisation strategy (LXD) so don't want to run TrueNAS on them. These ones don't need to be applicances. :)