[Sanity Check] MariaDB VM on ZFS-Based Host Storage - Using Virtual SCSI Disks to Control volblocksize on the host? (Am I doing this right?)

Sep 1, 2022
300
69
33
41
Hello,

N.B.: I haven't installed MariaDB yet, or even partitioned/formatted the virtual SCSI disks inside the VM, but I think I just caught myself about to make a mistake and wanted a second opinion.

I've got a Debian 12 VM with storage set up like this:
1721695095736.png

So, above, I'm taking a swing at the four-disk approach for storing MariaDB data in ZFS that a DB admin suggested I experiment with, keeping in mind that each virtual SCSI disk is a zVol.
  1. scsi0: OS boot disk (volblocksize 64k)
  2. scsi1: MariaDB database data disk (volblocksize 16k)
  3. scsi2: MariaDB binlog disk (volblocksize 1M)
  4. scsi3: MariaDB log file disk (volblocksize 1M)
I set this up and felt pretty good about it, then I realized ... for best performance, recordsize on the binlogs and regular log files are supposed to be at 1M, which is a whole different thing than setting the volblocksize.

So, the sanity check part. The virtual SCSI disks are zVols. So they have volblocksize, but do not have recordsize. Right?
And if yes, what's best practice here for MariaDB?

I want to keep all storage local to the VM. I'm aware I could always mount a ZFS backed share via NFS and set recordsize on that share, but I don't feel like I should need to do that.

I think I'm missing something obvious.