Building up a filesever with a zfs 3-way mirror for the sake of the anti-bitrot scrubbing, I wanted to install onto zfs as well, using copies=2 (or even =3) as a compromise between having no bitrot protection and consuming a second drive as a mirror. But there is no install option to do copies=. I decided to hack the install file myself, but then couldn't squeeze everything back into the same size iso it started with. I've never done release engineering, and don't have time to spend debugging things like that, so why it wouldn't cooperate remains a mystery to me and I ended up installing to ufs as my only practical option.
Instead of prompting for the copies attribute, zfsinstall could have generic "set these zpool options" and "set these zfs options for the top-level dataset" prompts. You'd specify your own options that would get added as -oname=value arguments to `zpool create [Pool]` in the case of the former prompt and `zfs set [TopLevelDatasetOfPool]` in the case of the latter. But I'm not too sure I like that idea, either. Either way, it's just an idea to throw around.
(In reply to Shawn Webb from comment #1) That'd be okay with me, probably even better than my idea if the installer sanity-checked the options chosen and complained if there was some craziness.
Affects installer.
A quick hack to work around this is: Start the installer, select Shell (not Install). Fire up csh and start bsdinstall from that. Proceed with the installation as normal, but... ...when the installer starts checking the distfiles, hit ^Z Now you can run `zfs set copies=2 zroot' or whatever. Then `fg' to resume bsdinstall and complete the installation.
Reassign.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=494de51bc0074472d1b01604f085daea0844f240 commit 494de51bc0074472d1b01604f085daea0844f240 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-09-30 02:46:57 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-09-30 02:55:46 +0000 bsdinstall: Add loader.efi to all ESPs we create For proper redundancy, add copies of loader.efi to each of the ESPs we create when we create multi-volume ZFS datasets. zfsboot creates a list of secondary ESPs, while bootpart doesn't create any (it's the UFS partitioning tool) because we don't supporg UFS over gmirror. The primary ESP is mounted and is what we use efibootmgr to boot from. The redundant copies allow the system to boot if the primary disks fails. Sponsored by: Netflix MFC After: 2 days PR: 208802 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52780 usr.sbin/bsdinstall/scripts/auto | 3 ++ usr.sbin/bsdinstall/scripts/bootconfig | 61 ++++++++++++++++++++++------------ usr.sbin/bsdinstall/scripts/zfsboot | 28 +++++++++------- 3 files changed, 59 insertions(+), 33 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4b734c47744611d1d2bd61d15045b7903d4c35be commit 4b734c47744611d1d2bd61d15045b7903d4c35be Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-09-30 02:46:57 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-10-04 00:27:07 +0000 bsdinstall: Add loader.efi to all ESPs we create For proper redundancy, add copies of loader.efi to each of the ESPs we create when we create multi-volume ZFS datasets. zfsboot creates a list of secondary ESPs, while bootpart doesn't create any (it's the UFS partitioning tool) because we don't supporg UFS over gmirror. The primary ESP is mounted and is what we use efibootmgr to boot from. The redundant copies allow the system to boot if the primary disks fails. Sponsored by: Netflix MFC After: 2 days PR: 208802 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52780 (cherry picked from commit 494de51bc0074472d1b01604f085daea0844f240) usr.sbin/bsdinstall/scripts/auto | 3 ++ usr.sbin/bsdinstall/scripts/bootconfig | 61 ++++++++++++++++++++++------------ usr.sbin/bsdinstall/scripts/zfsboot | 28 +++++++++------- 3 files changed, 59 insertions(+), 33 deletions(-)
Created attachment 264289 [details] Screenshot: bsdinstall, ZFS configuration, pool options (In reply to Shawn Webb from comment #1) If I understand correctly, this is implemented as shown in the screenshot.
(In reply to commit-hook from comment #6) Also, maybe bug 258987 and bug 262770
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d8e73f45fc5fe736ad398d15f547af593cc84e6f commit d8e73f45fc5fe736ad398d15f547af593cc84e6f Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-09-30 02:46:57 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-10-04 23:17:36 +0000 bsdinstall: Add loader.efi to all ESPs we create For proper redundancy, add copies of loader.efi to each of the ESPs we create when we create multi-volume ZFS datasets. zfsboot creates a list of secondary ESPs, while bootpart doesn't create any (it's the UFS partitioning tool) because we don't supporg UFS over gmirror. The primary ESP is mounted and is what we use efibootmgr to boot from. The redundant copies allow the system to boot if the primary disks fails. Sponsored by: Netflix MFC After: 2 days PR: 208802 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52780 (cherry picked from commit 494de51bc0074472d1b01604f085daea0844f240) usr.sbin/bsdinstall/scripts/auto | 3 ++ usr.sbin/bsdinstall/scripts/bootconfig | 61 ++++++++++++++++++++++------------ usr.sbin/bsdinstall/scripts/zfsboot | 28 +++++++++------- 3 files changed, 59 insertions(+), 33 deletions(-)
*** Bug 258987 has been marked as a duplicate of this bug. ***
*** Bug 262770 has been marked as a duplicate of this bug. ***
Fixed in head, stable/14 and stable/15 so the next releases from those branches will get this. But I seem to have tagged the wrong bug in my commit.
Oh! Not fixed at all... I tagged the wrong bug in the commits I made.