vfs.zfs.min_auto_ashift=13 only applied to zdb, zpool get all shows ashift=12

swellswell

Cadet
Joined
Mar 28, 2021
Messages
1
Hi,

On TrueNAS 12.0-U2.1 I'm trying to set up an SSD only zpool through the GUI with ashift=13. In the Tunables GUI, I added sysctl variable vfs.zfs.min_auto_ashift to 13, restarted and confirmed that it was applied. Then I created the zpool through the GUI. In the shell, running:
> zdb -C /data/zfs/zpool.cache -U pool1 | grep ashift
returns line ashift=13. However running
> zpool get all pool1 | grep ashift
returns ashift=12.
Destroying pool1 and setting up the pool again through the Shell with
> zpool create ... -o ashift=13 ...
results in both zpool get all and zdb returning ashift = 13.

1) Is this an issue?
2) Am I missing a variable or step?

If this is a unknown bug that wont be fixed soon then I want to ensure that I configure it through the Shell as closely as is done via the GUI. I am unsure if this is sufficient:

* create pool in GUI to create partitions
* export (not destroy) in GUI to preserve partitions
* > zpool destroy pool1
* > gpart list <disks 0-3> to retrieve rawuuids of p2 on each drive
* > zpool create -o altroot=/mnt -o cachefile=/data/zfs/zpool.cache -o failmode=continue -o autoexpand=on -o ashift=13 -o autotrim=on -o feature@empty_bpobj=enabled -o feature@large_blocks=enabled -O aclmode=passthrough -O aclinherit=passthrough -O atime=off -O compression=lz4 pool1 raidz2 /dev/gptid/<guid0> /dev/gptid/<guid1> /dev/gptid/<guid2> /dev/gptid/<guid3>
* > umount /mnt/pool1
* > zpool export pool1
* import pool1 in GUI

3) Is this the correct process and configuration for matching the GUI creation?

Regards,
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Yeah, I know that the GUI uses a minimum of 12, which may be somewhat hard-coded.

Is this the correct process and configuration for matching the GUI creation?
Sounds about right. If you don't have special compatibility requirements, just omit all the feature@ options and the pool will be created with all features (which is what the GUI does).
 

geerlingguy

Cadet
Joined
Jul 13, 2022
Messages
4
I had the same issue; had to re-create my pool via Shell using zpool create [pool] -o ashift=13 as well.
 
Top