Date: Mon, 16 Oct 2023 13:36:32 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 274513] bsdinstall(8): Can't disable forcing of 4k sectors with ZFS pool using scripted install Message-ID: <bug-274513-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274513 Bug ID: 274513 Summary: bsdinstall(8): Can't disable forcing of 4k sectors with ZFS pool using scripted install Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: bugs.freebsd.org@a12l.xyz Context =3D=3D=3D=3D=3D=3D=3D I'm trying to write my own `installconfig` script to make it easier to inst= all FreeBSD 14 on my desktop machines. From what I understand, modern SSD drives have 8k physical sectors. Therefore I want to use 8k sectors for my ZFS poo= l. I've added `-o ashift=3D13` to `$ZFSBOOT_POOL_CREATE_OPTIONS`. I now want to disable the forcing of 4k sectors to avoid problems with contradicting settings. Expected Behavior =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I only need to set `$ZFSBOOT_FORCE_4K_SECTORS` to some specific value, so t= hat the condition `[ "$ZFSBOOT_FORCE_4K_SECTORS" ]` evaluates to false. Actual Behavior =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On line 833 in `//usr.sbin/bsdinstall/scripts/zfsboot` we have the if-state= ment if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; >From what I understand, it's only with the empty string argument that the `test` builtin evaluates to false. I.e., for this condition to be evaluated= to `false` requires `$ZFSBOOT_FORCE_4K_SECTORS` to be equal to the empty strin= g. But on line 74 in the above mentioned file we have : ${ZFSBOOT_FORCE_4K_SECTORS:=3D1} >From what I've understood from what I've read and tested, I conclude that t= his line will bind `ZFSBOOT_FORCE_4K_SECTORS=3D1` if `ZFSBOOT_FORCE_4K_SECTORS`= is unset or equal to the empty string. Therefore, I conclude that it's currently impossible to disable this option. Have I missed something, or is this a bug? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274513-227>