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
Unclear error message when attaching a vdev to a mirror with different ashift #11414
Comments
Just to add another scenario (and also hopefully provide google presence for my issue) I have also been hit by this albeit with a different message while using
As you can see, it also bears no reference to what appears to be the actual issue. I tried this solution just because I have tried everything else I could possibly find and it worked immediately. Perhaps unluckily, I had in fact already tried specifying the With this pool:
Attempting to replace
This is indeed misleading, and by guesswork and reading through open issues I have found that it is caused by the same issue you describe here. I experienced the same information reported for
The following command was successful:
|
@lordmoocow Wanted to call out that these 'issues' with failing commands and misleading errors tie into #9013 and #2486. It's very easy in response to the not working commands to try a "zpool add" of the replacement device, which irreversibly destroys redundancy and structure of the pool requiring it to be rebuilt - I ran into this issue with this fairly recent zfs version which is after issue #2486, so I suspect there are broader issues here too.
|
Got the same error message ( Fix:
After that, it worked! |
Just ran into this in passing personally - namely, that Shouldn't be that hard to check... |
Currently, you get back "can only attach to mirrors and top-level disks" unconditionally if zpool attach returns ENOTSUP, but that also happens if, say, feature@device_rebuild=disabled and you tried attach -s. So let's print an error for that case, lest people go down a rabbit hole looking into what they did wrong. Closes: openzfs#11414 Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Same trouble with ashift=0: zpool replace -o ashift=12 raids1 wwn-0x50026b774c00b73d-part4 /dev/sdd11 zpool get ashift Adding -o ashift=9 did the trick: zpool replace -o ashift=9 raids1 wwn-0x50026b774c00b73d-part4 /dev/sdd11 |
I would suspect that's less that the pool "property" ashift is 0 and more that the vdev property "ashift" was 9 and the disk you were putting in was 12, but yes, that should also be handled. |
Just want to mention that I just had a run-in with the 'can only attach to mirrors and top-level disks' message, which was solved with '-o ashift=9' as above in @romanshein's post above. Am running ZFS v2.0.3-9. feature@device_rebuild is already enabled. It is kind of scary to not be able to attach devices, as one might want to do that when something has failed. If nothing else, how about mentioning '-o ashift' in the 'can only attach ...' message, such that the user has a chance. |
System information
Describe the problem you're observing
This happens with this pool:
while, instead:
# zpool attach -o ashift=9 bootpool /dev/sdb4 /dev/sdc4
worked as intended.It did not help during troubleshooting that ashift is being reported as zero:
I know I should rebuild the bootpool - I'm not very concerned about performance there. This bug is about giving a more clear error message that talks about the real cause of the problem.
Describe how to reproduce the problem
Try to attach to a mirror a device with a detected native block size that is different from the one of the mirror.
The text was updated successfully, but these errors were encountered: