zfs root on 22.1 rc1 install

Started by dirtyfreebooter, January 20, 2022, 09:25:48 PM

Previous topic - Next topic
i noticed 2 things with ZFS install on SSDs

one, autotrim is off by default, that is easy enough to turn on, but the other, ashift=0 is bad for SSDs, and should be ashift=12 which is not harmful to HDDs. maybe the ashift default should just be 12?
Deciso DEC3920, Protectli VP2440

ashift looks to be set to zero, but if you actually look at the zpool cache you might see that it was defaulted to 12. Which I believe makes sense because 0 is going to try to determine what ashift actually is:


zdb -U /boot/zfs/zpool.cache | grep ashift
ashift: 12


And for anyone discovering this issue you can turn on autotrim with:


zpool set autotrim=on zroot

you are 100% correct! thank you!
Deciso DEC3920, Protectli VP2440

FWIW, when using ZFS the following is set during boot of OPNsense:

% git grep ashift
src/etc/rc.loader.d/20-zfs:vfs.zfs.min_auto_ashift=12


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT

I don't see autotrim in my current setup, I presume this a 22.x-only feature?
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.

FreeBSD 13 is now using OpenZFS so that might be it.


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT