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
zdb <dataset> fails with Remote I/O error when Multihost is enabled #7797
Comments
|
@KnightKu proposed a patch in a comment |
|
@KnightKu, that would work but the current requirement that every open/import path needs the For example, if zdb is used to open a checkpoint with the current code, it will fail in the same way: I think some other method is needed that automatically covers user-space opens/imports in zdb and zhack. |
|
@behlendorf , what would you think of a new global variable |
|
@behlendorf points out that my proposal has the side-effect of making it easier to accidentally disable the MMP activity test when it's not safe to do so, for example in zhack which opens the pool R/W. |
Since zdb opens the pools read-only, it cannot damage the pool in the event the pool is already imported either on the same host or on another one. If the pool vdev structure is changing while zdb is importing the pool, it may cause zdb to crash. However this is unlikely, and in any case it's a user space process and can simply be run again. For this reason, zdb should disable the multihost activity test on import that is normally run. This commit fixes a few zdb code paths where that had been overlooked. It also adds tests to ensure that several common use cases handle this properly in the future. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Gu Zheng <guzheng2331314@163.com> Signed-off-by: Olaf Faaland <faaland1@llnl.gov> Closes #7797 Closes #7801
Since zdb opens the pools read-only, it cannot damage the pool in the event the pool is already imported either on the same host or on another one. If the pool vdev structure is changing while zdb is importing the pool, it may cause zdb to crash. However this is unlikely, and in any case it's a user space process and can simply be run again. For this reason, zdb should disable the multihost activity test on import that is normally run. This commit fixes a few zdb code paths where that had been overlooked. It also adds tests to ensure that several common use cases handle this properly in the future. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Gu Zheng <guzheng2331314@163.com> Signed-off-by: Olaf Faaland <faaland1@llnl.gov> Closes openzfs#7797 Closes openzfs#7801
Since zdb opens the pools read-only, it cannot damage the pool in the event the pool is already imported either on the same host or on another one. If the pool vdev structure is changing while zdb is importing the pool, it may cause zdb to crash. However this is unlikely, and in any case it's a user space process and can simply be run again. For this reason, zdb should disable the multihost activity test on import that is normally run. This commit fixes a few zdb code paths where that had been overlooked. It also adds tests to ensure that several common use cases handle this properly in the future. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Gu Zheng <guzheng2331314@163.com> Signed-off-by: Olaf Faaland <faaland1@llnl.gov> Closes openzfs#7797 Closes openzfs#7801
Since zdb opens the pools read-only, it cannot damage the pool in the event the pool is already imported either on the same host or on another one. If the pool vdev structure is changing while zdb is importing the pool, it may cause zdb to crash. However this is unlikely, and in any case it's a user space process and can simply be run again. For this reason, zdb should disable the multihost activity test on import that is normally run. This commit fixes a few zdb code paths where that had been overlooked. It also adds tests to ensure that several common use cases handle this properly in the future. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Gu Zheng <guzheng2331314@163.com> Signed-off-by: Olaf Faaland <faaland1@llnl.gov> Closes #7797 Closes #7801
System information
Describe the problem you're observing
The command
zdb <dataset>fails with "failed to own dataset ...: Remote I/O error" if multihost is enabled.
First reported in #6464
Describe how to reproduce the problem
zpool create poolname /dev/some/device
zpool set multihost=on poolname
zdb poolname/
Include any warning/errors/backtraces from the system logs
``
[faaland1@per zfs]$ sudo cmd/zpool/zpool set multihost=on mypool
[faaland1@per zfs]$ cmd/zdb/zdb mypool/ 2>&1 | head -n4
failed to own dataset 'mypool': Remote I/O error
zdb: can't open 'mypool': Remote I/O error
ZFS_DBGMSG(zdb):
The text was updated successfully, but these errors were encountered: