-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zpool add command should refuse to add non-redundant disk configurations to pools without an override option #2486
Comments
I actually like this idea, compared to all the other --force requests this shouldn't be often, and it's very unlikely you really want to do it anyway, especially considering the syntax overlap of cache and log devices with add. I do think it's only really necessary as long as the lack of graceful removal of vdevs exists however, as its far to easy to irreparably poison a pool at the moment, with no clean way to resolve the issue. |
I'd like to add my +1 to this. I would even suggest that it simply be Also note that it should not require force if adding a log or cache device |
Sounds like a reasonable suggestion to me. If someone wants to propose a patch for this we can get it in the queue for review. |
It wouldn't be a terrible idea to structure this so zpool reports an error if adding a single-disk VDEV to a pool that does not yet have any other single-disk VDEVs, unless something like "--force-single-disk" was used (or answering "yes" at a prompt in an interactive shell). This is a problem that has hit many people (one more this week), and since there is no easy way to repair this afterward, it shouldn't be so easily done. By only limiting the error to cases where no other single-disk VDEVs already exist in the pool, this avoids problems for cases where someone is creating a new single-disk test pool, or has previously forced a single disk into the pool and knows that is what they want. |
The original issue here was addressed in master. The fix will be in 0.7.0. When adding devices it now verifies that those devices are of a similar replication level. If they're not you must provide the
|
Overloading "-f" to mean different things (add VDEVs of different Redundancy, add VDEVs on partitions, etc) is not really a good idea. Better to have something like "--force-nonredundant-vdev" or similar. |
At the moment it's embarrassingly easy to do this:
when you mean to do this:
@ryao in a IRC chat suggests that adding a non-redundant vdev configuration to a pool like this should only be possible by supplying a flag to force it.
The text was updated successfully, but these errors were encountered: