Summary: | ZFS: Confusing error message when attempting to create zpool on too small media | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Marie Helene Kvello-Aune <freebsd> | ||||
Component: | kern | Assignee: | Alan Somers <asomers> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | asomers | ||||
Priority: | --- | Flags: | asomers:
mfc-stable11+
asomers: mfc-stable10+ |
||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Marie Helene Kvello-Aune
2017-09-11 14:54:50 UTC
Created attachment 186261 [details]
truss output
Attaching output of # truss zpool create floppytest da0p1. I think relevant output is towards the end, but I'm not too familiar with truss so including all of it.
I can reproduce this bug when using GEOM devices but not file-backed vdevs. I've got a pretty good idea what the problem is. Code review in progress: https://reviews.freebsd.org/D12531 A commit references this bug: Author: asomers Date: Mon Oct 23 23:05:29 UTC 2017 New revision: 324940 URL: https://svnweb.freebsd.org/changeset/base/324940 Log: Fix the error message when creating a zpool on a too-small device Don't check for SPA_MINDEVSIZE in vdev_geom_attach when opening by path. It's redundant with the check in vdev_open, and failing to attach here results in the wrong error message being printed. However, still check for it in some other situations: * When opening by guids, so we don't get bogged down reading from slow devices like floppy drives. * In vdev_geom_read_pool_label for the same reason, because we iterate over all providers. * If the caller requests that we verify the guid, because then we'll have to read from the device before vdev_open verifies the size. PR: 222227 Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Reviewed by: avg, mav MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12531 Changes: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c A commit references this bug: Author: asomers Date: Tue Nov 28 16:34:56 UTC 2017 New revision: 326319 URL: https://svnweb.freebsd.org/changeset/base/326319 Log: MFC r324940: Fix the error message when creating a zpool on a too-small device Don't check for SPA_MINDEVSIZE in vdev_geom_attach when opening by path. It's redundant with the check in vdev_open, and failing to attach here results in the wrong error message being printed. However, still check for it in some other situations: * When opening by guids, so we don't get bogged down reading from slow devices like floppy drives. * In vdev_geom_read_pool_label for the same reason, because we iterate over all providers. * If the caller requests that we verify the guid, because then we'll have to read from the device before vdev_open verifies the size. PR: 222227 Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Reviewed by: avg, mav Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12531 Changes: _U stable/11/ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c A commit references this bug: Author: asomers Date: Mon Mar 5 20:43:43 UTC 2018 New revision: 330524 URL: https://svnweb.freebsd.org/changeset/base/330524 Log: MFC r324940: Fix the error message when creating a zpool on a too-small device Don't check for SPA_MINDEVSIZE in vdev_geom_attach when opening by path. It's redundant with the check in vdev_open, and failing to attach here results in the wrong error message being printed. However, still check for it in some other situations: * When opening by guids, so we don't get bogged down reading from slow devices like floppy drives. * In vdev_geom_read_pool_label for the same reason, because we iterate over all providers. * If the caller requests that we verify the guid, because then we'll have to read from the device before vdev_open verifies the size. PR: 222227 Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Reviewed by: avg, mav Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12531 Changes: _U stable/10/ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c |