Right at the outset I want to say I’m quite new to ZFS at the time I write this so do your own homework. Anyway, I was trying to create a RAIDZ array on my test server which is currently running Proxmox 7.3. I set up the array using the interface provided and it threw this error back at me when I went to create it:
command '/sbin/zpool create -o 'ashift=12' arrayz1 raidz /dev/disk/by-id/ata-WDC_WD3200AAKX-001CA0_WD-WCAYUL400860 /dev/disk/by-id/ata-ST3160812AS_5LS9ADML /dev/disk/by-id/ata-ST3160812AS_5LS92RAL' failed: exit code 1
After a bit of digging I figured out what the problem was. I’m using any old drive I could find around the place and I have two 160GB drives and one 320GB drive. Turns out Proxmox won’t make ZFS create an array with different sized drives. It’s possible to force the creation of the array with the -f flag so open a shell on the machine and enter the command above but with a -f as shown below.
/sbin/zpool create -f -o 'ashift=12' arrayz1 raidz /dev/disk/by-id/ata-WDC_WD3200AAKX-001CA0_WD-WCAYUL400860 /dev/disk/by-id/ata-ST3160812AS_5LS9ADML /dev/disk/by-id/ata-ST3160812AS_5LS92RAL
Apparently this failure to create an array can also occur if the drives have existing filesystems but I had pre-wiped the drives.