Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
zfs root on 22.1 rc1 install
« previous
next »
Print
Pages: [
1
]
Author
Topic: zfs root on 22.1 rc1 install (Read 2905 times)
dirtyfreebooter
Newbie
Posts: 49
Karma: 1
zfs root on 22.1 rc1 install
«
on:
January 20, 2022, 09:25:48 pm »
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?
Logged
onedr0p
Newbie
Posts: 5
Karma: 0
Re: zfs root on 22.1 rc1 install
«
Reply #1 on:
January 21, 2022, 06:00:31 am »
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
Logged
dirtyfreebooter
Newbie
Posts: 49
Karma: 1
Re: zfs root on 22.1 rc1 install
«
Reply #2 on:
January 21, 2022, 04:43:40 pm »
you are 100% correct! thank you!
Logged
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: zfs root on 22.1 rc1 install
«
Reply #3 on:
January 25, 2022, 08:42:41 am »
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
Logged
dinguz
Sr. Member
Posts: 275
Karma: 13
Re: zfs root on 22.1 rc1 install
«
Reply #4 on:
January 25, 2022, 10:48:30 am »
I don't see autotrim in my current setup, I presume this a 22.x-only feature?
Logged
In theory there is no difference between theory and practice. In practice there is.
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: zfs root on 22.1 rc1 install
«
Reply #5 on:
January 25, 2022, 10:52:20 am »
FreeBSD 13 is now using OpenZFS so that might be it.
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
zfs root on 22.1 rc1 install