Skip to content

libzfs: improve error message for zpool create with ENXIO#18184

Open
chrislongros wants to merge 1 commit intoopenzfs:masterfrom
chrislongros:fix/zpool-create-error-message
Open

libzfs: improve error message for zpool create with ENXIO#18184
chrislongros wants to merge 1 commit intoopenzfs:masterfrom
chrislongros:fix/zpool-create-error-message

Conversation

@chrislongros
Copy link

@chrislongros chrislongros commented Feb 7, 2026

When zpool create fails because a vdev cannot be opened (ENXIO), the error falls through to zpool_standard_error() which reports the generic 'one or more devices is currently unavailable'. This is misleading when the real cause is a block size mismatch or other device open failure.

Add an explicit ENXIO case in zpool_create()'s error handling to provide a more descriptive message.

A companion kernel-side fix to return ZFS_ERR_ASHIFT_MISMATCH from spa_create() (matching the existing pattern in spa_vdev_add and spa_vdev_attach) is in progress as a separate PR.

Closes #11087

When zpool create fails because a vdev cannot be opened (ENXIO),
the error falls through to zpool_standard_error() which reports
the generic 'one or more devices is currently unavailable'. This
is misleading when the real cause is a block size mismatch or
other device open failure.

Add an explicit ENXIO case in zpool_create()'s error handling to
provide a more descriptive message.

Closes openzfs#11087

Signed-off-by: Christos Longros <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong error message for zpool create

1 participant