-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
zfs online/replace fails on vdev with changed name #16983
Comments
Warning message to |
in regards to #16984 and #16985 this issue is somewhat invalid as you try to simulate something that won't happen on a real pool but is more of a hypothetical test - or to put it this way: WHY would some do such an operation to a real pool? WHAT would be the point in removing a drive just to re-add the very same drive at a later point in time? Can you give some real world example? |
@n0xena I was asked for an easy way to reproduce, and I have given one.
The number at the end changes based on how many there are and in what order they were detected, so drives move around often, in real life. |
It still seems to be a duplicate of the #3242 feature request. The |
When pool is imported, ZFS can search all available disks for its vdevs. When removed disk is hot-plugged, it is up to zed/zfsd to reattach it. I just don't remember what zed/zfsd do if the name is different. I wonder if |
@ixhama #3242 is a feature request, and if that is fixed, that would be great (although I'm not holding my breath since it is 10 years old at this point). |
System information
Describe the problem you're observing
When a vdev changes name, the pool is degraded and
zpool status
gives the message:zpool online
with the new device name is silently ignored, no warning or error, but also no action.zpool replace
(even with -f) fails, complaining that the new device is already a member of the active pool, even thoughzpool status
shows it as the old name, and offline.I did find issue #3242 which is a feature request for
zfs online
to be able to rename a device, which would fix the underlying problem. But I'm opening this ticket as a bug, since I would not expect eitherzfs online
to silently ignore the command, norzfs replace
to know it belongs to the pool but still fail, especially with-f
.At the least, it seems like the error messages (or no message) given by the commands should be improved.
Describe how to reproduce the problem
truncate -s 1G /blah/file1
truncate -s 1G /blah/file2
zpool create test mirror /blah/file1 /blah/file2
zpool offline test /blah/file2
mv /blah/file2 /blah/file3
zpool online test /blah/file3
zpool replace -f test /blah/file3
The text was updated successfully, but these errors were encountered: