NVME Sector Size - Can I change this once the disk is already in a ZPool RAID 10

jimbob

New Member
Oct 3, 2022
2
0
1
I have installed proxmox using the GUI Installer and missed what I believe to be an important setting for the sector size of the nvme disks.

When running
Code:
smartctl -a /dev/nvme1n1
it shows a + next to 512, and the open-zfs docs recommend the disks should be formatted with a sector size of 4096 byte sectors in order to be more performant and reduce ware.

As each disk is 3.84TB, am I right in thinking this will make a difference.

As I have 4 x NVME in a RAID 10, would it be worthwhile evicting the disk, formatting it with a 4k sector size and re-presenting the disk back to the zpool. I don't have much data on the disks yet, but do have the boot and root partitions on there so not as straight forward as destroying the pool and re-creating it.

Or is there a way to change on the fly?
 
With ZFS ashift is defining what the smallest blocksize is ZFS will use. zpool get ashift rpool should show you what blocksize ZFS is using for the disks. "ashift=12" would be 4K and "ashift=9" would be 512B. The ashift can't be changed without destroying and recreating the whole pool.
And then you sometime got the option to tell the disks firmware to optimize or 512B for 4K blocks (internally then will still use a blocksize that is way higher than 4K...thats why you should get enterprise SSDs that can cache sync writes in RAM because of the powerloss protection, so you don't got a horrifying write amplification when doing small sync writes). Never had to this, but I would guess changing this will also wipe the complete disk, like a secure erase command would do to start new with a fresh factory reset.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!