ZFS management leaves much to be desired (Proxmox 6.2)

MoxProxxer

Well-Known Member
Apr 25, 2018
86
37
58
54
ZFS creation is a blind shot in the dark:

1596012000559.png

Ok - shell, here I come:

Code:
# /sbin/zpool create -o 'ashift=12' space2 raidz /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BN0X /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242EM2 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242D0Q /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21AXN7 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21CPM7 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242AYT /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BQ5B /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242CZN /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21D3RL /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BPLS /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242E7X /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA23WAED
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BN0X contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242D0Q contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21CPM7 contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BQ5B contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21D3RL contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BPLS contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242E7X contains a filesystem of type 'ext4'
/dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA23WAED contains a filesystem of type 'ext4'

Ah - at least we see the reason and not just an "exit code 1". Ok, have it your way, zpool:

Code:
# /sbin/zpool create -f -o 'ashift=12' space2 raidz /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BN0X /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242EM2 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242D0Q /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21AXN7 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21CPM7 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242AYT /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BQ5B /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242CZN /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21D3RL /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BPLS /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242E7X /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA23WAED
cannot create 'space2': invalid argument for this pool operation

Goddamit.

https://github.com/openzfs/zfs/issues/8406

Code:
# /sbin/zpool create -fd space2 -o 'ashift=12' raidz /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BN0X /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242EM2 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242D0Q /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21AXN7 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21CPM7 /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242AYT /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BQ5B /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242CZN /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21D3RL /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA21BPLS /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA242E7X /dev/disk/by-id/ata-ST10000VN0004-1ZD101_ZA23WAED

Hallelujah! (Observe the "d" in -fd) and the args reorg.

All in all, ZFS deletion, migration, growth, shrink support in Proxmox: an estimated 2% out of 100% ;-)
 
ZFS creation is a blind shot in the dark:

When the error window pops up, a bright red error message appears in the task log, too.

Screenshot of task log with error
You can double click it and it will contain all the output that you got later ("contains a filesystem..."). If there is an error about existing filesystems, you can also try wipefs -a <disk>. Helpful not only for ZFS.

What version of Proxmox VE do you use pveversion -v? Using -f like you initially did worked flawlessly for me.

Additionally, you're always free to post an enhancement request at bugzilla.proxmox.com.
 

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!